Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

recursive call to controller caused by mapping

 
J Knurek
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic