java - Struts make a link with wildcard parameter -
so have following action mapping:
<action path="/admin/nst-*/manage/" type="com.company.backend.actions.admin.nstmanageaction" name="nstmgmtform" attribute="form" validate="false" scope="request" parameter="{1}" input="/web-inf/company/pages/nstmgmt.jsp"> <forward name="view" path="/web-inf/company/pages/nstmgmt.jsp"/> </action> as can see, has wildcard institution passed in parameter attribute.
say on jsp page wanted link action struts html tag. how automatically insert institution id the link struts link tag? instance /admin/nst-22/manage/ or /admin/nst-99/manage. possible the link tag?
use el expression in action attribute
<html:link action="/admin/nst-${id}/manage/">manage</html:link> struts1 tag attributes accept el expressions, it's possible.
Comments
Post a Comment