| Author |
struts2 visit the jsp in WEB-INF
|
wking qing
Greenhorn
Joined: Nov 10, 2012
Posts: 2
|
|
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.
|
 |
 |
|
|
subject: struts2 visit the jsp in WEB-INF
|
|
|