"Romain Quilici" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > this question seems simple, but I did not figure out how to answer it. > > In my web.xml I have defined a default servlet. So it can handle requests > that does not match other servlets pattern. > <servlet-mapping> > <servlet-name>DefaultServlet</servlet-name> > <url-pattern>/</url-pattern> > </servlet-mapping> > > Then in my DefaultServlet, I want to redirect to a jsp page, so I use > RequestDispatcher dispatcher = > getServletContext().getRequestDispatcher("/jsp/index.jsp"); > if(dispatcher != null){ > dispatcher.forward(request,response); > } > > But doing that, I reenter in my default servlet's doGet method. >
Unless you explicitly map them otherwise, things like stylesheets and images will typically get mapped to your DefaultServlet. > What I want is rather simple, when a user connect to the site > http://server/myapp/, then the request is handled by the default servlet > and the jsp page is displayed > Thanks for your help > Regards > Romain > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]