Hibernate3 Spring3 Struts1

Source: Internet
Author: User

Company recently to the OA project, SB supplier with the Hibernate Spring STRUTS1 Framework, and then on the basis of the three framework to expand their own technology, SB supplier development is an old fritters, dragged with a 2,580,001-like, no matter what, all indifferent, You can only set a simple frame to practice practiced hand.

Web. xml file


<?xml version= "1.0" encoding= "UTF-8"?>

<web-app xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns= "Http://Java.sun.com/xml/ns/j2ee" xmlns: Javaee= "Http://xmlns.jcp.org/xml/ns/javaee" xmlns:web= "Http://xmlns.jcp.org/xml/ns/javaee" xsi:schemalocation= " HTTP://JAVA.SUN.COM/XML/NS/J2EE http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://xmlns.jcp.org/xml/ns/ Java ee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd "id=" starter "version=" 2.4 ">

<display-name>user management</display-name>

<listener>

<listener-class>

Org.springframework.web.context.ContextLoaderListener

</listener-class>

</listener>

<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>

/web-inf/applicationcontext.xml

</param-value>

</context-param>

<listener>

<listener-class>org.springframework.web.util.log4jconfiglistener

</listener-class>

</listener>

<context-param>

<param-name>log4jConfigLocation</param-name>

<param-value>classpath:config/log4j.properties</param-value>

</context-param>


<filter>

<filter-name>characterEncoding</filter-name>

<filter-class>org.springframework.web.filter.characterencodingfilter

</filter-class>

<init-param>

<param-name>encoding</param-name>

<param-value>UTF-8</param-value>

</init-param>

<init-param>

<param-name>forceEncoding</param-name>

<param-value>true</param-value>

</init-param>

</filter>

<filter-mapping>

<filter-name>characterEncoding</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

<servlet>

<servlet-name>action</servlet-name>

<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

<init-param>

<param-name>config</param-name>

<param-value>/WEB-INF/struts-config.xml</param-value>

</init-param>

<load-on-startup>0</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>action</servlet-name>

<url-pattern>*.do</url-pattern>

</servlet-mapping>

<session-config>

<session-timeout>30</session-timeout>

</session-config>

<welcome-file-list>

<welcome-file>/index.jsp</welcome-file>

</welcome-file-list>

</web-app>



Struts-config.xml


<?xml version= "1.0" encoding= "UTF-8"?>

<! DOCTYPE struts-config Public "-//apache software foundation//dtd struts Configuration 1.2//en"

"Http://struts.apache.org/dtds/struts-config_1_2.dtd" >


<struts-config>

<form-beans>

<form-bean name= "LoginForm" type= "Com.nubia.ss1h.pojo.LoginForm" >

<form-property name= "user" type= "Com.nubia.ss1h.pojo.User" ></form-property>

</form-bean>

</form-beans>


<action-mappings>

<action path= "/login" type= "com.nubia.ss1h.action.LoginAction" name= "LoginForm" >

<forward name= "loginsuccess" path= "/loginsuccess.jsp" ></forward>

<forward name= "Loginfailure" path= "/loginfailure.jsp" ></forward>

</action>

</action-mappings>

<controller processorclass= "Org.springframework.web.struts.DelegatingRequestProcessor"/>

</struts-config>


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/80/1E/wKiom1c4Oj7wtgLjAAAypamAmck106.png "title=" R2rks1yt{bk6z8pb0wb%r[e.png "alt=" Wkiom1c4oj7wtgljaaaypamamck106.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/1E/wKiom1c4OsuxZ59OAAAmMAtq0SI502.png "title=" [{d]~i {8t[vi%[qm%7~ @E6C. png "alt=" Wkiom1c4osuxz59oaaammatq0si502.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/1B/wKioL1c4O_nxh3fYAAAKDPtgZjw594.png "title=" Qw_ Mrx8}kur2iec7dp~h ' 3k.png "alt=" Wkiol1c4o_nxh3fyaaakdptgzjw594.png "/>

Unlike Struts2, you have to configure the action in the Apllication.xml file.



Hibernate3 Spring3 Struts1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.