Hi,

In the following:

I declare myString outside of the execute and perform methods

I Initialize myString to "TEST"; in execute()  and check the value of
myString in perform() method and it is not initialized to "TEST".
Why?
What is missing???


HERE IS THE CODE:

public class LoadUserCategoriesController extends Action implements Controller{



private String myString;

public ActionForward execute( ComponentContext tilesContext,

ActionMapping mapping,ActionForm form,HttpServletRequest request,
                                          HttpServletResponse response) throws 
Exception

{

        myString="TEST";      

       perform( tilesContext, request, response, getServlet().getServletContext() );

}

public void perform(ComponentContext tilesContext,HttpServletRequest 
request,HttpServletResponse response,
                                    ServletContext servletContext)throws 
ServletException, IOException{ 

   //myString does not equal "TEST"

  WHY?

}


Reply via email to