Hi,

*I first posted this to users, but was suggested that I post it to dev*.

I apologize if this has been talked about before.  (I was surprised I couldn't 
find anything in the archives.)

When browsing a URL with a query string, Tomcat doesn't seem to recognize it 
unless there's an '=' in it. (it returns a null if there's no '=')  Actually, 
Tomcat sees it, but it doesn't get passed to the servlet/jsp.

We are using IPlanet 4.1 (without Tomcat), and it seems to work fine.  When I 
try it on Apache/Tomcat, it doesn't work (needs the '=').  I personally don't 
think it would be that much of a deal to change it, but there's a lot of code 
already written.

I am using java1.3, have tried tomcat 3.2.1 and 3.2.2b4 (ajp13 interface)

Here's a jsp that shows an example:

[root@web4]$ cat getparam.jsp
<html><head></head>
<body>
This page is looking for x<br>
<%= request.getParameter("x") %>
</body>
</html>

--
Here's what I get when I browse this URL: http://web.server.com/getparam.jsp?x
-----
(IPlanet)

This page is looking for x
-----
(apache/tomcat)

This page is looking for x
null
-----
(notice the null returned from apache/tomcat)


Same URL with an '=' on the end: http://web.server.com/getparam.jsp?x=
----
(IPlanet)

This page is looking for x
----
(apache/tomcat)

This page is looking for x
---
(no null!)


Here's part of my jasper.log(note after request params):

(without the '=' in the URL)
2001-05-10 05:07:34 - JspEngine --> /getparam.jsp
2001-05-10 05:07:34 -        ServletPath: /getparam.jsp
2001-05-10 05:07:34 -           PathInfo: null
2001-05-10 05:07:34 -           RealPath: /home/httpd/my-cast/getparam.jsp
2001-05-10 05:07:34 -         RequestURI: /getparam.jsp
2001-05-10 05:07:34 -        QueryString: x
2001-05-10 05:07:34 -     Request Params:
2001-05-10 05:07:34 - Classpath according to the Servlet Engine is: ....
------------
(with the '=' in the URL)
2001-05-10 05:08:28 - JspEngine --> /getparam.jsp
2001-05-10 05:08:28 -        ServletPath: /getparam.jsp
2001-05-10 05:08:28 -           PathInfo: null
2001-05-10 05:08:28 -           RealPath: /home/httpd/my-cast/getparam.jsp
2001-05-10 05:08:28 -         RequestURI: /getparam.jsp
2001-05-10 05:08:28 -        QueryString: x=
2001-05-10 05:08:28 -     Request Params:
2001-05-10 05:08:28 -            x =
2001-05-10 05:08:28 - Classpath according to the Servlet Engine is: ....


Is my developer just not using request.getparameter right and IPlanet is broken 
by functioning the way it does, or is Tomcat broken? Tomcat & IPlanet show 
different results with the exact same code.


thanks for any help I can get... I would really like to get this working with 
Apache/Tomcat.

----------------------
Ray Pitmon
Digital Cyclone, Inc.
[EMAIL PROTECTED]

http://www.my-cast.com

Reply via email to