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框架登录注册相关推荐

  1. 基于Java(SSH 框架)+MySQL 实现的物流配送管理系统【100010488】

    基于 Java 中 SSH 框架的物流配送管理系统 项目各文件介绍 Logistics_Manage_System 项目主文件,也就是该项目你需要导入运行的文件 hibernate_mapping 这 ...

  2. 【JAVA】网页版登录注册系统2.0

    前言 JAVA实现网页的登录与注册2.0版 一.环境的搭建 导入1.0版本的项目Java实现网页版登录注册系统-Java文档类资源-CSDN文库可参考[JAVA]网页版登录注册系统_Lx_Hy_的博客 ...

  3. 【JAVA】网页版登录注册系统

    目录 前言 一.环境的搭建 二.功能实现 1.登录功能 2.注册功能 [注意] 总结 前言 JAVA实现网页的登录与注册 一.环境的搭建 1.创建Maven Web工程,参考[JAVA]Web服务器- ...

  4. 2020/11/13·Java·人脸识别一键登录/注册

    Java·人脸识别一键登录/注册 1.eclipse 和 tomcat 服务器的安装与使用 1.1 Eclipse 的安装 1.2 Eclipse 配置 Tomcat 1.3 新建 Web 项目 1. ...

  5. Java基于SSH框架的银行业务管理系统

    技术:Java.JSP等 摘要: 银行业务管理系统是银行结合国家相关政策和客户需求的一项重要的改革,是信息化时代让客户更好的了解和管理自己的业务以及提高银行业务人员的管理效率,是银行与客户之间的交互多 ...

  6. java通过mysql验证登录注册范例

    package c.test;import java.awt.Container; import java.sql.*; import java.util.*;import javax.swing.R ...

  7. Java基础-22总结登录注册IO版,数据操作流,内存操作流,打印流,标准输入输出流,转换流,随机访问流,合并流,序列化流,Properties...

    你需要的是什么,直接评论留言. 获取更多资源加微信公众号"Java帮帮" (是公众号,不是微信好友哦) 还有"Java帮帮"今日头条号,技术文章与新闻,每日更新 ...

  8. 【Java案例】用户登录注册

    案例介绍: 编写程序实现简单的用户登录注册功能.程序包含以下4个功能: (1)登录功能,用户输入正确的账号密码登录成功: (2)注册功能,输入用户名和密码进行注册: (3)查看功能,查看所有的用户名与 ...

  9. Java Swing 简单的登录注册窗口

    前言 最近在学习Java Swing 写了一个简单的登录注册窗口, 该项目包含了对JFrame的创建,和一些组件的练习并且加入了简单的事件监听和简单的用户名密码判断. 登录和注册的页面只画出来了没有进 ...

最新文章

  1. 求解单源最短路径的几种算法
  2. P2801 教主的魔法(分块入门)
  3. 自动档车正确起步方法,自动挡开车起步7个步骤
  4. unity下载文件三(http异步下载)
  5. 不学无数——SpringBoot入门Ⅷ
  6. eclipse 保存html 提示 save could not be completed
  7. 白话设计模式——Abstract Factory
  8. 如何对聚类结果进行分析_如何更合理地给聚类结果贴标签——由一个挖掘学生用户的项目说开去...
  9. Mac 10.12连接iSCSI硬盘软件iSCSI Initiator X
  10. springboot 文件服务器_spring boot还不了解?一份spring boot实战文档送给你
  11. Fiddler笔记一移动端连接
  12. mysql 分库外置索引,MySQL的分库分表与Innodb的Btree索引
  13. 都2021年了,不会还有人连深度学习都不了解吧(七)- 评估指标篇
  14. 哈工大网络安全实验二报告
  15. Guitar Pro新手入门教程
  16. linux下配置内网ip
  17. Linux数独小游戏C语言,C语言数独游戏的求解方法
  18. 设为主页代码及添加到收藏夹代码大全
  19. 锚点实现回到顶部的操作
  20. android apk 应用分发平台

热门文章

  1. 【牛客 - 297B】little w and Sum(水题,前缀和)
  2. 【51Nod - 1117 】聪明的木匠 (贪心,哈夫曼树,时光倒流)
  3. Windows共享Linux打印机,linux – 如何为cups客户端构建windows共享打印机的url
  4. oracle idl_ub1$,system表空间急剧增大原因分析
  5. php中获取本月第二天,php第二天
  6. linux php oauth安装,Linux php 扩展安装 mongo ,redis ,soap,imap,pdo_mysql,oauth
  7. 使用三种方式创建Class字节码类文件对象
  8. 剑指offer之从上到下打印二叉树
  9. C++ 泛型编程(一):模板基础:函数模板、类模板、模板推演成函数的机制、模板实例化、模板匹配规则
  10. Date类(日期时间类)219