Web.xml and struts-config.xml configuration

xiaoxiao2021-03-06  17

Struts application configuration: Previous article told Controller, but I found that the other content in Jakarta Struts has been forgotten, the ancients: Wen, knowing new, let me review the front chapter to review here to configure There are two files, one is web.xml, the other is struts-config.xml 1. Configure web.xml1 for Struts, configure the ActionServlet (Only One), so that all requests received by the application are divided into two steps. A: Use the servlet element to configure the servlet instance, do servlet-mapping storefront fully qualified class name < / servlet> storefront *. do 2, configuration initialization Parameters: init-param, indicating config: defaults to /Web-inf/Struts-config / ... from the additional struts configuration file Plus in the NPT Sub1debug: Servlet debug Details Details DetailConvertHack 3, You must configure the tag library used by the identifying a web application when using the tag library provided by Struts, must be valid < Taglib-Location> Specifies the location 4, configured in the web app, but incomplete URL, DEFAULT RESOURCE used by the incomplete URL; does not use the servlet map There is no / symbol 5, Second, Struts Profile ApplicationConfig: Contains all information in the struts configuration file 1, 2, 3, 4,

转载请注明原文地址:https://www.9cbs.com/read-57446.html

New Post(0)