Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Tomcat 5.5.7 and JSTL setup exception.

843836Apr 27 2005 — edited Apr 27 2005
Hello,

I've set up my Mac with tomcat 5.5.7 using the compat patch. I've also set up my webapp to use spring. I've copied spring.jar, jstl.jar and standard.jar to my ./tomcat/common/lib directory. However when I try to use JSTL I get a strange exception and was hoping someone could help me resolve it.

My test.jsp looks like:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt"  prefix="fmt" %>
<%
   request.setAttribute("today", new java.util.Date().toString());
%>
<html>
   <head>
      <title><c:out value="${today}" /></title>
   </head>
</html>
The exception I'm getting is:

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:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:955)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
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:1489)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Any help with this would be greatly appreciated.
Thanks,
EB

Comments

Jeff Martin

Your query might win the award for the "shortest question with the longest answer", but I'll try for a short answer. For the first part, you need to fetch data from the database. For this you could use anything from raw JDBC to an Object Relational Mapping (ORM) tool, like Hibernate. For the second part, I would recommend a reporting tool, like Jasper Reports, BIRT or ReportMill. Currently, only ReportMill has generated reports in JavaFX. But they all generate PDF - and that would be my suggestion: generate PDF and use the platform PDF viewer to display and print reports. You could spend years trying to duplicate all the nice display and print functionality found in Acrobat Reader and Mac OS X Preview.

As it happens, ReportMill (disclosure: me) is working on a tool to do exactly what your question asks for:

http://www.reportmill.com/javi/gallery/AddressBook

There is also a very cool database tool that has JavaFX support called XDEV. We'll both be at JavaOne.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 25 2005
Added on Apr 27 2005
5 comments
165 views