The value of the Action property of the form label in the JSP form __js

Source: Internet
Author: User

The value of the action attribute of the form label in the JSP form, which is the path to the method in the Action Class (path), is known to be related to the path in struts's configuration file, which has the code to load the struts profile in Web.xml, as follows:

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

If you have multiple struts profiles in a project, you'll have to add <init-param> properties to the Web.xml file, such as:

<init-param>
<param-name>config/videoReport</param-name>
<param-value>/WEB-INF/struts-video-report-cfg.xml</param-value>
</init-param>

Path is also related to the <param-name> value configured in the Web.xml file, such as: <%=basepath%>videoreport/videoreport.do.

There's also a question of whether <param-name> 's value requires config before.

Related Article

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.