struts与servlet共存

  <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>*.jsp</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>*.action</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/com.action/*</url-pattern>
  </filter-mapping>
  <servlet>
    <servlet-name>myServlet</servlet-name>
    <servlet-class>com.function.addGoods</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>myServlet</servlet-name>
    <url-pattern>/function/addGoods</url-pattern>
  </servlet-mapping>

posted @ 2018-07-06 00:15  zhaocundang  阅读(177)  评论(0编辑  收藏  举报