Hi Y'all
but adding parameters must work somehow, as it works for jsp!
See what jsp spec 1.2 says for <jsp:include> (it's also true for 1.1)
####cite####
4.2.5 <jsp:forward>
A <jsp:forward page=�urlSpec� /> element allows the runtime dispatch of the
current request to a static resource, a JSP pages or a Java Servlet class in
the same context as
the current page. A jsp:forward effectively terminates the execution of the
current page. The
relative urlSpec is as in Section 2.2.1.
The request object will be adjusted according to the value of the page
attribute.
A jsp:forward action may have jsp:param subelements that can provide values for
some parameters in the request to be used for the forwarding.
...
####cite####
Because jsp is based on servlet passing additional parameters must work for
servlet too!
Can't say how exactly, but try <jsp:forward> within a jsp page and look at the
intermediate
servlet java code generated by the servlet engine.
Peter
Sam Newman wrote:
> I wanted to do something similar, and came to the conclusion thayt you
> cannot add parameters to a post using the standard redirection. If you have
> full control over servlet #2 however, you could simply store the extra
> fields in an attribute and then forward the page from servlet #1 to servlet
> #2....
>
> sam
> ----- Original Message -----
> From: "Elaine Chong" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 19, 2001 2:27 AM
> Subject: Adding parameters when forwarding requests
>
> > I have a servlet (Servlet #2) that handles POST requests from a form and
> > enters the form data into a database. I am currently having the form
> point
> > to another servlet first (servlet #1), which performs some checks, and
> then
> > forwards the request to servlet #2 to enter the data into the database.
> Is
> > there a way for me to have servlet #1 add parameters onto the request so
> > that servlet #2 simply accepts them as additional form data?
> >
> > Any ideas or help would be appreciated.
> > Thanks.
> >
> >
> ___________________________________________________________________________
> > 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
--
*** Bitte beachten Sie unsere neuen Mail- und Internet-Adressen ***
*** Please notice the new mail- and internet-address ***
--
___________________________________________________________________________
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