I did a little more research and it looks like you need to add the following to your JSP:
<[EMAIL PROTECTED] uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <[EMAIL PROTECTED] deferredSyntaxAllowedAsLiteral="true"%> The latter allows the deferred variable (denoted by "#") to pass through jasper's validator and on to the jstl tag library. After making those changes you should be able to run the JSP successfully, but there still seems to be a problem with jasper finding certain files in jstl.jar!meta-inf. It may be due to the way that the jstl classes are added to the web containers' classpaths. I updated the JIRA with this info. Best wishes, Paul On 12/12/06, Krishnakumar B <[EMAIL PROTECTED]> wrote:
Opened the JIRA. Will attach a sample application with JSP 2.1 features soon. (https://issues.apache.org/jira/browse/GERONIMO-2650) Regards Krish On 12/8/06, Paul McMahan <[EMAIL PROTECTED]> wrote: > The jetty and tomcat JEE5 assemblies both use jasper for JSP so that > explains why you're seeing the error in both places. Looking at > org.apache.jaspler.compiler.Validator:705 I think I see where the > error occurs: > > // JSP.2.2 - '#{' not allowed in template text > if (n.getType() == '#') { > if (!pageInfo.isDeferredSyntaxAllowedAsLiteral() > && (tagInfo == null > || ((tagInfo != null) && > !tagInfo.getTagLibrary().getRequiredVersion().equals("2.0")))) { > err.jspError(n, "jsp.error.el.template.deferred"); > } else { > return; > } > } > > As to whether or not that error condition is valid I'm not sure. I'm > particularly confused by the reference to JSP 2.2 in the comment, but > maybe that was a typo. If you don't mind could you please create a > JIRA for this? > > Best wishes, > Paul > > On 12/8/06, Anitha Krishnasamy <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have deployed the Sample applications for JEE5 on both Jetty 6.0 and > > Tomcat 6 distributions. > > Servlets 2.5 application is working fine on both. But JSP 2.1 application > > throwing the following error. > > > > On Tomcat 6: > > ------------------- > > org.apache.jasper.JasperException: /SampleJSP.jsp(12,35) > > #{..} is not allowed in template text > > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) > > org.apache.jasper.compiler.ErrorDispatcher.dispatch > > (ErrorDispatcher.java:406) > > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:101) > > org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710) > > org.apache.jasper.compiler.Node$ELExpression.accept > > (Node.java:935) > > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336) > > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386) > > org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392) > > org.apache.jasper.compiler.Node$Root.accept > > (Node.java:489) > > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336) > > org.apache.jasper.compiler.Validator.validate(Validator.java:1679) > > 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:314) > > 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:806) > > > > On Jetty 6.0: > > -------------------- > > org.apache.jasper.JasperException: /SampleJSP.jsp(12,35) > > #{..} is not allowed in template text > > at > > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) > > at org.apache.jasper.compiler.ErrorDispatcher.dispatch > > (ErrorDispatcher.java:406) > > at > > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:101) > > at > > org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710) > > at org.apache.jasper.compiler.Node$ELExpression.accept > > (Node.java:935) > > at > > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336) > > at > > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386) > > at > > org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392) > > at > > org.apache.jasper.compiler.Node$Root.accept(Node.java:489) > > at > > org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336) > > at > > org.apache.jasper.compiler.Validator.validate(Validator.java:1679) > > at org.apache.jasper.compiler.Compiler.generateJava > > (Compiler.java:178) > > at > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:306) > > at > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) > > at > > org.apache.jasper.compiler.Compiler.compile(Compiler.java > > :273) > > at > > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) > > at > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314) > > at org.apache.jasper.servlet.JspServlet.serviceJspFile > > (JspServlet.java:320) > > at > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > at > > javax.servlet.http.HttpServlet.service(HttpServlet.java:806) > > at > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java > > :459) > > at > > org.apache.geronimo.jetty6.InternalJettyServletHolder.handle(InternalJettyServletHolder.java:62) > > at > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) > > at org.apache.geronimo.jetty6.JettyServletHandler.doHandle > > (JettyServletHandler.java:55) > > at > > org.apache.geronimo.jetty6.JettyServletHandler$ActualJettyServletHandler.handle(JettyServletHandler.java:62) > > at > > org.apache.geronimo.jetty6.JettyServletHandler$NoOpChainedHandler.handle > > (JettyServletHandler.java:70) > > at > > org.apache.geronimo.jetty6.JettyServletHandler.handle(JettyServletHandler.java:47) > > at > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:231) > > at > > org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.handle > > (ThreadClassloaderHandler.java:46) > > at > > org.apache.geronimo.jetty6.handler.ComponentContextHandler.handle(ComponentContextHandler.java:47) > > at > > org.apache.geronimo.jetty6.handler.InstanceContextHandler.handle(InstanceContextHandler.java > > :58) > > at > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:629) > > at > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:389) > > at > > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java > > :123) > > at > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141) > > at org.mortbay.jetty.Server.handle(Server.java:303) > > at > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:452) > > at > > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:721) > > at > > org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:509) > > at > > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java > > :209) > > at > > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:349) > > at > > org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217) > > at org.mortbay.thread.BoundedThreadPool$PoolThread.run > > (BoundedThreadPool.java:475) > > > > Can you tell me, Why is it throwing this error ? > > > > Thanks > > Anitha Krishnasamy >