I want to add a URL parameter before forwarding to another action from an action method. Although HttpServletRequest has a getParameter() method, it has no setParameter() method. I know setAttribute() is there but I need the it to be part of the URL (like ?something=something&some2=some2). I know I can do it using filters but that's an overkill for this task.
Basically we have an externally managed filter which will change something on a page when that parameter is set. Let's say the color of the page will be passed as part of the URL parameter. When that parameter is present a servlet filter picks it up and changes the color of that page. I know it's a very odd way of doing but that's how they have it set up here.
I know how to make it work using java script based form submit by adding the URL parameter to the action url (ie. "/someAction.do?color=red"). But for some of the actions it actually does a action.forward("action_name") in the code. For those I was wondering what to do.
Does anyone know how to do that in struts 1.2?