The anchor tag dsp:a lets you set a property on activation of the hyperlink:

<dsp:a href="url" bean="property-specsource-spec"> link-text </dsp:a>

where source-spec specifies the source value in one of the following ways:

  • beanvalue=property-spec

  • paramvalue=param-name

  • value=value

For example:

<dsp:a href="page2.jsp" bean="/samples/Student_01.name" value="Ron">
   If your name is Ron, click here!
</dsp:a>

When this link is clicked, the property Student_01.name is set to Ron before the browser opens the link.

Note: This technique is valid only if the destination URL specifies a JSP in the same Web application; see dsp:a for a complete listing of its attributes.

 
loading table of contents...