File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Loop infinite urlPatterns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Loop infinite urlPatterns" Watch "Loop infinite urlPatterns" New topic

Loop infinite urlPatterns

Saulo Siqueira

Joined: Mar 27, 2012
Posts: 2
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:


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
I agree. Here's the link:
subject: Loop infinite urlPatterns
It's not a secret anymore!