OK, this is weird. The <html:link> page attribute doesn't work as expected when you append a query string to a scriptlet, as in <html:link page=" <%=somepage%>?color=green" >. Here sample code that highlights the discrepancy. Can someone explain??
------------------------------------------------- SCENARIO ONE - no queryString - this works Yay! -------------------------------------------------------------------------- **************JSP PAGE:************** <% String somepage= "/crazylink.do"; %> <html:link page="<%=somepage%>" >click</html:link> **************JAVA CREATED FROM JSP:************** String somepage = "crazylink.do"; org.apache.struts.taglib.html.LinkTag _jspx_th_html_link_0 = new org.apache.struts.taglib.html.LinkTag(); .... code .... _jspx_th_html_link_0.setPage(somepage); ************** LINK CREATED **************** http://localhost:8080/myapp/crazylink.do --------------------------------------- SCENARIO TWO - using a queryString - this does NOT WORK. BOO! ------------------------------------------------ **************JSP PAGE:************** <% String somepage= "/crazylink.do"; %> <html:link page="<%=somepage%>?color=green" >click</html:link> **************JAVA CREATED FROM JSP:************** String somepage = "crazylink.do"; org.apache.struts.taglib.html.LinkTag _jspx_th_html_link_0 = new org.apache.struts.taglib.html.LinkTag(); .... code .... _jspx_th_html_link_0.setPage("<%=somepage%>?color=green"); ************** LINK CREATED **************** http://localhost:8080/myapp/<%=somepage%>?color=green ***Note: I realize one can just append the query string like so: <% String somepage= "/crazylink.do?color=green"; %> But this does me no good since the link "/crazy.do" will be used throughout the page with different queryStrings for each. Craig_Reichenbach @lotus.com To: [EMAIL PROTECTED] cc: (bcc: Craig Reichenbach/CAM/Lotus) 10/18/2001 02:18 Subject: rtexprvalue not working in <html:link> tag!!! PM Please respond to struts-user Anyone know why my scriptlet in the following <html:link> tag is not being evaluated? ****************************************************************************** <% String somepage= "index.jsp"; %> <html:link page="<%=somepage%>">Click Here</html:link> ****************************************************************************** The value showing up is not the evaluted scriptlet, but the scriptlet itself, as in "http://localhost:8080/myapp/<%=somepage%>" I'm using Tomcat4.0 & Struts1.0 Scriptlets are evaluated in other custom tags I have used so I don't think it's a jasper issue... I don't htink it has to do w/ the taglib either... What's up??? Thanks, -Craig To be sure, the page attribute accepts a rtexprvalue: <attribute> <name>page</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute>

