Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从问题出发
在 Struts1 中,如何在 action 标签中使用 set-property 标签?
使用set-property标签时,其值映射到扩展的 ActionMapping 类中的属性。有没有办法在 JSP 中访问这个属性?
set-property
您可以使用bean:struts标签:
bean:struts
<bean:struts id="myActionMapping" mapping="/myAction" />
定义后,您可以直接在myActionMappingJSP bean 上访问属性:
myActionMapping
<bean:write name="myActionMapping" property="task" />
或者,使用 EL:
${myActionMapping.task}
参考:struts-bean.tld