5 Replies Latest reply on Sep 29, 2008 12:00 PM by Scott Lambeth

    JBoss 4.2.0CR1 chanaged behaviour: forTokens

    Bob Brown Newbie

      The following had no problems under 4.0.5GA:

      <%@ page language="java" pageEncoding="ISO-8859-1"%>
      
      <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
      
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
       <head>
       <title>ForTokens Test Page</title>
       </head>
      
       <body>
      
       <table border="0" cellspacing="0" cellpadding="4" width="100%">
      
       <c:forTokens var="i" items="make,model,approxYear,rego,colour"
       delims=",">
       <tr>
       <td>${i}</td>
       </tr>
       </c:forTokens>
      
       </table>
      
       </body>
      </html>
      


      Under 4.2.0CR1, I see:

      2007-03-12 22:03:10,687 DEBUG [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in: file:/C:/DEVTOOLS/jboss-4.2.0.CR1/server/all/deploy/jboss-web.deployer/jsf-libs/jsf-impl.jar
      2007-03-12 22:03:10,797 DEBUG [org.jboss.web.tomcat.service.jasper.TagLibCache] Scanning for tlds in: file:/C:/DEVTOOLS/jboss-4.2.0.CR1/server/all/deploy/jboss-web.deployer/jstl.jar
      2007-03-12 22:03:12,906 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/JSP].[jsp]] Servlet.service() for servlet jsp threw exception
      org.apache.jasper.JasperException: Unable to compile class for JSP:
      
      An error occurred at line: 15 in the jsp file: /index.jsp
      The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)
      12:
      13: <table border="0" cellspacing="0" cellpadding="4" width="100%">
      14:
      15: <c:forTokens var="i" items="make,model,approxYear,rego,colour"
      16: delims=",">
      17: <tr>
      18: <td>${i}</td>
      
      
      Stacktrace:
       at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
       at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
       at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
       at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
       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:308)
       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:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
       at java.lang.Thread.run(Thread.java:595)
      


      Suggestions/comments? Should I open a JIRA?

      Cheers,

      Alph