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=/>
>