tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: Can't get precompiled JSP to be welcome page?
Date Thu, 25 Oct 2001 10:59:13 GMT

	The problem seems to be that Tomcat is scanning the file system for
the welcome pages, not including the servlet mappings.  What I do is create
a zero length file of the file name.  Tomcat will see this and redirect the
/ request to /whatever.jsp (the welcome file), which is then intercepted.
This fix only adds a few bytes (one file entry in the contents) to the
application and doesn't reveal anything about the internals that people
couldn't already easily figure out.

	Randy


> -----Original Message-----
> From: Alex Colic [mailto:alex.colic@pop-ware.com]
> Sent: Wednesday, October 24, 2001 1:40 PM
> To: Tomcat-User
> Subject: Can't get precompiled JSP to be welcome page?
> 
> 
> Hi,
> 
> I have a JSP file, pwLogin.jsp that I precompiled. I then added the
> following to my web.xml file:
> 
> 	<servlet>
> 		<servlet-name>pwLogin</servlet-name>
> 		<servlet-class>pwLogin</servlet-class>
> 	</servlet>
> 
> ...
> 
> 	<servlet-mapping>
> 		<servlet-name>pwLogin</servlet-name>
> 		<url-pattern>/pwLogin.jsp</url-pattern>
> 	</servlet-mapping>
> 
> ...
> 
>     <!-- The Welcome File List -->
>     <welcome-file-list>
>         <welcome-file>/pwLogin.jsp</welcome-file>
> 	  <welcome-file>pwLogin.jsp</welcome-file>
>     </welcome-file-list>
> 
> When I access my web app without specifiying a JSP I get a 
> page of web apps
> root directory. If I specify webapp/pwLogin.jsp I get the page.
> 
> Any help, ideas is appreciated.
> 
> 
> Alex
> 

Mime
View raw message