tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán Freyr Stefánsson <>
Subject arrgh... request problem when redirecting from apache to tomcat
Date Wed, 26 Apr 2000 13:07:49 GMT
Hi everybody.

I'm going nuts!

The thing is that I have this web application and it actually works ok.  I
can go to http://localhost:8080/komodo/ and everything works just fine!  I
tried to add this line to the tomcat.conf:

ApJServMount /komodo /root

Because I saw that that's what they did to make the examples directory work
so that I don't have to type in the port number all the time(the one which
came with Tomcat with all the jsp and servlet examples).  Well... what do
you know... that worked!  I'm now able to access the komodo login page by
typing in:
http://localhost/komodo and it is redirected to Tomcat.  (The change from
the previous address is that I no longer have to specify the port number
":8080" so now Apache is actually taking the request - I guess).

Ok... now I guess I have to tell you what my index.htm page in the komodo
webapp does.  It provides a login for the user which can have two different
access types.  It is supposed to send the username and password information
from a form on the index.htm to the doLogin.jsp which does a login check by
getting the username and password by calling the
request.getParameter("UserName") method.  It should then get the value in
the UserName edit box on the index.htm page.  If the login check returns 1,
the user is redirected to the komodo/audit/auditFrames.jsp page, but if it
returns 2, he goes to the komodo/admin/adminFrames.jsp page.
This has been working fine while I accessed the login page through
http://localhost:8080/komodo but as soon as I added that line to
"tomcat.conf" I've been getting a null pointer exception.  It occurs because
the call to the getParameter(String) method returns null!  It's like it
looses the request when it's redirected by apache to tomcat (make any

Does anyone know what's going on here?  Any help would be greatly
appreciated.  I'm new to both Tomcat and JSP but I've had experience with
Java and servlets.

One other thing... I've been looking at the jsp examples (by typing in
http://localhost/examples/jsp and those pages seem to have a similar
problem!  For example the numberguess jsp always says that I've made one
guess, and the carts example only adds one thing to my cart (the thing I
selected most recently!

Please help me!!!

Here is some info:
I'm using Win NT 4.0
Apache 1.3.12
Tomcat 3.1 Beta

One other thing.  I've been on the way to upgrade to tomcat 3.1 release but
I'm a little bit hesitant because I don't want to loose my current setup.
Does the setup of the release version overwrite files like server.xml and my
webapps directory?  Of course I'll back everything up before I do this but
I'm curious anyways.  Is it worth the hassle?  Are there some "big" changes
in tomcat that matter?

I'm attaching the html and jsp files which are of any importance to this
matter if someone would have the time to look into this, and here is my
directory structure:

        |   |
        |   +-adminFrames.jsp

Kind regards and thanks in advance!

p.s. One thing I just want to clear up.  When I call the
http://localhost:8080/ addresses, am I calling the tomcat http server???
And then when I call the addresses without the port number, is that the
Apache server???  This is something I would really like to know for sure!

View raw message