You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Jack Lauman <jl...@nwcascades.com> on 2004/03/04 23:05:24 UTC
TDL problem
I have a simple shopping cart the worked just fine under Tomcat 4.1.29
with JSTL 1.0.5.
I want to move it to Tomact 5.0.19 with JSTL 1.1.
I have changed the tld to the jsp 2.0 xml-schema,
tried adding el-ignore with true and false attribs.
but have yet to get rid of the following error.
The attrib 'amount' comes from a session variable
holds the total purchase amout.
I'm not sure what else to try. Any suggestions would
be appreciated.
Thanks,
Jack
org.apache.jasper.JasperException: /checkout.jsp(81,3) According to TLD
or attribute directive in tag file, attribute amount does not accept any
expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:984)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:739)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1458)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2230)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2236)
org.apache.jasper.compiler.Node$Root.accept(Node.java:485)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
org.apache.jasper.compiler.Validator.validate(Validator.java:1518)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: TDL problem
Posted by Kris Schneider <kr...@dotech.com>.
Ah, hang on, the problem is with a non-JSTL tag, right? I missed that and
thought you were having trouble with JSTL. Okay, so you're using a tag whose
"amount" attribute doesn't accept a request-time value. Was that tag
specifically developed to accept EL attribute values under JSP 1.2? Hope this
isn't too confusing, but try going back to JSTL 1.0 *and* using a Servlet 2.3
web.xml (you can still use TC 5).
Quoting Jack Lauman <jl...@nwcascades.com>:
> I tried all theses, just forget to put that in my origianl message.
> The problem seems to be that what the error says:
>
> "According to TLD or attribute directive in tag file,
> attribute amount does not accept any expressions"
>
> If if use a hard coded value for 'amount' i.e. 75.00 it works.
> If I use the existing value of "${grandTotal}" it causes the error.
>
> I don't know what changed between the versions that would cause
> this to happen.
>
> Any suggestions?
>
> Jack
>
> Kris Schneider wrote:
> >
> > Assuming you've actually got the JSTL 1.1 JAR files in WEB-INF/lib, the
> next
> > thing to verify is your taglib URIs. They've changed from 1.0 to 1.1:
> >
> > 1.0
> > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> >
> > 1.1
> > <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> >
> > Just to add something new to this FAQ, I've gotten in the habit of creating
> a
> > file called taglib.jspf that contains:
> >
> > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> > <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
> > <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
> > <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
> > <%-- plus other taglib directives --%>
> >
> > And my JSPs contain:
> >
> > <%@ include file="taglib.jspf" %>
> >
> > So, if I need to change something, like, oh, the URI to move from JSTL 1.0
> to
> > 1.1, I only have to change one file. YMMV...
> >
> > Quoting Jack Lauman <jl...@nwcascades.com>:
> >
> > > I have a simple shopping cart the worked just fine under Tomcat 4.1.29
> > > with JSTL 1.0.5.
> > >
> > > I want to move it to Tomact 5.0.19 with JSTL 1.1.
> > > I have changed the tld to the jsp 2.0 xml-schema,
> > > tried adding el-ignore with true and false attribs.
> > > but have yet to get rid of the following error.
> > >
> > > The attrib 'amount' comes from a session variable
> > > holds the total purchase amout.
> > >
> > > I'm not sure what else to try. Any suggestions would
> > > be appreciated.
> > >
> > > Thanks,
> > >
> > > Jack
> > >
> > > org.apache.jasper.JasperException: /checkout.jsp(81,3) According to TLD
> > > or attribute directive in tag file, attribute amount does not accept any
> > > expressions
> > >
> > >
> >
>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
> > >
> > >
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
> > >
> > >
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
> > >
> > >
> >
>
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:984)
> > >
> > >
> >
>
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:739)
> > > org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1458)
> > > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
> > >
> > > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2230)
> > > org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2236)
> > > org.apache.jasper.compiler.Node$Root.accept(Node.java:485)
> > > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
> > >
> > > org.apache.jasper.compiler.Validator.validate(Validator.java:1518)
> > >
> > > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
> > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
> > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
> > >
> > >
> >
>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
> > >
> > >
> >
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
> > >
> > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> > >
> > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >
> > --
> > Kris Schneider <ma...@dotech.com>
> > D.O.Tech <http://www.dotech.com/>
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: TDL problem
Posted by Jack Lauman <jl...@nwcascades.com>.
I tried all theses, just forget to put that in my origianl message.
The problem seems to be that what the error says:
"According to TLD or attribute directive in tag file,
attribute amount does not accept any expressions"
If if use a hard coded value for 'amount' i.e. 75.00 it works.
If I use the existing value of "${grandTotal}" it causes the error.
I don't know what changed between the versions that would cause
this to happen.
Any suggestions?
Jack
Kris Schneider wrote:
>
> Assuming you've actually got the JSTL 1.1 JAR files in WEB-INF/lib, the next
> thing to verify is your taglib URIs. They've changed from 1.0 to 1.1:
>
> 1.0
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
>
> 1.1
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>
> Just to add something new to this FAQ, I've gotten in the habit of creating a
> file called taglib.jspf that contains:
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
> <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
> <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
> <%-- plus other taglib directives --%>
>
> And my JSPs contain:
>
> <%@ include file="taglib.jspf" %>
>
> So, if I need to change something, like, oh, the URI to move from JSTL 1.0 to
> 1.1, I only have to change one file. YMMV...
>
> Quoting Jack Lauman <jl...@nwcascades.com>:
>
> > I have a simple shopping cart the worked just fine under Tomcat 4.1.29
> > with JSTL 1.0.5.
> >
> > I want to move it to Tomact 5.0.19 with JSTL 1.1.
> > I have changed the tld to the jsp 2.0 xml-schema,
> > tried adding el-ignore with true and false attribs.
> > but have yet to get rid of the following error.
> >
> > The attrib 'amount' comes from a session variable
> > holds the total purchase amout.
> >
> > I'm not sure what else to try. Any suggestions would
> > be appreciated.
> >
> > Thanks,
> >
> > Jack
> >
> > org.apache.jasper.JasperException: /checkout.jsp(81,3) According to TLD
> > or attribute directive in tag file, attribute amount does not accept any
> > expressions
> >
> >
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
> >
> > org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
> >
> > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
> >
> >
> org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:984)
> >
> >
> org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:739)
> > org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1458)
> > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
> >
> > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2230)
> > org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2236)
> > org.apache.jasper.compiler.Node$Root.accept(Node.java:485)
> > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
> >
> > org.apache.jasper.compiler.Validator.validate(Validator.java:1518)
> >
> > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
> >
> >
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
> >
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
> >
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> >
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
> --
> Kris Schneider <ma...@dotech.com>
> D.O.Tech <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: TDL problem
Posted by Kris Schneider <kr...@dotech.com>.
Assuming you've actually got the JSTL 1.1 JAR files in WEB-INF/lib, the next
thing to verify is your taglib URIs. They've changed from 1.0 to 1.1:
1.0
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
1.1
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
Just to add something new to this FAQ, I've gotten in the habit of creating a
file called taglib.jspf that contains:
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<%-- plus other taglib directives --%>
And my JSPs contain:
<%@ include file="taglib.jspf" %>
So, if I need to change something, like, oh, the URI to move from JSTL 1.0 to
1.1, I only have to change one file. YMMV...
Quoting Jack Lauman <jl...@nwcascades.com>:
> I have a simple shopping cart the worked just fine under Tomcat 4.1.29
> with JSTL 1.0.5.
>
> I want to move it to Tomact 5.0.19 with JSTL 1.1.
> I have changed the tld to the jsp 2.0 xml-schema,
> tried adding el-ignore with true and false attribs.
> but have yet to get rid of the following error.
>
> The attrib 'amount' comes from a session variable
> holds the total purchase amout.
>
> I'm not sure what else to try. Any suggestions would
> be appreciated.
>
> Thanks,
>
> Jack
>
> org.apache.jasper.JasperException: /checkout.jsp(81,3) According to TLD
> or attribute directive in tag file, attribute amount does not accept any
> expressions
>
>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
>
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
>
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:186)
>
>
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:984)
>
>
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:739)
> org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1458)
> org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
>
> org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2230)
> org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2236)
> org.apache.jasper.compiler.Node$Root.accept(Node.java:485)
> org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2180)
>
> org.apache.jasper.compiler.Validator.validate(Validator.java:1518)
>
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:247)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>
>
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
>
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
>
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
>
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org