tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "petra staub" <>
Subject JSTL import question
Date Tue, 08 Oct 2002 08:22:44 GMT
I use the <c:import> tag for including my general header file.
Parameters such as the title, I pass by parameters:
<c:param name="title" value="myTitle">.

However, in some jsp files I still require some javascript...

What would be a good solution for providing for individual jsp
files some additional code? (without creating a "javascript"
file which is again imported in header.jsp...I would like to
avoid to many file fragments for a single page)

I tried the following but which seems not to work correctly for me.

Any other good ideas?

Thanks a lot!


<%@ taglib prefix="c" uri="/WEB-INF/tlds/jstl/c.tld" %>
    <title><c:out value="${param.titleString}" /></title>

    <c:out value="${param.jScript}" escapeXml="false" />


some jsp file with javascript code:
<%@ taglib prefix="c" uri="/WEB-INF/tlds/jstl/c.tld" %>


<c:import url="header.jsp" >
    <c:param name="titleString" value="myTitle" />
    <c:param name="jScript">
    <script language="JavaScript" type="text/javascript">
    	>>>>> here is some javascript <<<<<


Werden Sie Mitglied bei MSN Hotmail, dem größten E-Mail-Service der Welt:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message