aspose file tools*
The moose likes JSP and the fly likes Regarding JSTL Core Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Regarding JSTL Core" Watch "Regarding JSTL Core" New topic
Author

Regarding JSTL Core

Prasad Babu
Ranch Hand

Joined: Jul 17, 2005
Posts: 57
Hi All,

When I run the following JSP

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ page import="java.util.*,com.dpbabu.*"%>
<html><head><title></title></head>
<body>
<c:set var="rowsPerPage" value="10" scope="session"/>
<c:set var="categories" value="${rows}"/>
<%int rowNum=categories.size();%>
<c:set var="a" value="rowNum/rowsPerPage">
<fmt:formatNumber maxFractionDigit="0"/>
</c:set>
</body>
</html>


I am getting the following Error: Please solve my Problem. I put all required .jar files in the Application directory.

org.apache.jasper.JasperException: /PageView.jsp(9,0) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:941)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:696)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Validator.validate(Validator.java:1475)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:214)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.dpbabu.Search.doPost(Search.java:57)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

What is the Actual problem? is there any syntax error?
Please the correct the syntax if wrong.
Thanks in avance.
Prasad.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61429
    
  67

This usually means that you are using incompatible versions of the JSTL and JSP. Your JSTL URI's indicate that you are using JSTL 1.0. What version of Tomcat? If it's Tomcat 5, you need to be using JSTL 1.1.

See the JSP FAQ for more info.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Prasad Babu
Ranch Hand

Joined: Jul 17, 2005
Posts: 57
Dear Bear,
Thank very much. you are right. I solved my problem by changing the taglib directive accordingly. thank you.
yours
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Regarding JSTL Core