Java Basics: Struts Framework beginners from here to get started

Source: Internet
Author: User
Tags html tags java web
j2ee| Beginners

Overview:

1, struts is the use of Java servlet/javaserver Pages technology, the development of Web applications open source framework.

2, using struts can develop the application framework based on MVC (Model-view-controller) design pattern.

3. Download Address: http://jakarta.apache.org/struts

Background:

1, struts was first as an integral part of the Apache Jakarta Project operation. The creator of the project hopes to improve and improve the Java Server Pages, Servlet, Tag library, and object-oriented technical standards through research on the project.

2. The name struts comes from the supporting metal racks used in buildings and old airplanes. It is designed to reduce the time it uses to develop Web applications using the MVC design model.

Function:

1. Contains a controller servlet that sends a user's request to the appropriate action object.

2. JSP free Tag Library, and provides associated support in the controller servlet to help developers create interactive form applications.

3. Provides a series of practical objects: XML processing, automatic processing of JavaBeans attributes via Java Reflection APIs, internationalization hints and messages.

Learn MORE:

Like Tomcat, turbine and many other Apache projects, struts is open source software, which is a great advantage for developers to get a deeper understanding of their internal implementation mechanisms.

In addition, the advantages of struts are mainly embodied in two aspects: Taglib and page navigation. Taglib is a marker library of struts, which can greatly improve the development efficiency by using flexibly. In addition, the current domestic JSP developers, in addition to the use of JSP with the common tag, rarely develop their own tags, perhaps struts is a good starting point.

About page navigation, I think that will be the future direction of development, in fact, this makes the system's context clearer. Through a configuration file, you can grasp the whole system of the relationship between the parts, which for the maintenance of the latter has great benefits. This is especially true when another group of developers takes over the project.

How to learn struts:

The importance of struts is the eight elements in Struts_config.xml, and you can focus here.

Second, the tags in struts are focused: HTML tags, bean tags, and logic tags, so you can use struts to develop Web applications.

The HTML tags in struts are similar to ordinary HTML tags, and people who are generally web based have very fast control. The reason why this tag is used is because struts's submit form action is bundled with this tag , and must be used.

The bean label is prepared for form forms, and VO in Modu2 can use forms in struts to work with form submissions, information storage, and information display.

The logic tag is used to traverse the list collection that is returned from the action (easy to use). Don't write Java statements like <%%> on the page.

In general, the label is mostly to simplify the page code, or even page 0 code, so that looks neat, easy to maintain and art.

Of the three frameworks, it is recommended to write struts, post hibernate, and finally touch spring.

Recommended struts Information:

"Mastering struts: Java Web design and development based on MVC" is good.



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.