dev@glassfish.java.net

Re: Problem with jstl code. Unable to locate the tld

From: Uday <Uday.Thokala_at_Sun.COM>
Date: Tue, 18 Sep 2007 09:07:23 +0530

Hi Kim,

Thanks for comments. Yeah I have older jstl version which got bundled
along war file which is creating the issues. I removed it and it's
working fine.

Thanks,
Uday.
Kin-man Chung wrote:
> The error message indicates that the compiler thinks the TLD for <c:set>
> cannot accept the expression ${webtop} for the attribute "target".
> However, I have verified the TLD for c:set does allow expressions for
> the attribute "target", so something funny is happening here.
>
> I have also verified the following JSP fragment works for me without
> problem.
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
> %>
> <jsp:useBean id="foo" class="java.util.Date"/>
> <c:set target="${foo}" property="month" value="0"/>
> ${foo}
>
> So, it seems that Glassfish is behaving correctly for me.
>
> The only explanation I can think of now is that there might be
> another version of jstl in your application which got picked up instead
> of the one bundled with glassfish, and that that jstl contains a bad TLD
> for c:set.
>
> -Kin-man
>
>
> On Mon, 2007-09-17 at 01:20, Uday wrote:
>
>> Hi,
>>
>> I have a jsp file which has the following lines
>>
>> line 5 : <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
>> %>
>>
>> line 18: <jsp:useBean id="webtop"
>> class="com.tarantella.tta.portlet.WebtopSessionBean"/>
>> line 19: <c:set target="${webtop}" property="webtopSession"
>> value="${TTA_SESSION_OBJECT}"/>
>>
>> When I deploy the application, I am getting the following error.
>> org.apache.jasper.JasperException: /jsp/login.jsp(19,0) PWC6236:
>> According to TLD or attribute directive in tag file, attribute target
>> does not accept any expressions
>> at
>> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:62)
>>
>> at
>> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
>>
>> at
>> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:185)
>>
>> at
>> org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1165)
>>
>> at
>> org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:834)
>>
>> at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)
>> at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
>> at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)
>> at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2313)
>> at org.apache.jasper.compiler.Node$Root.accept(Node.java:481)
>> at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)
>> at
>> org.apache.jasper.compiler.Validator.validate(Validator.java:1837)
>> at
>> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:195)
>> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:409)
>> at
>> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
>>
>> at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
>>
>> at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
>> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
>> at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>>
>> Currently I am deploying using Application server 9.1. This code is
>> previously working fine with Application Server 8.
>>
>> Any Ideas??
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>