You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kerotan <ke...@kcn.ne.jp> on 2011/05/24 19:25:29 UTC

restricted utilization on "@WebServlet" annotation of Servlet 3.0

Dear Sirs,

--------------------
Tomcat 7.0.14
Servlet 3.0
Windows XP SP3 x86版
--------------------
My servlet programs with "@WebServlet" annotation have three problems as 
follows:
1. A servlet program with "@WebServlet" 
annotation(@WebServlet(name="HelloServlet", urlPatterns={"/hello"}))
 cantnot be called from a browser with "http://localhost:8080/test/hello".
2.When there are two servlet programs which have the same file name in the 
different packages, a servlet program cannot work with the different 
urlPatterns in "@WebServer" annotation. In order to make the program work, 
the different file name is required.
3.A servlet program can be called by JSP program and it can call the same 
JSP program. However, the same JSP program cannot call the same servlet 
program again because "urlPatters" of the servlet program cannot be read.

Are these usages are correct under the present implementation of Servlet 
3.0.. Or please tell me a technique to follow the specification of Servlet 
3.0..

Regards
********************************
Noriko Etani
Kobe Institute of Computing, Japan
Email: etani@kic.ac.jp/kerotan@kcn.ne.jp
********************************