This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts2 visit the jsp in WEB-INF

 
wking qing
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:
I want to protect my jsp ,so i put it into WEB-INF.

for example :

WEB-INF\upload\success.jsp

so i want to visit it by action result,like follows:


you may think it's ok,but the result is wrong.
because the struts2 will change the url to "application/upload/WEB-INF/upload/success.jsp",so it's a error url.
in other words ,the strus2 will change the url to "application/namespace/result location".
so if your namespace is not "/ " you will never visit the jsp in WEB-INF
you may think ,how about
namespace="/WEB-INF/upload"
and

then the url will be changed to "WEB-INF/upload/success.jsp",
but it's wrong too.
because namespace=" WEB-INF/..." is not available,so the action can't be visited.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic