aspose file tools
The moose likes Web Services and the fly likes Servlet as a Facade for Webapp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Servlet as a Facade for Webapp" Watch "Servlet as a Facade for Webapp" New topic

Servlet as a Facade for Webapp

Deependra Tewari

Joined: Apr 12, 2006
Posts: 13

I'm writing a servlet which is to act as a facade for the web application.
It needs to check some details and the forward to the requested uri.

I have declared the web.xml entry as

<servlet><description>This is the main Facade for the webapp</description>


Within the servlet, I'm trying to forward like this

ServletContext ctx = getServletConfig().getServletContext();
ctx.getRequestDispatcher("/jsp/signin.jsp").forward(request, response);

Now the problem is that as soon as i forward, the request comes back to the facade again. This results in a recursive looping.

Any insights how I can break that.
I'm using Tomcat 6 & I can't have urls like *.do. No extensions.
So its like I need every incoming request to come to my facade but not the ones that the facade itself forwards.
I'm kind of stuck here
Peer Reynders

Joined: Aug 19, 2005
Posts: 2922
Please refrain from cross-posting to multiple JavaRanch forums.


Any replies should be posted to this topic:
Don't get me started about those stupid light bulbs.
subject: Servlet as a Facade for Webapp