Yang Liu wrote:
>
> Thanks. I have read the servlet2.2 spec, but found it too simplified.
> Previously, I use apache+jserv, and visit my servlet by
> http://site/webapp/FooServlet
> and now I try to move to jsp, and i am using tomcat. I placed by servlet
> class files in the WEB-INF/classes directory, and I can visit my servlet
> using http://site/webapp/servlet/FooServlet. I can use url mapping to change
> to another url such as http://site/webapp/anothername/FooServlet. But I
> can't change to http://site/webapp/FooServlet. Since I can't map the root
> directory of the webapp to a servlet. I tried to use "/" or "/*", all
> failed.
> Anymore suggestion?

Mapping to "/" should work according to the Servlet 2.2 spec (replacing
the default servlet, so make sure this is really what you want; your
servlet will need to handle all requests that don't match another pattern).
But I know it didn't work in an early Tomcat 3.1 Beta. I haven't checked
the latest Beta version though. If it still doesn't work, please submit
a bug report so that it can be fixed in the final 3.1 version (scheduled
for this week).

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to