View Full Version : redirecting to files under WEB-INF
Some_One
Feb 4th, 2008, 12:03 PM
Hi,
I've read that it is preferred to store jsp's in a subdirectory of WEB-INF so that the client cannot access it directly. However, how does one allow for scenario's where redirecting to these jsp's is required?
Thanks
Lori
Feb 4th, 2008, 12:20 PM
You can't!
If you mean a redirect using a view name with prefix redirect: or returning a RedirectView you can't!
A redirect is a HTTP-status 302 (moved) and an instruction for a browser to go to another location. If you cannot access that location with directing your browser to it, you cannot redirect there!
But you can wrap every jsp under the WEB-INF folder using controllers.
A simple way would be using the ParameterizableViewController.
All you then have to do is configure the controller in your appContext, defining the right view. No implementation needed!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.