Annotated Controller

Henry Lu <[email protected]> Sun, 16 May 2010 09:07:44 -0400
Newsgroups gmane.comp.java.springframework.user
Message-ID <[email protected]>
I am trying to convert SimpleFormController to Annotated Controller 
(@Controoler). Can some one tell me how to convert the following code?

    private AppService appService;
    protected ServletContext g_application;

    public void initApplicationContext()
    {
       WebApplicationContext wac = getWebApplicationContext();
       this.appService = (AppService) 
wac.getBean(App_Const.APP_SERVICE_BEAN);
       g_application = this.getServletContext();
       g_application.removeAttribute(App_Const.APP_OBJECT);
       g_application.setAttribute(App_Const.APP_OBJECT, "0");
    }

I do need to get WebApplicationContext and ServletContext. Is there any 
way to do the same thing like initApplicationContext()?

-Henry

------------------------------------------------------------------------------