Since I am not using the JSP tags right now, I'm really speculating.  It
looks as if the link tag is attempting to build a URL based on the stuff
you put in the "href", "paramId", "paramName", and "paramProperty"
attributes.  It may be that the tag is not designed to work with
JavaScript-style URL's in the href.

You could deal with this in a couple of ways:
1) Try using just href without the "param" attributes.  Build your URL
and place it in a variable:

<%
 String jsUrl = "javascript:performAction(form,
'simpleQuery.do?offset='" + i + ");";
%>

<html:link href="<%= jsUrl %>"/>

I don't even know if that would compile; it's just a hunch, and it uses
the scriptlet, which may or may not be an option for you.

2) Use the HTML <a> tag instead of <html:link>.  Again I may be showing
some ignorance to the use of the link tag, but you could probably
accomplish the result using <a> like so:

<a href="javascript:performAction(form, 'simpleQuery.do?offset=<%= 10 *
i %>');"/>

Also, note the use of the semicolon in the JavaScript calls.  For some
reason that I don't understand, that sometimes makes a difference.

Does anyone else have ideas on the use of <html:link>?  Is it possible
to use javascript calls in the "href" attribute?

Later,
Greg

>  Good idea. Unfortunately, it didn't work. I tried:
>
>         <html:link href="javascript:performAction(form,
> 'simpleQuery.do')"
>                    paramId="offset"
>                    paramName="resultNavigator"
>                    paramProperty="startIndex">
>
> but got:
>
>
> Exception Report:
>
> javax.servlet.ServletException:

Reply via email to