• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing front controller design pattern causing infinite loops

 
sudheer koal
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your controller's URL pattern shouldn't be catching requests for JSPs.
Come up with some other pattern to use for your commands.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic