tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <martin.coo...@tumbleweed.com>
Subject RE: JSTL import question
Date Tue, 08 Oct 2002 18:22:42 GMT
All three messages have the same code...

The only problem I see is that you have the <head> tag in both files. I'm
not sure what kind of issues that would cause, but it's not good. ;-)

--
Martin Cooper


> -----Original Message-----
> From: petra staub [mailto:calc42@hotmail.com]
> Sent: Tuesday, October 08, 2002 1:23 AM
> To: taglibs-user@jakarta.apache.org
> Subject: JSTL import question
> 
> 
> 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!
> 
> ==============================================================
> =========
> 
> header.jsp:
> ----------
> <%@ taglib prefix="c" uri="/WEB-INF/tlds/jstl/c.tld" %>
> <head>
>     <title><c:out value="${param.titleString}" /></title>
> 
>     <c:out value="${param.jScript}" escapeXml="false" />
> 
> </head>
> 
> some jsp file with javascript code:
> ----------------------------------
> <%@ taglib prefix="c" uri="/WEB-INF/tlds/jstl/c.tld" %>
> 
> <html>
> 
> <head>
> <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 <<<<<
>     //-->
>     </script>
>     </c:param>
> </c:import>
> 
> <body>
> ...
> ...
> 
> 
> 
> 
> _________________________________________________________________
> Werden Sie Mitglied bei MSN Hotmail, dem größten 
> E-Mail-Service der Welt: 
> http://www.hotmail.com/de
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:taglibs-user-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message