• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

recursive call to controller caused by mapping

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic