开发者

to pass action name at dynamically it is possible?

开发者 https://www.devze.com 2023-01-26 06:19 出处:网络
am using struts2, i need to do multi language option, language option i have put in header of the all pages.May i know, to pass action name at dynamically it is possible in struts.xml file.action name

am using struts2, i need to do multi language option, language option i have put in header of the all pages.May i know, to pass action name at dynamically it is possible in struts.xml file.action name is dynamic or static? can anybody help me please, advance in thanks.

for exa开发者_运维问答mple:In the struts.xml file

$(curActionName)


firstly action can be selected dynamically by using the wild card method. this tutorial will help you understand wild card mappings. http://struts.apache.org/2.0.6/docs/wildcard-mappings.html

However since you are talking about many language support if all you want is rendering same page in different languages you will not need dynamic action as struts already has an elegant internationalization feature where you just have to maintain properties file for each language. this makes it easier to maintain your website.you can study more of this here. http://struts.apache.org/2.0.14/docs/localization.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号