struts1 demo
来源:互联网 发布:c语言编辑 编辑:程序博客网 时间:2024/06/06 06:54
直接附上源码 http://download.csdn.net/detail/yongzhian/7965285
核心配置:
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>struts1</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <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> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping></web-app>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd"><struts-config><form-beans><form-bean name="LoginForm" type="com.yza.struts.form.LoginForm"></form-bean></form-beans><global-exceptions /><global-forwards /><action-mappings><action path="/login" name="LoginForm" type="com.yza.struts.action.LoginAction"scope="request" input="/index.jsp"> <forward name="success" path="/success.jsp"></forward></action></action-mappings><message-resources parameter="com.yza.struts.ApplicationResources" /></struts-config>
信息: Initializing composable request processor for module prefix ''
Action有2种execute方法,参数类型不同。
1、public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
和
2、public ActionForward execute(ActionMapping arg0, ActionForm arg1,
ServletRequest arg2, ServletResponse arg3) throws Exception
action 里面要选择第一种方法
0 0
- struts1 demo
- Struts1 demo与笔记
- Struts1之Titles框架 Demo
- Struts1.3.10学习笔记——手写demo登陆
- 学习日记(三)浅识struts1,并搭建框架demo
- struts1
- STRUTS1
- Struts1
- struts1
- struts1
- struts1
- struts1
- Struts1
- struts1
- struts1
- Struts1
- Struts1
- struts1
- 记录一下学习的心路历程
- mysql存储emoji表情
- 【转】android UI 相关常用类简介
- HDU 2141 Can you find it?
- Trie树:应用于统计和排序
- struts1 demo
- SSRS--分页技术篇
- J2EE规范
- C 语言书籍推荐
- 32位和64位操作系统的区别作用
- C++学习笔记(第七章 自定义数据类型 枚举 之一)
- 反射
- Android中onInterceptTouchEvent与onTouchEvent案例
- 简单贪心