You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Aidan Monroe <km...@yahoo.com> on 2003/03/18 00:42:37 UTC

Including A JSP Containing Struts

I'd like to create a JSP file that can be included in
many of my other JSPs. That included JSP will need to
have Struts tags in it and will receive 2 parameters. 

I've tried using <jsp:include> like so:

<jsp:include page="../include/LovLookup.jsp">
    <jsp:param name="form" value="TalkIndirectForm"/>
    <jsp:param name="field" value="laborAcctCode"/>
</jsp:include>

But the Struts tags inside the included JSP did not
get resolved.

Here is the included JSP:

<td styleClass="lov_icon">
<html:img src="../images/find.jpg"
altKey="listLovCodes" 
onclick="javascript:openLovWindow( <%= "'" +
request.getParameter("form") + "', '" +
request.getParameter("field") + "'"%> )"/>
</td>

The resultant HTML still has the <html:img> in it --
it was not resolved into a <img>. I've tried adding 

<%@ taglib uri="/WEB-INF/struts-html.tld" 
prefix="html" %>

to the top of the included JSP but to no avail.

I haven't tried using <bean:include> because I want to
use parameters and didn't see in the documentation
where <bean:include> recognized nested parameter tags.

Any suggestions?

TIA

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org