JSTL 1.0 unterminated tag

I am new to java web development so please bear with me. Can someone please tell me why I get a jsp.error.unterminated tag exception from the following snippet:

<portlet:param name="event.id" value="<c:out: value="${evntContainer.event.id}"/>"/>

I am using JSTL 1.0 on tomcat 4.1

[437 byte] By [darrell.pittmana] at [2007-11-26 18:01:40]
# 1

I think the problem is that there is a colon : *after*c:out

Only a space is allowed after c:out so change the code to the following and I think it should work:

<portlet:param name="event.id" value="<c:out value="${evntContainer.event.id}"/>"/>

Another point is that in JSTL 1.1 one can simply write c:out in a short form like ${evntContainer.event.id}

I don't know if the above syntax is possible in JSTL 1.0 , but you can try.

appy77a at 2007-7-9 5:31:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

You can't nest custom tags as attributes to other custom tags.

For custom tag attributes you can only use expressions. ie <%= expr %> (and ${expr} in a JSP2.0 container)

Given the constraints on JSTL1.0 and Tomcat4.1, then the only expression available is <%= expr %>

Is the <portlet:param> tag your own tag or one from a library?

The common approach is to allow providing the value as the body of a tag

<portlet:param name="event.id"><c:out: value="${evntContainer.event.id}"/></portlet:param>

I don't know if the <portlet:param> tag supports that syntax or not. I know that <c:param> does.

If not, then you need to provide the value in an expression

ie <%= evntContainer.getEvent().getId() %>

You may need a <jsp:useBean id="evntContainer" class="....."/> tag on your page so that this would work.

cheers,

evnafets

evnafetsa at 2007-7-9 5:31:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanks, for the response. The <portlet:param> tag is from the jsr-168 portlet specification from sun. ( http://java.sun.com/portlet). Unfortunately it must be an empty tag. I guess I'll try the <jsp:useBean>Message was edited by: darrell.pittman
darrell.pittmana at 2007-7-9 5:31:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...