A brief introduction and login example of the Struts1 of Progressive Struts1 (ii) in layers

Source: Internet
Author: User

On the blog from several versions of the servlet example, the issue of page jump control to solve the problem, at the end of the article mentioned Struts1, this article is intended to explain what is Struts1, and how to use the problem.

What is Struts1

To say my understanding: it conforms to the MVC idea, uses the Java two times development encapsulates one framework, the main simplification, solves the page request distribution, the jump question. The advantage of STUTS1 is that the use of a rich configuration file makes the flexibility greatly improved because it has been encapsulated into a framework that shortens development time, improves development efficiency, and uses abstractions in moderation, reducing code redundancy, reduced file redundancy, and simpler maintenance.

Struts1 the interactions of each component are as follows:

It is an open source project, we can delve into the framework of the source code, further understanding of Struts1 and learning its development, encapsulation of ideas, very conducive to the improvement of programming ability.

Login instance

First, take a look at a complete Struts1 login instance, explain the composition by the Struts1 involved in this example, and explain the process of Struts1 execution.

File tree

login.jsp

A simple login authentication interface that validates only the user name and password.

<form action= "login.do" method= "POST" >  
    User: <input type= "text" name= "username"/><br/>  
    password: <input type= "text" name= "password"/><br/> <input "submit"  
    type= "submitted" value=/>  
>

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.