web应用本地实践

搭建一个基于servlet的web应用,必须记住访问的路径是http://localhost:8080/longji-webapp/hello

其中longji-webapp是应用路径,告诉web服务器,路由到指定应用;hello是访问对应servlet的url模式,对应的配置在web.xml中:

  <servlet-mapping>
   <servlet-name>hello</servlet-name>
    <url-pattern>/hello</url-pattern>
  </servlet-mapping>

猜你喜欢

转载自hill007299.iteye.com/blog/1434729
今日推荐