This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Implementing front controller design pattern causing infinite loops Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Implementing front controller design pattern causing infinite loops" Watch "Implementing front controller design pattern causing infinite loops" New topic
Author

Implementing front controller design pattern causing infinite loops

sudheer koal
Greenhorn

Joined: Feb 12, 2008
Posts: 1
MyServlet extends DispatcherServlet of spring framework.

To make every request pass through MyServlet i had given <url-pattern> entry as /jsp/*.I had googled and found this.And after placing this in url-pattern in web.xml request coming to servlet and going to web.xml and getting in to infinite loop.Hope this is causing the problem

In servlet I will be checking 3 things
1.)for session
2.)whether the user is coming from login page
3.)send the user to login.jsp if he is not logged and trying to access homepage.jsp using request.getRequestDisptcher("path").forwrd(request,response);


Any Help would be appreciated.

Thanks in advance.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Your controller's URL pattern shouldn't be catching requests for JSPs.
Come up with some other pattern to use for your commands.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing front controller design pattern causing infinite loops
 
Similar Threads
Programmatic access to servlet configuration
jsp:include page="header.html" causes IllegalStateException
How to declare/override Weblogic's ServletInvoker in web.xml
question on servlet-mapping
jsp:include page="header.html" causes IllegalStateException