Hi,
 

I have a war file deployed on Weblogic 7. I have placed all of my jsp files under /WEB-INF/jsp as a security measure to control direct client access to the JSPs. All client access is via a front controller servlet, which redirects to a particular JSP based on criteria in the request. My problem is if I make a call something like this inside the controller servlet:

...

dispatcher = context.getRequestDispatcher("/WEB-INF/jsp/my.jsp");

dispatcher.forward(request, response);

...

I get a 404 resource not found returned to the client. This should be really simple, so I am frustrated with this! What am I missing? This structure is detailed in the J2EE patterns book, but after going back and looking at the section again I realize there is a lot of hand waving and no code examples for this particular part. If I drop the leading slash from the path I get a NullPointerException, which according to the JavaDocs is the correct functionality - it explicitly states the path must begin with a slash and represents the path from the root of current context to the required JSP/servlet.

I haven't had a chance to try this on another container yet, so perhaps this is a Weblogic quirk. Also as soon as I post this I am going to try and move the JSPs out from under the WEB-INF directory just to verify what the problem really is (ie. all forwarding is not working, or just forwarding to resources under WEB-INF). Of course having the JSPs out from under WEB-INF defeats the purpose of this exercise in the long run!

Thanks,

Craig

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to