[英]I'm using struts1, about the action name
I'm looking for the process that strusts decided which is the action name. 我正在寻找strusts决定哪个动作名称的过程。
the web.xml config file is: web.xml配置文件为:
<url-pattern>*.do</url-pattern>
when user request "a.do" in browser, how does struts know the action name is "a" not "a.do"? 当用户在浏览器中请求“ a.do”时,struts如何知道动作名称是“ a”而不是“ a.do”?
This has to do with the servlet-mapping configuration 这与servlet映射配置有关
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
Struts Configuration see section 5.4.2 Struts配置请参阅第5.4.2节
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.