JAVA的SSH框架登录注册
生活随笔
收集整理的這篇文章主要介紹了
JAVA的SSH框架登录注册
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Struts 的MVC設計模式可以使我們的邏輯變得很清晰,主要負責表示層的顯示。
Spring 的IOC和AOP可以使我們的項目在最大限度上解藕。
hibernate的就是實體對象的持久化了, 數據庫的封裝。
?
?
?
項目截圖:(代碼是按照項目截圖上傳的,直接對號入座即可)
?
?
此次代碼是在Eclipse下部署的SSH框架示例代碼,所有代碼的下載地址在文章最下方。
并且代碼進過了Eclipse和MyEclpse以及IDEA的測試,只需要稍微修改下就可以隨便轉換使用。
?
接下來是貼出的代碼:
?
package com.softeem.action;import com.opensymphony.xwork2.ActionSupport; import com.softeem.pojo.User; import com.softeem.service.UserService;public class LoginAction extends ActionSupport{private static final long serialVersionUID = 1L;private User user;// 注入Service,生成Set和Get方法private UserService userservice;public User getUser() {return user;}public void setUser(User user) {this.user = user;}public UserService getUserservice() {return userservice;}public void setUserservice(UserService userservice) {this.userservice = userservice;}@Overridepublic String execute() throws Exception {boolean flag = userservice.findUser(user);if(flag){// 如果登錄成功,返回登錄成功頁面return SUCCESS;}else{// 否則,返回失敗頁面return INPUT;}} } package com.softeem.action; import com.opensymphony.xwork2.ActionSupport; import com.softeem.pojo.User; import com.softeem.service.UserService;public class RegistAction extends ActionSupport{private static final long serialVersionUID = 1L;private User user;// 注入Service,生成SET和GET方法private UserService userservice;public User getUser() {return user;}public void setUser(User user) {this.user = user;}public UserService getUserservice() {return userservice;}public void setUserservice(UserService userservice) {this.userservice = userservice;}// execute方法 @Overridepublic String execute() throws Exception {this.userservice.saveUser(this.user);//注冊成功,返回注冊成功頁面 return SUCCESS;} } package com.softeem.dao;import com.softeem.pojo.User;public interface UserDAO {// 聲明增加和查找方法public void saveUser(User user);public User findUser(User user); } package com.softeem.dao.Impl;import java.util.List; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import com.softeem.dao.UserDAO; import com.softeem.pojo.User;public class UserDAOImpl extends HibernateDaoSupport implements UserDAO{// 增加用戶public void saveUser(User user){this.getHibernateTemplate().save(user);}// 查詢驗證用戶是否存在public User findUser(User user){User firstuser = new User();// HQL查詢語句String hql = "from User user where user.username='" + user.getUsername() + "' and user.password= '" + user.getPassword() + "'";// 將查詢出的結果放到ListList<User> userlist = this.getHibernateTemplate().find(hql);// 判斷是否有查詢結果,換句話說就是判斷用戶是否存在if(userlist.size()>0){//取出查詢結果的第一個值,理論上數據庫是沒有重復的用戶信息firstuser = userlist.get(0);}return firstuser;} } package com.softeem.pojo;public class User {private int user_id;private String username;private String password;public int getUser_id() {return user_id;}public void setUser_id(int user_id) {this.user_id = user_id;}public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;} } <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"><hibernate-mapping><class name="com.softeem.pojo.User" table="user"><id name="user_id" type="java.lang.Integer" column="user_id"><!-- 主鍵生成策略 --><generator class="increment"></generator></id><property name="username" type="string" column="username" length="50"></property><property name="password" type="string" column="password" length="50"></property></class> </hibernate-mapping> package com.softeem.service;import com.softeem.pojo.User;public interface UserService {// 聲明增加和查找方法public void saveUser(User user);public boolean findUser(User user); } package com.softeem.service.Impl;import com.softeem.dao.UserDAO; import com.softeem.pojo.User; import com.softeem.service.UserService;public class UserServiceImpl implements UserService{// 注入DAO,生成GET和SET方法private UserDAO userdao;public UserDAO getUserdao() {return userdao;}public void setUserdao(UserDAO userdao) {this.userdao = userdao;}// 保存用戶信息public void saveUser(User user){this.userdao.saveUser(user);}// 查找驗證用戶信息public boolean findUser(User user){User firstuser = this.userdao.findUser(user);// 在UserDAO查詢中已經判斷了只有當用戶名和密碼都存在時才返回firstuser // 所以在這里只用判斷firstuser里面用戶名或者密碼中的一個是否存在就可以了if(firstuser.getUsername()!=null){return true;}else{return false;}} } <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC"-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><!-- Generated by MyEclipse Hibernate Tools. --> <hibernate-configuration><session-factory></session-factory></hibernate-configuration> <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN""http://struts.apache.org/dtds/struts-2.0.dtd"><struts><package name="user" extends="struts-default"><!-- class="RegistAction"與applicationContext.xml中的id對應 --><action name="regist" class="RegistAction"><result>/RegistSuccess.jsp</result></action><action name="login" class="LoginAction"><result name="success">/success.jsp</result><result name="input">/input.jsp</result></action></package> </struts> <?xml version="1.0" encoding="UTF-8"?> <beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"><!-- dbcp連接池 --><bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"><property name="driverClassName" value="com.mysql.jdbc.Driver"></property><property name="url" value="jdbc:mysql://localhost:3306/user"></property><property name="username" value="root"></property><property name="password" value="root"></property><!-- 最大連接數 --><property name="maxActive" value="100"></property><!-- 最大可空閑連接數 --><property name="maxIdle" value="30"></property><!-- 最大等待連接 --><property name="maxWait" value="500"></property><!-- 事務提交,true代表自動提交事物 --><property name="defaultAutoCommit" value="true"></property></bean><bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><property name="dataSource" ref="dataSource"></property><property name="hibernateProperties"><props><prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop><prop key="hibernate.show_sql">true</prop></props></property><property name="mappingResources"><list><value>com/softeem/pojo/User.hbm.xml</value></list></property></bean><bean id="UserDAO" class="com.softeem.dao.Impl.UserDAOImpl" scope="singleton"><property name="sessionFactory"><ref bean="sessionFactory"/></property></bean><bean id="UserService" class="com.softeem.service.Impl.UserServiceImpl"><property name="userdao" ref="UserDAO"></property></bean><bean id="RegistAction" class="com.softeem.action.RegistAction" scope="prototype"><property name="userservice" ref="UserService"></property></bean><bean id="LoginAction" class="com.softeem.action.LoginAction" scope="prototype"><property name="userservice" ref="UserService"></property></bean> </beans> <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"><taglib><tlib-version>2.0</tlib-version><jsp-version>1.2</jsp-version><short-name>form</short-name><uri>http://www.springframework.org/tags/form</uri><description>Spring Framework JSP Form Tag Library</description><!-- <form:form/> tag --><tag><name>form</name><tag-class>org.springframework.web.servlet.tags.form.FormTag</tag-class><body-content>JSP</body-content><description>Renders an HTML 'form' tag and exposes a binding path to inner tags for binding.</description><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>name</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute - added for backwards compatibility cases</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><!-- Form specific attributes --><attribute><name>commandName</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Name of the attribute under which the command name is exposed.Defaults to 'command'.</description></attribute><attribute><name>action</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Required Attribute</description></attribute><attribute><name>method</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>enctype</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>onsubmit</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onreset</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute></tag><!-- <form:input/> tag --><tag><name>input</name><tag-class>org.springframework.web.servlet.tags.form.InputTag</tag-class><body-content>empty</body-content><description>Renders an HTML 'input' tag with type 'text' using the bound value.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to property for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssErrorClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>disabled</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onfocus</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onblur</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onchange</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>accesskey</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><!-- 'input(text)' specific attributes --><attribute><name>size</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>maxlength</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>alt</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>onselect</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>readonly</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will make the HTML element readonly.</description></attribute><attribute><name>autocomplete</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Common Optional Attribute</description></attribute></tag><!-- <form:password/> --><tag><name>password</name><tag-class>org.springframework.web.servlet.tags.form.PasswordInputTag</tag-class><body-content>empty</body-content><description>Renders an HTML 'input' tag with type 'password' using the bound value.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to property for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssErrorClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>disabled</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onfocus</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onblur</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onchange</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>accesskey</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><!-- 'input(text)' specific attributes --><attribute><name>size</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>maxlength</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>alt</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>onselect</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>readonly</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will make the HTML element readonly.</description></attribute><attribute><name>autocomplete</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Common Optional Attribute</description></attribute><!-- 'input(password)' specific attributes --><attribute><name>showPassword</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Is the password value to be shown? Defaults to false.</description></attribute></tag><!-- <form:hidden/> --><tag><name>hidden</name><tag-class>org.springframework.web.servlet.tags.form.HiddenInputTag</tag-class><body-content>empty</body-content><description>Renders an HTML 'input' tag with type 'hidden' using the bound value.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to property for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute></tag><!-- <form:select/> --><tag><name>select</name><tag-class>org.springframework.web.servlet.tags.form.SelectTag</tag-class><body-content>JSP</body-content><description>Renders an HTML 'select' element. Supports databinding to the selected option.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to property for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssErrorClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>disabled</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onfocus</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onblur</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onchange</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>accesskey</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><!-- 'select' specific attributes --><attribute><name>items</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The Collection, Map or array of objects used to generate the inner 'option' tags</description></attribute><attribute><name>itemValue</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Name of the property mapped to 'value' attribute of the 'option' tag</description></attribute><attribute><name>itemLabel</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Name of the property mapped to the inner text of the 'option' tag</description></attribute><attribute><name>size</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>multiple</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute></tag><!-- <form:option/> --><tag><name>option</name><tag-class>org.springframework.web.servlet.tags.form.OptionTag</tag-class><body-content>JSP</body-content><description>Renders a single HTML 'option'. Sets 'selected' as appropriate based on bound value.</description><variable><name-given>value</name-given><variable-class>java.lang.Object</variable-class><description>The actual value bound to the 'value' attribute</description></variable><variable><name-given>displayValue</name-given><variable-class>java.lang.String</variable-class><description>The String representation of thr value bound to the 'value' attribute, taking into considerationany PropertyEditor associated with the enclosing 'select' tag.</description></variable><attribute><name>value</name><required>true</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>label</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>disabled</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description></attribute></tag><!-- <form:options/> --><tag><name>options</name><tag-class>org.springframework.web.servlet.tags.form.OptionsTag</tag-class><body-content>empty</body-content><description>Renders a list of HTML 'option' tags. Sets 'selected' as appropriate based on boundvalue.</description><attribute><name>items</name><required>true</required><rtexprvalue>true</rtexprvalue><description>The Collection, Map or array of objects used to generate the inner 'option' tags</description></attribute><attribute><name>itemValue</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Name of the property mapped to 'value' attribute of the 'option' tag</description></attribute><attribute><name>itemLabel</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Name of the property mapped to the inner text of the 'option' tag</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute></tag><!-- <form:radiobutton/> --><tag><name>radiobutton</name><tag-class>org.springframework.web.servlet.tags.form.RadioButtonTag</tag-class><body-content>empty</body-content><description>Renders an HTML 'input' tag with type 'radio'.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to property for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssErrorClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>disabled</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onfocus</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onblur</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onchange</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>accesskey</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><!-- radio button specific attributes --><attribute><name>value</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute></tag><!-- <form:checkbox/> --><tag><name>checkbox</name><tag-class>org.springframework.web.servlet.tags.form.CheckboxTag</tag-class><body-content>empty</body-content><description>Renders an HTML 'input' tag with type 'checkbox'.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to property for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssErrorClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>disabled</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onfocus</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onblur</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onchange</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>accesskey</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><!-- checkbox specific attributes --><attribute><name>value</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute</description></attribute></tag><!-- <form:textarea/> --><tag><name>textarea</name><tag-class>org.springframework.web.servlet.tags.form.TextareaTag</tag-class><body-content>empty</body-content><description>Renders an HTML 'textarea'.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to property for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssErrorClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>disabled</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onfocus</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onblur</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onchange</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>accesskey</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><!-- 'textarea' specific attributes --><attribute><name>rows</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Required Attribute</description></attribute><attribute><name>cols</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Required Attribute</description></attribute><attribute><name>onselect</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>readonly</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will make the HTML element readonly.</description></attribute></tag><!-- <form:errors/> --><tag><name>errors</name><tag-class>org.springframework.web.servlet.tags.form.ErrorsTag</tag-class><body-content>JSP</body-content><description>Renders field errors in an HTML 'span' tag.</description><variable><name-given>messages</name-given><variable-class>java.util.List</variable-class></variable><attribute><name>path</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Path to errors object for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>delimiter</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Delimiter for displaying multiple error messages. Defaults to the br tag.</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>element</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Specifies the HTML element that is used to render the enclosing errors.</description></attribute></tag><!-- <form:label/> --><tag><name>label</name><tag-class>org.springframework.web.servlet.tags.form.LabelTag</tag-class><body-content>JSP</body-content><description>Renders a form field label in an HTML 'label' tag.</description><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Path to errors object for data binding</description></attribute><attribute><name>id</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Enable/disable HTML escaping of rendered values.</description></attribute><attribute><name>for</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>cssClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute.</description></attribute><attribute><name>cssErrorClass</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "class" - HTML Optional Attribute. Used only when errors are present.</description></attribute><attribute><name>cssStyle</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Equivalent to "style" - HTML Optional Attribute</description></attribute><attribute><name>lang</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>title</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>dir</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>tabindex</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Standard Attribute</description></attribute><attribute><name>onclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>ondblclick</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousedown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseover</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmousemove</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onmouseout</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeypress</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeyup</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute><attribute><name>onkeydown</name><required>false</required><rtexprvalue>true</rtexprvalue><description>HTML Event Attribute</description></attribute></tag></taglib> <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"><taglib><tlib-version>2.0</tlib-version><jsp-version>1.2</jsp-version><short-name>spring</short-name><uri>http://www.springframework.org/tags</uri><description>Spring Framework JSP Tag Library</description><tag><name>htmlEscape</name><tag-class>org.springframework.web.servlet.tags.HtmlEscapeTag</tag-class><body-content>JSP</body-content><description>Sets default HTML escape value for the current page.Overrides a "defaultHtmlEscape" context-param in web.xml, if any.</description><attribute><name>defaultHtmlEscape</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Set the default value for HTML escaping, to be putinto the current PageContext.</description></attribute></tag><tag><name>escapeBody</name><tag-class>org.springframework.web.servlet.tags.EscapeBodyTag</tag-class><body-content>JSP</body-content><description>Escapes its enclosed body content, applying HTML escaping and/or JavaScript escaping.The HTML escaping flag participates in a page-wide or application-wide setting(i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).</description><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set HTML escaping for this tag, as boolean value. Overrides thedefault HTML escaping setting for the current page.</description></attribute><attribute><name>javaScriptEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set JavaScript escaping for this tag, as boolean value.Default is false.</description></attribute></tag><tag><name>message</name><tag-class>org.springframework.web.servlet.tags.MessageTag</tag-class><body-content>JSP</body-content><description>Retrieves the message with the given code, or text if code isn't resolvable.The HTML escaping flag participates in a page-wide or application-wide setting(i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).</description><attribute><name>message</name><required>false</required><rtexprvalue>true</rtexprvalue><description>A MessageSourceResolvable argument (direct or through JSP EL).Fits nicely when used in conjunction with Spring's own validation errorclasses which all implement the MessageSourceResolvable interface. Forexample, this allows you to iterate over all of the errors in a form,passing each error (using a runtime expression) as the value of this'message' attribute, thus effecting the easy display of such errormessages.</description></attribute><attribute><name>code</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The code (key) to use when looking up the message.If code is not provided, the text attribute will be used.</description></attribute><attribute><name>arguments</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set optional message arguments for this tag, as a(comma-)delimited String (each String argument can contain JSP EL),an Object array (used as argument array), or a single Object (usedas single argument).</description></attribute><attribute><name>argumentSeparator</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The separator character to be used for splitting thearguments string value; defaults to a 'comma' (',').</description></attribute><attribute><name>text</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Default text to output when a message for the given codecould not be found. If both text and code are not set, the tag willoutput null.</description></attribute><attribute><name>var</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The string to use when binding the result to the page,request, session or application scope. If not specified, the resultgets outputted to the writer (i.e. typically directly to the JSP).</description></attribute><attribute><name>scope</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The scope to use when exporting the result to a variable.This attribute is only used when var is also set. Possible values arepage, request, session and application.</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set HTML escaping for this tag, as boolean value.Overrides the default HTML escaping setting for the current page.</description></attribute><attribute><name>javaScriptEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set JavaScript escaping for this tag, as boolean value. Default is false.</description></attribute></tag><tag><name>theme</name><tag-class>org.springframework.web.servlet.tags.ThemeTag</tag-class><body-content>JSP</body-content><description>Retrieves the theme message with the given code, or text if code isn't resolvable.The HTML escaping flag participates in a page-wide or application-wide setting(i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).</description><attribute><name>message</name><required>false</required><rtexprvalue>true</rtexprvalue><description>A MessageSourceResolvable argument (direct or through JSP EL).</description></attribute><attribute><name>code</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The code (key) to use when looking up the message.If code is not provided, the text attribute will be used.</description></attribute><attribute><name>arguments</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set optional message arguments for this tag, as a(comma-)delimited String (each String argument can contain JSP EL),an Object array (used as argument array), or a single Object (usedas single argument).</description></attribute><attribute><name>argumentSeparator</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The separator character to be used for splitting thearguments string value; defaults to a 'comma' (',').</description></attribute><attribute><name>text</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Default text to output when a message for the given codecould not be found. If both text and code are not set, the tag willoutput null.</description></attribute><attribute><name>var</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The string to use when binding the result to the page,request, session or application scope. If not specified, the resultgets outputted to the writer (i.e. typically directly to the JSP).</description></attribute><attribute><name>scope</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The scope to use when exporting the result to a variable.This attribute is only used when var is also set. Possible values arepage, request, session and application.</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set HTML escaping for this tag, as boolean value.Overrides the default HTML escaping setting for the current page.</description></attribute><attribute><name>javaScriptEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set JavaScript escaping for this tag, as boolean value. Default is false.</description></attribute></tag><tag><name>hasBindErrors</name><tag-class>org.springframework.web.servlet.tags.BindErrorsTag</tag-class><body-content>JSP</body-content><description>Provides Errors instance in case of bind errors.The HTML escaping flag participates in a page-wide or application-wide setting(i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).</description><variable><name-given>errors</name-given><variable-class>org.springframework.validation.Errors</variable-class></variable><attribute><name>name</name><required>true</required><rtexprvalue>true</rtexprvalue><description>The name of the bean in the request, that needs to beinspected for errors. If errors are available for this bean, theywill be bound under the 'errors' key.</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set HTML escaping for this tag, as boolean value.Overrides the default HTML escaping setting for the current page.</description></attribute></tag><tag><name>nestedPath</name><tag-class>org.springframework.web.servlet.tags.NestedPathTag</tag-class><body-content>JSP</body-content><description>Sets a nested path to be used by the bind tag's path.</description><variable><name-given>nestedPath</name-given><variable-class>java.lang.String</variable-class></variable><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>Set the path that this tag should apply. E.g. 'customer'to allow bind paths like 'address.street' rather than'customer.address.street'.</description></attribute></tag><tag><name>bind</name><tag-class>org.springframework.web.servlet.tags.BindTag</tag-class><body-content>JSP</body-content><description>Provides BindStatus object for the given bind path.The HTML escaping flag participates in a page-wide or application-wide setting(i.e. by HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).</description><variable><name-given>status</name-given><variable-class>org.springframework.web.servlet.support.BindStatus</variable-class></variable><attribute><name>path</name><required>true</required><rtexprvalue>true</rtexprvalue><description>The path to the bean or bean property to bind statusinformation for. For instance account.name, company.address.zipCodeor just employee. The status object will exported to the page scope,specifically for this bean or bean property</description></attribute><attribute><name>ignoreNestedPath</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set whether to ignore a nested path, if any. Default is to not ignore.</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set HTML escaping for this tag, as boolean value. Overridesthe default HTML escaping setting for the current page.</description></attribute></tag><tag><name>transform</name><tag-class>org.springframework.web.servlet.tags.TransformTag</tag-class><body-content>JSP</body-content><description>Provides transformation of variables to Strings, using an appropriatecustom PropertyEditor from BindTag (can only be used inside BindTag).The HTML escaping flag participates in a page-wide or application-wide setting(i.e. by HtmlEscapeTag or a 'defaultHtmlEscape' context-param in web.xml).</description><attribute><name>value</name><required>true</required><rtexprvalue>true</rtexprvalue><description>The value to transform. This is the actual object you wantto have transformed (for instance a Date). Using the PropertyEditor thatis currently in use by the 'spring:bind' tag.</description></attribute><attribute><name>var</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The string to use when binding the result to the page,request, session or application scope. If not specified, the result getsoutputted to the writer (i.e. typically directly to the JSP).</description></attribute><attribute><name>scope</name><required>false</required><rtexprvalue>true</rtexprvalue><description>The scope to use when exported the result to a variable.This attribute is only used when var is also set. Possible values arepage, request, session and application.</description></attribute><attribute><name>htmlEscape</name><required>false</required><rtexprvalue>true</rtexprvalue><description>Set HTML escaping for this tag, as boolean value. Overridesthe default HTML escaping setting for the current page.</description></attribute></tag></taglib> <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"><filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern></filter-mapping><welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener></web-app> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>對不起,登錄失敗!</title><script>function jumpToLogin(){document.location.href="login.jsp";}</script> </head><body><p>對不起,登錄失敗,帳號或者密碼錯誤!請重新登錄!</p><br><input type="button" value="返回登錄" οnclick="jumpToLogin()"/> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>用戶登錄</title><script>function jumpToRegist(){document.location.href="regist.jsp";}</script> </head><body><s:form action="login" method="post"><table><tr><td>用戶:<input type="text" name="user.username"/></td></tr><tr><td>密碼:<input type="password" name="user.password"/></td></tr><tr><td><input type="submit" value="登錄"/></td><td><input type="button" value="注冊" οnclick="jumpToRegist()"/></td></tr></table></s:form> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>regist</title><script>function jumpToLogin(){document.location.href="login.jsp";}</script> </head><body><s:form action="regist" method="post"><table><tr><td>用戶:<input type="text" name="user.username"/></td></tr><tr><td>密碼:<input type="password" name="user.password"/></td></tr><tr><td><input type="submit" value="注冊"/></td><td><input type="button" value="返回登錄" οnclick="jumpToLogin()"/></td></tr></table></s:form> </body> </html> <%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>注冊成功</title><script> function jumpToLogin(){ document.location.href="login.jsp"; } </script> </head> <body>注冊成功!<br><input type="button" value="返回登錄" οnclick="jumpToLogin()"/> </body> </html> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>登錄成功</title> </head> <body>登錄成功! </body> </html>此次代碼是在Eclipse下部署的SSH框架示例代碼,所有代碼的下載地址在文章最下方。
并且代碼進過了Eclipse和MyEclpse以及IDEA的測試,只需要稍微修改下就可以隨便轉換使用。
代碼下載地址:點擊下載
轉載于:https://www.cnblogs.com/ceet/p/6410199.html
總結
以上是生活随笔為你收集整理的JAVA的SSH框架登录注册的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HTML5学习笔记四: 列表, 块和布局
- 下一篇: 使用VS2010编译Qt 5.6.1过程