This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Access jsp file under WEB-INF directly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Access jsp file under WEB-INF directly" Watch "Access jsp file under WEB-INF directly" New topic
Author

Access jsp file under WEB-INF directly

Prakash Mani - Attur
Ranch Hand

Joined: Oct 08, 2009
Posts: 100
Can any one please tell me how to access jsp file which is under WEB-INF. I should not use struts action.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You don't. That's the point of putting them under WEB-INF--to disallow direct access.
Prakash Mani - Attur
Ranch Hand

Joined: Oct 08, 2009
Posts: 100
No David.. In my team they did it by using simpleurlhandler and viewresolver... I dont know spring.. so i could not tell you even the class name correctly...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

That's not accessing a JSP directly.
Prakash Mani - Attur
Ranch Hand

Joined: Oct 08, 2009
Posts: 100
oh.. thank you.. I thought since we have not used any action to view the jsp its mean direct access... Can you please say how can we tell that..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access jsp file under WEB-INF directly
 
Similar Threads
Need for servlet mapping in web.xml
Is it possible to hide JSPs from users?
web.xml and Struts 2
linking to a jsp page instead of linking to an action
Accessing JSP under WEB-INF