Forums Register Login

Servicing *all* requests

+Pie Number of slices to send: Send
Hello,

Can I prevent clients from directly reaching a web resource (such as a JSP file) via its path name on the server? In such an event, I want it to go through my "controller" servlet so that I can do some checking before the server submits its response.

Thanks.
[ October 26, 2005: Message edited by: K Riaz ]
+Pie Number of slices to send: Send
The controller parameter can set a request parameter (say, controller=true). In the JSP, you check for the presence of that parameter. If it's absent, you redirect to an appropriate page. This check should live in its own JSP page page, which you include in any page that's not supposed to be directly accessible.
+Pie Number of slices to send: Send
Thanks.

Problem solved by adding a mapping to all *.jsp extensions to my controller servlet, which does the checking. Works perfectly.
+Pie Number of slices to send: Send
Filter is a better alternative
Attractive, successful people love this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 697 times.
Similar Threads
How do we use global variables in servlets?
Tomcat class file problem
Voice Mail
Tracking a session between Weblogic and ATG
trouble with geronimo plugin for eclipse
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:57:35.