The key is in the crazy single and double quotes--your second example is
really close, just change the outer double quotes to singles, like this:

   <html:link page='<%= "/bla/bla.jsp?returnURL=" + returnURL
   %>'>bla</html:link>

That should do it.

> -----Original Message-----
> From: Graham Lounder [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:38 AM
> To: Struts Users Mailing List
> Subject: dynamic links
> 
> 
> Hello All,
> 
> I'm trying to make a link that sends a parameter containing 
> the URL of the
> page which called it.  I have all the URLEncoding figured 
> out, my problem is
> getting it into the <html:link> tag.
> 
> I have tried
> 
> <html:link page="/bla/bla.jsp?returnURL=<%= returnURL 
> %>">bla</html:link>
> 
> and
> 
> <html:link page="<%= "/bla/bla.jsp?returnURL=" + returnURL
> %>">bla</html:link>
> 
> neither of which work.
> 
> 
> Right now what I'm doing is:
> 
> <% String myLink = "/bla/bla.jsp?returnURL=" + returnURL; %>
> <html:link page="<%= myLink%>">bla</html:link>
> 
> but this is very ugly.  I don't want to have to make a String 
> variable for
> each link on my page.  Any ideas?  Am I missing something?
> 
> Graham
> 
> 
> ============================================
>   Graham Lounder
>   Java Developer
>   Spatial Components Division
>   CARIS
>   264 Rookwood Ave
>   Fredericton NB E3B-2M2
>   Office 506 462-4218
>   Fax    506 459-3849
>   [EMAIL PROTECTED]
>   http://www.spatialcomponents.com
> ============================================
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to