tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Moore" <>
Subject RE: Can you set a webapp as Tomcat's default page?
Date Fri, 17 Jan 2003 22:05:01 GMT
> -----Original Message-----
> From: Bill [] 
> Sent: Friday, January 17, 2003 11:15 AM
> To: Tomcat Users List
> Subject: RE: Can you set a webapp as Tomcat's default page?
> development...adding the * to the JkMount directive 
> now allows the login page to render without any of its 
> images.  At least its progress right! :)
> Funny thing is my first attempt at this, I did have '/*' as 
> the mount point but that didnt work.  
> I'm pretty sure this is because I defined my servlet as the 
> default servlet so there is no longer a servlet responsible 
> for serving the images?  Does this sound about right?
> I guess what I need is this then:
> 1) 'JkMount /* ajp13' in webserver config

Doesn't this mean that Tomcat will be serving all requests?  In that
case, having Apache on the front doesn't help you much.

> 2) leave the default servlet definition alone
> 3) set the root context to my app's docBase
> 4) set a welcome-file for the webapp that points to my servlet?
> I'm assuming setting a welcome-file to point to a servlet is 
> as easy as specifying the full servlet name?  

I think you'd specify a path that maps to the servlet.

But I don't think this is really what you want, either.  Specifying it
as welcome page means that it will only be served as the default page
for the directory.  You said all requests.  But you can't really mean
*all* requests.

What it sounds like you want is a servlet to intercept all requests;
ensure that the user is logged in; if so, continue to the requested URL;
if not, redirect to the login page.  Is this correct?

In that case, you should probably use a filter rather than a servlet.

But if you have images on your login page, then you'll have problems.
If all of your images are in a separate directory, then you could make
your authentication filter pass through requests to the image directory
without checking for a login.

Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863

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

View raw message