"rf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > // This is common trick I use after a form
> > submission to
> > // help make navigation easier for the user, and to
> > help
> > // avoid dual-submission of the same form.
> > //
>
> Not clear - how is the second submission avoided?
>
>
> > if ( "POST".equalsIgnoreCase( request.getMethod() )
> > )
> > {
> >    StringBuffer buf = new StringBuffer();
> >    buf.append( request.getRequestURI() );
> >    buf.append( "?" );
> >    buf.append( request.getQueryString() );
> >    response.sendRedirect( buf.toString() );
> >    return;
> > }
>
>
> I have been using this technique for quite some time
> but I am not happy as all the POST data appears in the
> query string straight away. What is a better way of
> passing data(possibly huge) to a redirected url?
> RequestDispatcher would do but I dont see the
> redirected url at the browser if I use it.
>

The above code is harmless, and will work with any browser that actually
implements the RFC (AFAIK, this is the empty set :).  For broken browsers,
you have the choice of either storing the POST data in the session (and use
URL re-writing for safety), or copying it to the query-string.

> ~rf
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to