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

<dsp:a href="url" bean="property-specsource-speclink-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/" value="Ron">
   If your name is Ron, click here!

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

Setting multiple properties

In order to set multiple properties within a dsp:a tag, use the following syntax:

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

Note: A dsp:a tag can set a property only if the destination URL specifies a JSP in the same Web application.

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices