[英]When and where do we write the “url.do” in struts1
I have seen a couple of files in which we sometimes use the "url.jsp" but there are sometimes when we use "url.do" in the struts-config file in struts-1 . 我看过几个文件,其中有时我们使用“ url.jsp”,但有时在struts-1的struts-config文件中有时使用“ url.do”。 Can anyone explain what do we actually mean by writing this ".do" in the URL.
任何人都可以通过在URL中写入此“ .do”来解释我们实际上是什么意思。
If you want to redirect the control to a different action, we need to use the eg redirectAction.do
如果要将控件重定向到其他操作,则需要使用eg
redirectAction.do
There should be a corresponding action-mapping with path /redirectAction
present which would then pass on the control to that action. 应该存在一个带有
/redirectAction
路径的对应动作映射,然后将控件传递给该动作。
Also, this .do
is default URL pattern for Struts 1. The same can be changed in "web.xml" file under the node <servlet-mapping>
. 同样,此
.do
是Struts 1的默认URL模式。可以在节点<servlet-mapping>
下的“ web.xml”文件中更改该URL模式。 eg <url-pattern>*.do</url-pattern>
例如
<url-pattern>*.do</url-pattern>
.do
is the default Struts 1 URL mapping extension. .do
是默认的Struts 1 URL映射扩展名。
You use it when you need to reference an action, eg, a redirect. 当您需要引用动作(例如重定向)时,可以使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.