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/06/21 22:49:43 UTC

Re: restricted utilization on "@WebServlet" annotation of Servlet 3.0

Dear Sirs,

> On Thursday, May 26, 2011 1:14 AM
> - From what you have above, "/guess" does not appear to be a valid URL.
> You appear to have lost the context path somewhere.
 This problem has been resolved. In this case, when JSP("guess.jsp") calls 
Servlet("GuessServlet.java"), the absolute path is inevitable in <FORM>.
[guess.jsp]
In form action, the relative path was described and the context path was 
lost. Here, the abosolute path can be available in this calling case by 
dispacher.
<FORM ACTION="/ex4/req.guess">

[GuessServlet.java]
In the servlet program, urlPattern is specified as follows:
@WebServlet(name="GuessServlet", urlPatterns={"/req.guess"})

Regards,
-------------------------------------
Noriko Etani
Kobe Institute of Computing, Japan
Email: etani@kic.ac.jp



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org