tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shachor Gal <shac...@techunix.technion.ac.il>
Subject Re: mapping servlet/jsp to servername/ with apache and tomcat
Date Tue, 04 Apr 2000 04:48:08 GMT


On Mon, 3 Apr 2000, Joseph Slag wrote:

> After spending a good amount of time experimenting and coming up
> with a solution that I'm not crazy about, I'd like to ask if others
> have come up with a better way to do the following:
> 
> I want users who come to my site (by typing 'http://sitename.com/' or
> following a link to the same URL) to have their request processed by a 
> servlet or jsp file.
> 
> The only way that I've been able to make this work is by 
>   #1) using the default tomcat.conf directive to map .jsp files to tomcat,
>   #2) telling Apache to look for DirectoryIndex files of index.jsp and 
>           index.html, in that order,
>   #3) putting my index.jsp file in /webapps/ROOT/, 
>   #4) putting a bogus index.jsp in /htdocs/ 
> 
> This seems to convince Apache that it should be serving up an index.jsp file,
> which it then does properly by deferring to Tomcat.  Having a bogus index.jsp
> in Apache's /htdocs/ dir feels like a kludge, though.  Are there better ways?

How about setting the root application docBase to your apache root
directory, putting the WEB-INF in the root directory (and protecting it)

	Gal Shachor


Mime
View raw message