站内搜索: 请输入搜索关键词

当前页面: 开发资料首页JSP 专题hai&&web与struts_config与database.properties的配置

hai&&web与struts_config与database.properties的配置

摘要: hai&&web与struts_config与database.properties的配置
<table width="100%" height="92%" border="0" cellpadding="6" cellspacing="0"> <tr> <td height="623" align="left" valign="top" class="content"> struts-config.xml
1.<form-beans>:
(1)定义一个form-bean:(name[可自取]和type[包名.form名])
(2)定义其属性:为formbean 中的属性,指出其名字和灰型
(3)如:
<form-beans>
<form-bean name="partregpro" type="loginForm.PartregisterForm">
<form-property name="partname" type="java.lang.String" />
<form-property name="fatherpart" type="java.lang.int" />
<form-property name="partorder" type="java.lang.int" />
</form-bean>
</form-beans>
2.
(1)根据名称直接跳转:
(2)如:




3.(****)Action Mapping Definitions
(1)input :表单验正失败转入的路径 "/*.jsp"
(2)name : formname
(3)path :指定请求访问的Action的路径 "/*"
(4)type :指Action的完整路径名 包名+ actionname
(5)scope :指actionForm 存入的范围
(6)validate:指是否执行表单验证
(7) 请求转发路径
(**)解析:当对Action进行访问时,通过(3)找到真实路径(4),同时通过(2)(5)将from bean给action,如果validate为true,就将在调用action之前进行验证,如果验证失败就进入(1),如果成功,就跳入(7)所指定网页.
(8)如:
input="/partmanager.jsp"
name="registernewpart"
path="/registernewpart"
type="loginAction.RegisterNewPartAction">


(9)链接池的配置




value="jdbc:oracle:thin:@192.168.100.53:1521:orcl" />









web.xml
(1)为固定

action
org.apache.struts.action.ActionServlet

config
/WEB-INF/struts-config.xml

2

(2)
</tr> </table></td> </tr> </table>
↑返回目录
前一篇: Tomcat5.0-5.5连接池配置指南
后一篇: 在Eclipse3.0.x配置基于STRUTS的WEB开发环境(相关下载)