Java Open Source Tool series (iii) Struts

Source: Internet
Author: User
What do you think is the biggest difficulty when developing pages with JSP, or where do you find the most inconvenient when you develop them?

In general, logical processing and process control. If you only use JSP script to implement will be more difficult. So we generally use servlet to handle process control, using JavaBean or custom tags to encapsulate logical processing.

And struts is such a framework that encapsulates the details of our servlet and definition JavaBean, providing a unified application interface that facilitates logical processing and process control. And struts also provides a set of custom tags for developers to use.

The entry point for the Struts framework is a servlet, and you need to configure it below under the Web.xml file.

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

<servlet-mapping
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

In this way, all *.do requests will be handled by struts.



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.