> Somebody asked:
>
> > Is it possible to invoke the doPost() method (instead of the
> > doGet()) of the servlet to which I am redirecting using
> > response.sendRedirect() ??
>
>      No.
>
>      As far as I've been able to find (and believe me, I've looked) it
> is not possible for the server to have the browser rePOST.  If anybody
> has figured out how to do this, I'd appreciate a clue.  A friend once
> explained the whys and hows of it to me in great detail, I'll append
> an excerpt from his message at the end of this post. So far, the only
> way I've found is to simulate it, having the servlet generate a page
> containing custom javascript.
>
>      I suppose it could be done using a java applet, although the
> applet would be limited in which servers it could communicate with.
> Speaking of that limitation, what're the implications of having two
> different servers (different boxes, ip numbers, etc) with the same
> root domain?  e.g. a user gets an applet from bar.foo.com, can the
> applet communicate with baz.foo.com?  Or if the user gets an applet
> from just foo.com, can it communicate with baz.foo.com?
>
> Here're my friend's comments on the matter:

Your friends answer is very creative, but the answer is much simpler.
Its in the HTTP specification. (Reading the specification can be quite
enlightening.) And there is a reason.

GET and POST are meant for very different things. GET is for making
requests. POSTs are meant for making changes. The philiosphy is that the
user, not the server is in control of what changes are taking place,
therefore a redirect is a GET request.

Or so the theory goes.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ClueIN - The Internet's FREE Community Service.
Go to http://www.cluein.com and experience the most dynamic way to communicate with 
groups of people! You are limited only by your imagination. This service is yours to 
use free. Clue in now.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to