Why use a redirect at all? Why not just change the form target?
Or if you do want to use a redirect, use the more common (and generally successful) approach of saving the parameters in the user's session and then send down a redirect with minimal information. This can be done using a Control Servlet request event written in Java that uses the response object to send the desired redirect. -David Leon Torres wrote:
Hi all,I'd like to get to the bottom of this issue: Suppose you have a re-usable form such as editcontactmech that is called from various screens. To get back to the screen the user came from, there is a [Go Back] and [Save] link generated from a DONE_PAGE parameter that is passed to editcontactmech.However, suppose instead of having [Go Back] and [Save], the requirement is that the user is taken back to the originating screen upon submitting the form. Currently, the only way I was able to implement this was to have a special java event method called donePageRequestHelper as follows,<!-- call this request when you have a donePage that you want to go to after finishing a service --><request-map uri="donePageRequestHelper"> <security https="true" auth="true"/><event type="java" path="path.to.java" invoke="donePageRequestHelper"/> <response name="viewContact" type="request-redirect" value="viewContact"/> <response name="viewAccount" type="request-redirect" value="viewAccount"/> <response name="viewLead" type="request-redirect" value="viewLead"/>... </request-map>public static String donePageRequestHelper(HttpServletRequest request, HttpServletResponse response) {String donePage = (String) request.getParameter("donePage"); if (donePage == null) { donePage = "error"; } return donePage; }The problem with this is that the request-redirect will end up adding all the form parameters to the URL. I see no way to resolve this with the current RequestHandler, except maybe with a flag to prevent the form POST data from being added to the GET parameter data. That is, it is only desired to pass along GET parameters to the redirect URL from the original request.Any ideas? - Leon
smime.p7s
Description: S/MIME Cryptographic Signature
