You don't need to use a hidden parameter...

Here a copy of what I do in the servlet...

      sReferer = req.getHeader( "REFERER" );
      sReferer = sReferer.substring( 0, sReferer.lastIndexOf("/")  );

      sURL = "inscrit" + sBean.substring( sBean.lastIndexOf(".") + 1 ) +
".jsp";

      if ( error ) {
                res.sendRedirect( sReferer + "/" + sURL + "?ERROR=true" );
      } else {
                res.sendRedirect( sReferer + "/" + sURL + "?" + errorInvoke.toString() 
);
      }

I hope than help you...

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Morten Bach Møller
> Sent: Tuesday, July 20, 1999 1:19 PM
> To: [EMAIL PROTECTED]
> Subject: How to send go back to client
>
>
> Hi,
>
> I have a JSP page A with a submit button on it. When the submit button is
> pressed I wan't the following to take place:
>
> 1) Call a JPS page B that parses form data and other stuff.
> 2) Make the client reload page A (to reflect changes made to
> session scoped
> variables by page B)
>
> When the client reloads it must pass query strings (i.e. A?parm=value) to
> the server.
>
> I currently do this as follows:
>
> Place a hidden value containing the URL of page A including parameters:
>       <input type=hidden name='origin'
> value='<%=HttpUtils.getRequestURL(request) + "?" +
> request.getQueryString()%>'>
> Send a redirect to this URL from page B:
>       response.sendRedirect(request.getParameter(origin));
>
> Can this be done without using the hidden value containing the URL like
> sending a GO BACK AND RELOAD to the client.
>
> /Morten
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff JSP-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to