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;
    }

    @Override
    public 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方法  
    @Override
    public 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() + "'";
        // 将查询出的结果放到List
        List<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"?>
<beans
    xmlns="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 consideration
            any 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 bound
            value.</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 put
                into 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 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>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 error
                classes which all implement the MessageSourceResolvable interface. For
                example, 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 error
                messages.</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 (used
            as single argument).</description>
        </attribute>
        <attribute>
            <name>argumentSeparator</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>The separator character to be used for splitting the
            arguments 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 code
            could not be found. If both text and code are not set, the tag will
            output 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 result
            gets 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 are
            page, 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 (used
            as single argument).</description>
        </attribute>
        <attribute>
            <name>argumentSeparator</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
            <description>The separator character to be used for splitting the
            arguments 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 code
            could not be found. If both text and code are not set, the tag will
            output 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 result
            gets 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 are
            page, 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 be
            inspected for errors. If errors are available for this bean, they
            will 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 status
            information for. For instance account.name, company.address.zipCode
            or 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. Overrides
            the 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 appropriate
            custom 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 want
            to have transformed (for instance a Date). Using the PropertyEditor that
            is 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 gets
            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 exported the result to a variable.
            This attribute is only used when var is also set. Possible values are
            page, 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>
    </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="返回登录" onclick="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="注册" onclick="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="返回登录" onclick="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="返回登录" onclick="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框架示例代码,所有代码的下载地址在文章最下方。

并且代码进过了EclipseMyEclpse以及IDEA的测试,只需要稍微修改下就可以随便转换使用。

代码下载地址:点击下载

原文地址:https://www.cnblogs.com/ceet/p/6410199.html