Bug 43714

Summary: org.apache.jasper.JasperException: /jsp1.jsp(18,0) "${param.crtpageno > 0 ? param.crtpageno:1}" contains invalid expression(s): javax.el.ELException: Error Parsing: ${param.crtpageno > 0 ? param.crtpageno:1}
Product: Tomcat 6 Reporter: lizongbo <lizongbo>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 6.0.14   
Target Milestone: default   
Hardware: Other   
OS: other   

Description lizongbo 2007-10-28 00:52:41 UTC
when I use JSTL 1.1 in Tomcat 6.0.14,

my jsp Code is : 
<c:set var="crtpageno" value="${param.crtpageno > 0 ? param.crtpageno :1}"/>

It's correct.

bug when my jsp Code is: 

<c:set var="crtpageno" value="${param.crtpageno > 0 ? param.crtpageno:1}"/>


I got  an Error:

org.apache.jasper.JasperException: /jsp1.jsp(18,0) "${param.crtpageno > 0 ?
param.crtpageno:1}" contains invalid expression(s): javax.el.ELException: Error
Parsing: ${param.crtpageno > 0 ? param.crtpageno:1}
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
	org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1149)
	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:819)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
	org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
	org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
	org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



right: "param.crtpageno:1 " 
error:  "param.crtpageno :1"
Comment 1 lizongbo 2007-10-28 00:54:04 UTC
In Tomcat 5.5.20 ,It's correct:
<c:set var="crtpageno" value="${param.crtpageno > 0 ? param.crtpageno:1}"/>
but in Tomcat 6.0.14 ,It's error :( 
fixed please.
Comment 2 Lucas Galfaso 2007-10-28 08:39:21 UTC

*** This bug has been marked as a duplicate of 42565 ***