-----Original Message-----
From: Voegele, Jason [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 13, 2000 10:07 AM
To: [EMAIL PROTECTED]
Subject: RE: Request Parameters Getting LostI'm still having difficulty obtaining the request parameters from the implicit JSP request object.I tried the JSP page listed below. It worked fine when I put it in the TOMCAT_HOME\webapps\root directory, however, if I put it in another subdirectory or set up a context to point to another directory, it no longer works. Everything else works fine, but the request parameters just aren't there.For example, the JSP listed below works when placed in TOMCAT_HOME\webapps\root and invoked as http://localhost:8080/listparm.jsp?parm1=val1&parm2=val2However, I tried to place this JSP into TOMCAT_HOME\webapps\parmtest, and then set up the web.xml file to make listparm.jsp the "welcome page", but when I do that the request parameters get lost again. The JSP page still works properly, the the request parameters just aren't there.Does anyone have any idea what's going on with this?Thanks in advance for your help,
Jason Voegele-----Original Message-----
From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 4:49 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Request Parameters Getting LostI don't know your problem, but how about giving this a try. Here is a jsp I just wrote which works on tomcat 3.1 and displays all the parameters I give it - See if it works - No comments on my bad coding style(s). I placed it in webapps\root\listparm.jsp and then accessed it via http://localhost:8080/listparm.jsp?func=foo&bad=bar&a=b<%@ page language="java" %>
<HTML>
<HEAD>
<TITLE>List Parameters</TITLE>
</HEAD>
<BODY>
<%java.util.Enumeration eNames = request.getParameterNames();while ( eNames.hasMoreElements() )
{
String strName = (String)eNames.nextElement();
%>
<%= strName %> : <%= request.getParameter(strName).toString() %><BR>
<%
}
%>
<BR>Parameters are above.
</BODY>
</HTML>-----Original Message-----
From: Voegele, Jason [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 04:27 PM
To: [EMAIL PROTECTED]
Subject: RE: Request Parameters Getting LostThanks for the pointer. We're accessing the JSP with IE 5.5, which has an option to send URLs as UTF-8. I turned this option off, but alas the request parameters are still not there. Any further advice?Thanks,Jason Voegele-----Original Message-----
From: Keith McNeill [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 2:54 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Request Parameters Getting LostWe've had the same problem dealing with wireless apps & WAP gateways. Our theory is that the request params are being sent in UTF-8 not ascii and Tomcat can't deal with it. We do not have any problems when using JRun or Websphere.Keith McNeill-----Original Message-----
From: Voegele, Jason [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 1:14 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Request Parameters Getting LostMy apologies, we're actually using request.getParameter("page_id"), as well as the getParameterNames and getParameterValues as you've said. I just wrote the wrong method name in my original email.
Given that we are using the proper methods, is there any way to explain this behavior?
Thanks,
Jason Voegele
-----Original Message-----
From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 12:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Request Parameters Getting Lost
Actually, the functions are getParameterNames and getParameterValues
-----Original Message-----
From: Stefan Woithe [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: Request Parameters Getting Lost
Hi Jason,
I use Tomcat 3.1final and in an JSP the implicit object "request". If you
know the name of the parameter use request.getParameter(<name>). Where is
the method "getRequestParameters()" located -- for sure not in
javax.servlet.ServletRequest?Regards
Stefan
> "Voegele, Jason" wrote:
>
> We've run across some problems using request parameters in our JSP. We
decided to create a JSP that does nothing but print out request parms and
values, just to ensure that they are being passed with the request.
>
> We invoke the JSP like so:
http://localhost:8080/dwstatus?page_id=TEST_PAGE
>
> Our JSP simply prints out the value of the page_id parameter, and
enumerates the names of all parameters sent.
>
> The value we get for the page_id parameter is always null. There are no
parameters present in the Enumeration returned by getRequestParameters().
>
> Can anyone explain what's happening to our request parameters? We're
using Tomcat standalone on Windows NT Server 4.0.
>
> Thanks,
> Jason Voegele
Title: RE: Request Parameters Getting Lost
I've
discovered the problem with the request parameters. When using the web.xml
file to identify a "welcome page" for a webapp, the file needs to be explicitly
identified in the URL. I was failing to do this. So, invoking a JSP
like this fails to send the parameters:
However, if the JSP page is identified explicitly in the URL (instead of
automagically by the web.xml file) it works:
It
also works if you don't explicitly mention the JSP file, but you do provide the
"/" after the directory name, like so:
The
form directly above is ALMOST identical to the original version I was using,
except for the extra "/" between the webapp name and the parameter
list.
Now,
my only question is, is this the correct behavior, or a bug?
Thanks
again,
Jason
Voegele
- Request Parameters Getting Lost Voegele, Jason
- Re: Request Parameters Getting Lost Stefan Woithe
- RE: Request Parameters Getting Lost CPC Livelink Admin
- RE: Request Parameters Getting Lost Voegele, Jason
- RE: Request Parameters Getting Lost Keith McNeill
- RE: Request Parameters Getting Lost Voegele, Jason
- RE: Request Parameters Getting Lost CPC Livelink Admin
- RE: Request Parameters Getting Lost Voegele, Jason
- Request parameters getting lost Voegele, Jason
- Request parameters getting lost Frank W. Zammetti
- RE: Request parameters getting lost Daniel Huang
- Re: Request parameters getting lost QM
- Re: Request parameters getting lost David Rees
- Re: Request parameters getting lost David Rees
- RE: Request parameters getting lost Shapira, Yoav
- RE: Request parameters getting lost Allistair Crossley