In an earlier post, I described a class to handle redirects in Struts and passing parameters along. That technique is not necessary; as of Struts 1.2.7, you can use the ActionRedirect class instead.
Here's a basic example from inside the execute method in an Action.
ActionRedirect redirect = new ActionRedirect(mapping.findForward("success")); redirect.addParameter("myparam","myvalue"); redirect.addParameter("something","fornothing"); redirect.addParameter("answer","42"); return redirect;
The ActionRedirect class is basically the same as my ForwardParameter class and is probably preferable.
Recent comments
13 weeks 3 days ago