Hey,
I don't know which web server you're using, but there's a bug in JRUN
(documented somewhere, I'm not sure where) by which you can only use the
GET method when referencing a servlet chain.

Perry Hoekstra wrote:
>
> Greet the sun all,
>
> I am running into a problem with request forwarding of a servlet.  I have a
> data input form that upon submission, does a "POST" to a servlet.  After
> successful validation, the servlet will do a request forward to another
> servlet that does its thing.  However, I am running into problems with that
> request. On the form, I have the following coded:
>
> FORM ACTION="com.package.AuthServlet?folderid=161&templateid=82"
> METHOD="POST"
>
> this works find and it hits the doPost method correctly.  However, in the
> AuthServlet, I want to forward the request to the DisplayPage servlet so I
> do a:
>
> RequestDispatcher t_requestDispatcher =
> servletContext.getRequestDispatcher("/com.package.DisplayPage?folderid=161&t
> emplateid=82");
>
> try {
>      t_requestDispatcher.forward(aRequest, aResponse);
>
> catch (IOException anIOException) {
>      throw new ServletException(anIOException.getMessage());
> }
>
> The URL showing in the broswer is:
>
> http://www.somewhere.com:7001/appname/com.package.AuthServlet?folderid=161&t
> emplateid=82
>
> and it gives me the error:
>
> The page cannot be displayed
> The page you are looking for cannot be displayed because the address is
> incorrect.
>
> If I hit enter on the error page, then the page I want is displayed which in
> this case is a "doGet".  It is like I have to do a "doPost" and turn around
> and do a "doGet" on the AuthServlet in order to get this to work correctly.
> Is there something I am missing with "POST" to the servlet and
> RequestForwarding in order to get this to work properly?
> --
> Perry Hoekstra
> DigitalRiver
>
> ___________________________________________________________________________
> 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

___________________________________________________________________________
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