日期:2014-05-19  浏览次数:20617 次

配置<url-pattern>不能正常显示servlet
在web.xml中配置 
<servlet> 
<servlet-name> HelloServlet </servlet-name> 
<servlet-class> HelloServlet </servlet-class> 
</servlet> 
<servlet-mapping> 
<servlet-name> HelloServlet </servlet-name> 
<url-pattern> /Servlet/HelloServlet </url-pattern> 
<servlet-mapping> 
在浏览器中输入http://localhost:8080/store/servlet/HelloServlet 显示404错误
当<url-pattern> /Servlet/HelloServlet </url-pattern> 改成<url-pattern> /HelloServlet </url-pattern> 
就能跳转到请求页面了,怎么回事啊?

------解决方案--------------------
is S = s ?
------解决方案--------------------
http://localhost:8080/store/servlet/HelloServlet
里的servlet写成Servlet
------解决方案--------------------
探讨

http://localhost:8080/store/servlet/HelloServlet
里的servlet写成Servlet

------解决方案--------------------
http://localhost:8080/store/servlet/HelloServlet这个应该是http://localhost:8080/store/Servlet/HelloServlet