Results 1 to 2 of 2
  1. #1
    sangfroid is offline Member
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Default When I mix JSTL 1.0 and 1.1 taglib declarations, it causes a ParseException. Why?

    When I mix JSTL 1.0 and JSTL 1.1 taglib declarations, it causes a ParseException on some of my servers, but not all of them.

    Here is the block of code that's giving me trouble:

    Java Code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
    <c:set var="TEXTVARIABLE">|STRINGOFTEXT|</c:set>
    <c:set var="OTHERTEXTVARIABLE">${fn:contains(TEXTVARIABLE, '|STRINGOFTEXT|')}</c:set>

    And here is the exception :

    javax.servlet.jsp.JspException: com.caucho.jsp.JspLineParseException: /WEB-INF/jsp/online/system/modules/com.MYCOMPANY.marketing/templates/common/MY_JSP_PAGE.jsp:1: tag = 'out' / attribute = 'value': An error occurred while parsing custom action attribute "value" with value "${fn:contains(TEXTVARIABLE, '|STRINGOFTEXT|')}": org.apache.taglibs.standard.lang.jstl.parser.Parse Exception: EL functions are not supported.

    However, everything works fine if I change the URI for the core declaration to JavaServer Pages Standard Tag Library

    So here's the really weird part: for some reason, mixing 1.0 and 1.1 taglib declarations only causes an exception on two of my servers, my staging server and my production server. It causes no problems at all on my local machine or my development server. Why is this? What could possibly be causing this difference in behavior?

    The three servers are extremely similar in setup and configuration. The JSP page is being served up by OpenCMS 7, and I'm using the Caucho's Resin webserver. I understand that you don't know how my servers or CMS are set up, but really, what I'm looking for is ideas. Any ideas at all would help, this problem has been driving me absolutely batty. Even if you don't know what could be causing the problem, if you have any suggestions at all for how I could approach the problem, that would be extremely helpful. I just don't understand what could cause this difference in behavior between my servers.

    For reference, here's the full stack trace :

    javax.servlet.jsp.JspException: com.caucho.jsp.JspLineParseException: /WEB-INF/jsp/online/system/modules/com.MYCOMPANY.marketing/templates/common/MY_JSP_PAGE.jsp:1: tag = 'out' / attribute = 'value': An error occurred while parsing custom action attribute "value" with value "${fn:contains(TEXTVARIABLE, '|STRINGOFTEXT|')}": org.apache.taglibs.standard.lang.jstl.parser.Parse Exception: EL functions are not supported. at
    org.opencms.jsp.CmsJspTagInclude.includeActionWith Cache(CmsJspTagInclude.java:369) at
    org.opencms.jsp.CmsJspTagInclude.includeTagAction( CmsJspTagInclude.java:241) at
    org.opencms.jsp.CmsJspTagInclude.doEndTag(CmsJspTa gInclude.java:472) at
    _jsp._WEB_22dINF._jsp._online._system._modules._co m__MYCOMPANY__marketing._templates._MAIN_0PAGE__js p._jspService(_MAIN_0PAGE__jsp.java:153) at
    com.caucho.jsp.JavaPage.service(JavaPage.java:60) at
    com.caucho.jsp.Page.pageservice(Page.java:579) at
    com.caucho.server.dispatch.PageFilterChain.doFilte r(PageFilterChain.java:179) at
    shared.filter.RemoteAddrFilterBase.doFilter(Remote AddrFilterBase.java:57) at
    com.caucho.server.dispatch.FilterFilterChain.doFil ter(FilterFilterChain.java:70) at
    com.caucho.server.webapp.DispatchFilterChain.doFil ter(DispatchFilterChain.java:115) at
    com.caucho.server.cache.CacheFilterChain.doFilter( CacheFilterChain.java:175) at
    com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:229) at
    com.caucho.server.webapp.RequestDispatcherImpl.inc lude(RequestDispatcherImpl.java:485) at
    com.caucho.server.webapp.RequestDispatcherImpl.inc lude(RequestDispatcherImpl.java:350) at
    org.opencms.flex.CmsFlexRequestDispatcher.includeE xternal(CmsFlexRequestDispatcher.java:194) at
    org.opencms.flex.CmsFlexRequestDispatcher.include( CmsFlexRequestDispatcher.java:169) at
    org.opencms.loader.CmsJspLoader.service(CmsJspLoad er.java:1193) at
    org.opencms.flex.CmsFlexRequestDispatcher.includeI nternalWithCache(CmsFlexRequestDispatcher.java:423 ) at
    org.opencms.flex.CmsFlexRequestDispatcher.include( CmsFlexRequestDispatcher.java:173) at
    org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJsp Loader.java:1227) at
    org.opencms.loader.CmsJspLoader.load(CmsJspLoader. java:1171) at
    org.opencms.loader.A_CmsXmlDocumentLoader.load(A_C msXmlDocumentLoader.java:232) at
    org.opencms.loader.CmsXmlContentLoader.load(CmsXml ContentLoader.java:52) at
    org.opencms.loader.CmsResourceManager.loadResource (CmsResourceManager.java:964) at
    org.opencms.main.OpenCmsCore.showResource(OpenCmsC ore.java:1498) at
    org.opencms.main.OpenCmsServlet.doGet(OpenCmsServl et.java:152) at
    javax.servlet.http.HttpServlet.service(HttpServlet .java:115) at
    javax.servlet.http.HttpServlet.service(HttpServlet .java:92) at
    com.caucho.server.dispatch.ServletFilterChain.doFi lter(ServletFilterChain.java:106) at
    com.caucho.filters.CmsGzipFilter.doFilter(CmsGzipF ilter.java:177) at
    com.caucho.server.dispatch.FilterFilterChain.doFil ter(FilterFilterChain.java:70) at
    shared.filter.RemoteAddrFilterBase.doFilter(Remote AddrFilterBase.java:57) at
    com.caucho.server.dispatch.FilterFilterChain.doFil ter(FilterFilterChain.java:70) at
    com.caucho.server.webapp.DispatchFilterChain.doFil ter(DispatchFilterChain.java:115) at
    com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:229) at
    com.caucho.server.webapp.RequestDispatcherImpl.for ward(RequestDispatcherImpl.java:277) at
    com.caucho.server.webapp.RequestDispatcherImpl.for ward(RequestDispatcherImpl.java:106) at
    com.caucho.server.dispatch.ForwardFilterChain.doFi lter(ForwardFilterChain.java:80) at
    com.caucho.server.cache.CacheFilterChain.doFilter( CacheFilterChain.java:207) at
    com.caucho.server.webapp.WebAppFilterChain.doFilte r(WebAppFilterChain.java:173) at
    com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:229) at
    com.caucho.server.http.HttpRequest.handleRequest(H ttpRequest.java:274) at
    com.caucho.server.port.TcpConnection.run(TcpConnec tion.java:514) at
    com.caucho.util.ThreadPool.runTasks(ThreadPool.jav a:520) at
    com.caucho.util.ThreadPool.run(ThreadPool.java:442 ) at
    java.lang.Thread.run(Thread.java:595)
    Caused by: com.caucho.jsp.JspLineParseException: /WEB-INF/jsp/online/system/modules/com.MYCOMPANY.marketing/templates/common/MY_JSP_PAGE.jsp:1: tag = 'out' / attribute = 'value': An error occurred while parsing custom action attribute "value" with value "${fn:contains(TEXTVARIABLE, '|STRINGOFTEXT|')}": org.apache.taglibs.standard.lang.jstl.parser.Parse Exception: EL functions are not supported. at
    com.caucho.jsp.java.JspNode.error(JspNode.java:148 9) at
    com.caucho.jsp.java.JspNode.error(JspNode.java:148 0) at
    com.caucho.jsp.java.JavaJspGenerator.validate(Java JspGenerator.java:466) at
    com.caucho.jsp.JspCompilerInstance.generate(JspCom pilerInstance.java:475) at
    com.caucho.jsp.JspCompilerInstance.compile(JspComp ilerInstance.java:373) at
    com.caucho.jsp.JspManager.compile(JspManager.java: 233) at
    com.caucho.jsp.JspManager.createPage(JspManager.ja va:177) at
    com.caucho.jsp.JspManager.createPage(JspManager.ja va:157) at
    com.caucho.jsp.PageManager.getPage(PageManager.jav a:248) at
    com.caucho.jsp.PageManager.getPage(PageManager.jav a:166) at
    com.caucho.jsp.QServlet.getSubPage(QServlet.java:2 92) at
    com.caucho.jsp.QServlet.getPage(QServlet.java:210) at
    com.caucho.server.dispatch.PageFilterChain.compile Page(PageFilterChain.java:206) at
    com.caucho.server.dispatch.PageFilterChain.doFilte r(PageFilterChain.java:133) at
    shared.filter.RemoteAddrFilterBase.doFilter(Remote AddrFilterBase.java:57) at
    com.caucho.server.dispatch.FilterFilterChain.doFil ter(FilterFilterChain.java:70) at
    com.caucho.server.webapp.DispatchFilterChain.doFil ter(DispatchFilterChain.java:115) at
    com.caucho.server.cache.CacheFilterChain.doFilter( CacheFilterChain.java:175) at
    com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:229) at
    com.caucho.server.webapp.RequestDispatcherImpl.inc lude(RequestDispatcherImpl.java:485) at
    com.caucho.server.webapp.RequestDispatcherImpl.inc lude(RequestDispatcherImpl.java:350) at
    org.opencms.flex.CmsFlexRequestDispatcher.includeE xternal(CmsFlexRequestDispatcher.java:194) at
    org.opencms.flex.CmsFlexRequestDispatcher.include( CmsFlexRequestDispatcher.java:169) at
    org.opencms.loader.CmsJspLoader.service(CmsJspLoad er.java:1193) at
    org.opencms.flex.CmsFlexRequestDispatcher.includeI nternalWithCache(CmsFlexRequestDispatcher.java:423 ) at
    org.opencms.flex.CmsFlexRequestDispatcher.include( CmsFlexRequestDispatcher.java:173) at
    org.opencms.jsp.CmsJspTagInclude.includeActionWith Cache(CmsJspTagInclude.java:364) ... 45 more

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,746
    Rep Power
    19

    Default

    Why are you mixing the two?
    That's like mixing to versions of jar file and expecting to be able to use both in a single class.

Similar Threads

  1. Why are we using JSTL in jsp?
    By makpandian in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 06-30-2009, 10:15 PM
  2. jstl in jsp
    By nagaprasanna in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-18-2008, 08:18 AM
  3. ParseException
    By Preethi in forum New To Java
    Replies: 1
    Last Post: 02-13-2008, 06:27 PM
  4. Valid declarations
    By heat84 in forum New To Java
    Replies: 1
    Last Post: 12-22-2007, 02:29 AM
  5. Help with valid declarations of a float
    By baltimore in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 10:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •