I use resin 4.0.13 and I would like to put my jsp page near my 
javascript files, to have them near each-other which seems logical, and 
helps saving time to search for files.

My javascripts are in the directory "/res/js", and are available to http 
requests. So I would like to put my jsp pages in directory "/res/jsp".

When I do so, all works fine. But unfortunately the browser can request 
the jsp page : "http://domain/res/jsp/home.jsp";. I don't want this 
behavior because all my pages are sent through a forward() after url 
parsing and query processing.

I tried to put in the conf :

   <path-mapping url-pattern='/res/jsp/*' real-path='nowhere'/>

This answers 404 for all "http://domain/res/jsp/home.jsp"; requests, 
fine. But I found strange that my java calls to 
forward(request,response); answer also 404... then nothing works at all.

Another way would be to set a password on the directory :

   <resin:XmlAuthenticator password-digest="none">
     <resin:user name="zz66dh4f3y5h" password="xxdfsf8h35djkhgoqxx" 
   <resin:Allow url-pattern="/res/jsp/*">
     <resin:IfUserInRole role="user"/>

This works all right and forbid only the external http request, but it 
is rather complicate (and by the way password-digest-realm does not 
seems to work on resin 4,0,13)

Is there any way to simply tell that path mapping should be applied only 
to external request and not to forward() calls ?


Riccardo Cohen
+33 (0)6 09 83 64 49
Société Realty-Property.com
16 rue de Belle Isle
37100 Tours


resin-interest mailing list

Reply via email to