No i didn't because i wanted the action and the action configuration to be
really generic and work for any page. is there any solution for this or shal
i just set an action mapping with an input attribute for each page?
thanks

----- Original Message ----- 
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 17, 2003 8:34 AM
Subject: RE: How to refresh a page in an action


> Have you specified an input attribute in your action mapping in
> struts-config.xml?
>
> -----Original Message-----
> From: Mehdi EL AKARI [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 17 September 2003 16:18
> To: struts
> Subject: How to refresh a page in an action
>
>
> Hello,
> I nedd to create an action that positions a cookie and refreshes the page
> (with all its parameters)
> this is the code of my action and it causes a nullPointerException
>
> public class ChangeTabAction extends Action
> {
>      public static final String TabCookieName = "tabCookie";
>
>     public ActionForward execute(ActionMapping mapping, ActionForm form,
> HttpServletRequest request, HttpServletResponse response) throws
> IOException, ServletException
>      {
>
>           String tab= (String)request.getParameter("tab");
>           if(tab==null||tab=="")
>           {
>                tab="default";
>           }
>           Cookie myCookie = new Cookie(TabCookieName,tab);
>           response.addCookie(myCookie);
>           return new ActionForward(mapping.getInput());
>      }
> }
>
>
> I also tried return mapping.getInputForward();
> but it does throw the same exception
>
> can somebody help
>
> Thanks
> Mehdi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to