You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by neal cabage <ne...@yahoo.com> on 2003/04/25 02:01:09 UTC

Re: protecting a directory????

The safest option would be to move it outside of your web app's root.

Rodrigo Poblanno Balp <ba...@gmx.net> wrote:Hi, I'd like to know how to protect a directory from being read in Tomcat,
for example,
I have my webapp:
.../webapps/book
|
|-- /jsp
|-- /WEB_INF
|-- /META-INF
|-- /xml
While testing this, if I wrote something like
http://ada.cs.mx:8080/Libro/xml/users.xml
I actually could read the file users.xml and I want to lock that directory
so only the jsp's can acces the xml files on it.
How can I do this???


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

in web.xml -- tomcat 4.1.24

Posted by stephen chan <st...@netnation.com>.
Hello,

I am trying to get <error-page> <exception-type> in my web.xml working
in tomcat 4.1.24.

When I was using tomcat 3.x.x all I had to do was:

[1] in web.xml put

	<error-page>
	
<exception-type>java.lang.NullPointerException</exception-type>
 		<location>/MyMappedServlet</location>
	</error-page>

[2] in any of my servlet

	throw a new java.lang.NullPointerException

The above will bring me to /MyMappedServlet

Now, this worked for me in Tomcat 3.x.x, but not in the lastest 4.1.24

Somebody throw me a bone please.

Thanks
Stephen









---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org