在Struts1中,如何在JSP中访问ActionMapping参数 [英] In Struts1, How to access ActionMapping parameter in JSP
本文介绍了在Struts1中,如何在JSP中访问ActionMapping参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从问题开始
当使用 set-property
标签时,其值被映射扩展ActionMapping类中的属性。有没有办法在JSP中访问此属性?
When set-property
tag is used, its value is mapped to property in extended ActionMapping class. Is there any way to access this property in JSP ?
推荐答案
您可以使用 bean: struts
tag:
<bean:struts id="myActionMapping" mapping="/myAction" />
一旦定义,您可以直接在 myActionMapping $上访问这些属性c $ c> JSP bean:
Once defined, you can access the properties straight on the myActionMapping
JSP bean:
<bean:write name="myActionMapping" property="task" />
或者,使用EL:
${myActionMapping.task}
参考: struts-bean.tld
这篇关于在Struts1中,如何在JSP中访问ActionMapping参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文