struts1.3.10配置
来源:互联网 发布:java高级特性 编辑:程序博客网 时间:2024/05/18 01:24
1.在官网下载http://struts.apache.org/
2.将lib下的jar拷贝到项目中
3.将ActionServlet配置到web.xml中
<servlet><servlet-name>action</servlet-name><servlet-class>org.apache.struts.action.ActionServlet</servlet-class><init-param><param-name>config</param-name><param-value>/WEB-INF/struts-config.xml</param-value></init-param><load-on-startup>2</load-on-startup></servlet><servlet-mapping><servlet-name>action</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping>
4.配置struts-config.xml,包括<form-beans>, <actionmappings>
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd"><struts-config><form-beans><form-bean name="testBean" type="org.apache.struts.action.DynaActionForm"><form-property name="cause" type="java.lang.String"/></form-bean></form-beans><action-mappings><action path="/test" type="com.web.action.TestAction" name="testBean"validate="false"scope="request"> <forward name="success" path="/jsp/test.jsp"/> <forward name="fail" path="/index.jsp"/></action></action-mappings><message-resources parameter="MessageResources" /></struts-config>
5.JSP页面使用jstl标签
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
- struts1.3.10配置
- struts1.3.10配置
- Struts1 配置
- struts1 配置
- struts1配置
- struts1配置
- struts1配置
- struts1.3.10项目中mysql数据源配置
- struts1.2配置详细
- struts1.2_web配置
- struts1.2_validation配置
- struts1读取配置。
- struts1的配置
- struts1.2配置详解
- struts1的配置详解
- Struts1.2配置详解
- struts1配置动态actionForm
- Struts1 配置入门
- ubuntu_逆向工程
- Oracle做为服务自动启动
- 关于activity的4中启动方式
- JS日期格式化
- sizeof的使用细节
- struts1.3.10配置
- windows or ubuntu登录服务器传送文件和run code
- php stdin stdout处理
- How To Become A Hacker
- 利用DisplayMetrics获取屏幕信息
- 关于ViewFlipper自动播放更新状态的问题
- VM上Ubuntu与Host Windows7共享文件夹
- M/KB/byte之间的转换
- Automated Test Generation for Access Control Policies via Change-Impact Analysis