struts入门

导入struts支持文件
struts.java
struts-base.java
struts-sy.java

加载web配置

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
  <display-name>struts</display-name>
  <filter>
   <filter-name>struts</filter-name>
   <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
   <filter-name>struts</filter-name>
   <url-pattern>/*</url-pattern>
  </filter-mapping>
</web-app>

**struts-sy.java**

<?xml version="1.0" encoding="UTF-8"?> /success.jsp ```

猜你喜欢

转载自blog.csdn.net/qq_43164918/article/details/83035378