tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keene, David" <>
Subject RE: Directory Structure Problems
Date Fri, 11 Jun 2004 00:27:47 GMT
Hi Val,

You might take a look at mod_proxy in your apache config, use the proxy
mode (P) to redirect all your http calls to instead

If you need help with mod proxy, post back and I'll see what I can do.


-----Original Message-----
From: Val T. [] 
Sent: Thursday, June 10, 2004 5:17 PM
To: Tomcat Users List
Subject: Directory Structure Problems


I've encountered a difficulty in a web site implementation, which uses
Tomcat 4.1.18 on RH Linux 8.0, MySQL 3.23.54, J2SDK 1.4.1_01, and
pooling with Form based authentication.  Everything was working fine,
some tweaks were done to the proxy server.

The directory strucuture is as follows:

CATALINA_HOME/webapps/LiveSite/[main files and folders]

I'm told that there is an Apache proxy server set up, that forwards the
requests to Tomcat.  When it was originally set up, requests that came
for would be redirected to the LiveSite folder, and
index.jsp page was served up.  I noticed that the URL in the browser
display the "LiveSite" folder in the address bar, after,
like this:

After some tweaks were done on the proxy server, the LiveSite folder no
longer displays in the address bar.  As a matter of fact, if you include
you get a 404 page not found error.  This would all be fine, and an
improvement, since it hides the directory structure, if it weren't for
it has done to the authentication process.  Everything under the
folder requires login.  So, when everything was working, a person would
login, and, once authenticated, they would be able to happily do their
in that admin area.

Now, however, they can login in (usually after three attempts), but the
stylesheets are no longer recognized, the javascripts are not
images are broken, and if you click on a link, you are presented with
login screen again.  There seems to be domain/directory structure
in the server.

My problem is that I don't know which server is confused.  I think that
LiveSite folder is now the default root folder.  I tried to set this as
in the server.xml file in Tomcat, to see if that would help.

So, whereas I'd had the context as this:

<Context path="/LiveSite" docBase="LiveSite" debug="0" reloadable="true"

I tried changing it to this:
<Context path="" docBase="LiveSite" debug="0" reloadable="true" >

This at first looked like a good move, until I discovered that doing
gave me the following error:

java.sql.SQLException: Cannot load JDBC driver class 'null'

so I've put it back the way I had it.  At least people can view the
though they can't use the restricted admin area, because they keep
the login page coming up.  It's like the session is lost, but the log
in Tomcat don't show an error.

In the web.xml file for the site, this is what I have for the security
constraint on the restricted folder:

   <!-- Define the context-relative URL(s) to be protected -->
   <description>only let the admin users login</description>

Since the problems started with tweaks that were done on the proxy
server, I
think we should be looking there.  But I've been told that the problem
probably with the site or Tomcat.  However, all of the documentation
I've read, and the searching I've done in the archives, has brought me
to a
dead end.  And I still think there must be something that either should
done in Tomcat to accommodate the fact that requests are going through a
proxy (though the same settings that I've got on this site work on other
sites that are on the same server--they're just not the default sites),
there should be something done to the proxy itself.

I have been searching for a solution for two days, and don't know what
direction to go in.  The Tomcat logs don't indicate that there is a
at all, unless I have the context path as "", and searching on the
SQLException didn't get me anywhere.

If anyone can give me a direction to look, I'd be really grateful.

Thanks for any help.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message