Servlet+JSP 对外访问路径配置

servlet类似

servlet配置为:

 <servlet>
    <servlet-name>Demo01_OutWrite</servlet-name>
    <servlet-class>com.cjq.response.Demo01_OutWrite</servlet-class>
  </servlet>

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

 

jsp配置对外访问路径

  <servlet>
  <servlet-name>forward</servlet-name>
  <jsp-file>/jsp_Tag/forward.jsp</jsp-file>
  </servlet>
  <servlet-mapping>
  <servlet-name>forward</servlet-name>
  <url-pattern>/forward/*</url-pattern>
  </servlet-mapping>

 

相差点就是<servlet-class>  改成<jsp-file>

posted @ 2018-06-06 17:47  小江。  阅读(472)  评论(0编辑  收藏  举报