Neither or Both. Depends on your point of view. This is not behavior that
was specified by the Servlet Specification, that has been fixed in the 2.2
Servlet spec where the returned value should be a concatenation of the query
arguments followed by the post parameters. So:
<FORM METHOD="POST" ACTION="/servlet/xyz?p1=v1&p2=v2">
<INPUT TYPE="HIDDEN" NAME="p1" VALUE="v3">
</FORM>
When the servlet calls String[] vals = req.getParameterValues("p1") it will
get an array of two strings where vals[0] = "v1" and vals[1] = "v3".
(*Chris*)
----- Original Message -----
From: "Heinz Wehner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 17, 1999 11:10 AM
Subject: Request Parameters
> We've recently noticed an inconsistency regarding the handling of servlet
> request parameters. Take the following HTML snippet:
>
> <form method=post action="/servlet/xyz?p1=v1&p2=v2">
> <input ...field1...>
> <input ...field2...>
> </form>
>
> Calling getParameterNames in servlet xyz yields different results
depending
> on which servlet engine is used. On my Visual Cafe 3.0c servlet runner
> system, only the input parameter fields are listed as parameter names. But
> on a Linux-Apache-JServ system, the parameters of the query string (after
> the "?") are also included.
>
> Now which servlet engine has taken the right approach?
>
> Heinz Wehner
> (Karlsruhe, Germany)
>
>
___________________________________________________________________________
> 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