• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts2 visit the jsp in WEB-INF

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic