• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

RedirectView question

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

My question is about the RedirectView object. I cannot get RedirectView object to redirect the view to the page residing under /WEB-INF directory.

As recommended, I keep my .jsp files under /WEB-INF/jsp/ directory. However, I have never been able to use RedirectView to redirect to any pages under this 'taboo' directory. If I moved these .jsp files out of /WEB-INF directory, I was okay.

I start wondering whether it is impossible for RedirectView to do the redirecting in Tomcat(6x).

Do you have any suggestions about this?

Thank you.

Frank
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Frank Truong wrote:As recommended



By whom? It makes sense only if you don't want them to be directly reachable to the clients...

Frank Truong wrote:
My question is about the RedirectView object. I cannot get RedirectView object to redirect the view to the page residing under /WEB-INF directory.



RedirectView will send a redirect header to the browser, instructing it to open the new URL, but it can't, since the content of WEB-INF directory is not exposed to the web clients. Move them out of WEB-INF!
 
Frank Truong
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thank you very much.

I've got into the habit of putting and .jsp files underneath /WEB-INF/jsp directory because my first Spring book was 'Spring In Action' (old edition) and my IDE was Netbeans.

Probably, I would use RedirectView only when the view page is not resided in /WEB-INF directory.

Still learning everyday...

Thank you, again.

Frank
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome!
 
reply
    Bookmark Topic Watch Topic
  • New Topic