GeeCON Prague 2014*
The moose likes Servlets and the fly likes Need Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Need Help" Watch "Need Help" New topic
Author

Need Help

Ganch Meky
Greenhorn

Joined: Oct 25, 2000
Posts: 5
Hi all,
I have a "controller" servlet that I want all requests to my web resources to go through. Regardless of what servlet a user is trying to access I want them to be forwarded to my "controller" servlet. So, in my deployment descriptor I specified the URL mapping for my "controller" servlet as
<url-mapping>/*</url-mapping>
In the controller servlet, I then check the path info and forward the request to the appropraite servlet that should be responsible for handling the request. However, when I do the forwarding the request gets forwarded back to the controller servlet, since the deployment descriptor requires it to handle all requests, thus creating an infinite loop. I don't want my other servlets to be accessed directly by typing up the URL in a browser - I want all requests to go through the controller.
Is there a way to do that ? I appreciate any help I can get on this.
Thanks!
Ganch Meky
Greenhorn

Joined: Oct 25, 2000
Posts: 5
Sorry, I meant to say
<url-patter>/*</url-pattern>
Thanks!
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
PLease visit this link. It may be of some help.
http://www.caucho.com/support/resin-interest/0101/0071.html
regds
maha anna
 
GeeCON Prague 2014
 
subject: Need Help