File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes recursive call to controller caused by mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "recursive call to controller caused by mapping" Watch "recursive call to controller caused by mapping" New topic
Author

recursive call to controller caused by mapping

J Knurek
Greenhorn

Joined: Oct 04, 2008
Posts: 5
I might be over-using Spring here cause this doesn't seem like an issue that should exist

my example:
  • I have a web page called page1.jsp
  • [list]I have my web.xml map to my DispatcherServlet[/list]
  • I have my DispatcherServlet map to myController
  • myController processes the model for the page and returns page1 to the ViewResolver
  • The ViewResolver adds the suffix .jsp to show the user page1.jsp

  • now the problem is that web.xml catches the load of page1.jsp again and calls myController, which returns page1 to the ViewResolver again, which calls web.xml again....and then the server just loops till it runs out of memory

    as a temporary work around, I've changed web.xml (as well as the mapping in the servlet.xml) to check for *.html instead, so that the user can access page1.jsp by going to page1.html - but this isn't a suitable solution for production
     
     
    subject: recursive call to controller caused by mapping