| Author |
problem accessing page inside /WEB-INF/
|
Timothy Sam
Ranch Hand
Joined: Sep 18, 2005
Posts: 746
|
|
Hi, I access a page inside /WEB-INF/ by invoking the struts-logic tag <logic:redirect forward="showMenu"/> I put it in /WEB-INF/ folder so it wouldn't be accessible for the user. But I believe I should still be able to go to the page using the <logic:redirect forward="showMenu"/> tag... I am able to go to pages inside /WEB-INF/ directory if I came from an ActionServlet mapping.findForward(). Here is the error message that I get
HTTP Status 404 - /AssetManagementSystem/WEB-INF/cpanel.jsp -------------------------------------------------------------------------------- type Status report message /AssetManagementSystem/WEB-INF/cpanel.jsp description The requested resource (/AssetManagementSystem/WEB-INF/cpanel.jsp) is not available. -------------------------------------------------------------------------------- Apache Tomcat/5.0.27
The file is there of course, I checked on it and it exists. Any help? Thanks!
|
SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
logic:forward will work in this case, but logic:redirect will not. Why? Because this tag causes a request.sendRedirect() to be performed. What this does is send a command back to the browser to go to a different URL. Because the URL you gave is inside WEB-INF, the browser can't access it. A forward, on the other hand, simply passes control to another page without going back to the browser, and therefore is able to access pages inside the WEB-INF directory.
|
Merrill
Consultant, Sima Solutions
|
 |
 |
|
|
subject: problem accessing page inside /WEB-INF/
|
|
|