This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loop infinite urlPatterns

 
Saulo Siqueira
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I'm studying Java EE and I am making an application to learn. I have the following problem.

Mapped a Servlet I'm calling him frontController. It receives all requests it is with the annotation @ WebServlet (urlpatterns = {"*. jsp"}).

Here is a code snippet below.




For it knows which servlet parameter should I call if for example I have the url as follows:

http://apli/index.jsp?display_page=user

Ira fall in if the above code snippet if (displayPage.equals ("user")) that will call the method below:



At the end of the above method I run a dispatcher.forward (request, response) which is causing an infinite loop because it ends up going to frontController.

Who can help me?

thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic