java .action 扩展名...是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1369591/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
.action extension... what is it?
提问by HyderA
I've never come across this extension before. It's being used for a front-end interface to a j2ee backend.
我以前从未遇到过这个扩展。它被用于 j2ee 后端的前端接口。
回答by yalestar
It's probably just a URL pattern for firing a Struts action. Most people stick with the .do convention, but you can make the actions fire on just about anything you want.
它可能只是用于触发 Struts 操作的 URL 模式。大多数人坚持使用 .do 约定,但是您可以根据您想要的任何内容触发操作。
See Section 5.4.2 on this sitefor more info
有关更多信息,请参阅本网站上的第 5.4.2 节
回答by HyderA
This is servlet mapping in j2ee application where you can define the url pattern for a particular servlet and you can name it as you want in this one it name like .action you can give like .yourname or anything. This mapping you can give in your web.xml using servlet-mapping tag and url-patten tag in it.
这是 j2ee 应用程序中的 servlet 映射,您可以在其中定义特定 servlet 的 url 模式,您可以根据需要命名它,在这个名称中可以像 .action 一样命名,也可以像 .yourname 或其他任何东西。您可以在 web.xml 中使用 servlet-mapping 标记和 url-patten 标记在其中提供此映射。
Thanks
谢谢

