Yes Dave. Can you please give any suggestion to acheive this requirement or is there any other way available through which I could forward this ActionForward.
Thanks for the help. -- Vivek On Thu, Mar 24, 2011 at 10:50 AM, Dave Newton <davelnew...@gmail.com> wrote: > It's a redirect, of course you lost the request object. > > Dave > > On Thu, Mar 24, 2011 at 11:40 AM, vivek mishra <mishravive...@gmail.com> > wrote: > > Hi list, > > > > I am trying to send additional parameter in action mapping, so that I > have > > written this code: > > public ActionForward addParameterToForward( > > ActionForward forward, > > String paramName, > > int paramValue) > > { > > logger.info("==200=====inside=addParameterToForward=== > > forward.getPath()====" ); > > // define the new path > > StringBuffer newPath = new StringBuffer(); > > newPath.append(forward.getPath()); > > if (newPath.toString().indexOf('?') == -1) > > { > > newPath.append("?"); > > } > > else > > { > > newPath.append("&"); > > } > > newPath.append(paramName); > > newPath.append("="); > > newPath.append(paramValue); > > > > // copy the forward with the new path > > ActionForward newForward = new ActionForward(); > > newForward.setName(forward.getName()); > > newForward.setPath(newPath.toString()); > > newForward.setRedirect(forward.getRedirect()); > > newForward.setContextRelative(forward.getContextRelative()); > > > > return newForward; > > } > > > > besides this in <action> <forward name="success" redirect="true" > > path="/myAction.do?method=view" /> </action> > > > > This code works for but here I lost the request object. In reuqest we > save > > our messages & on the respectiv JSP we show them > > using <html:message />. > > > > Can somebody please suggest any solution. Any help will be appreciated. > > > > Thanks! > > -- Vivek > > >