Mantis - Resin
Viewing Issue Advanced Details
1595 minor always 02-01-07 07:41 04-03-07 14:27
ferg  
ferg  
normal  
closed  
fixed  
none    
none 3.1.1  
0001595: jsp taglib with multiple declarations
(rep by Murthy ch)


I am new to resin websever.I am facing some problems when i try to use resin
as webserver for a webapplication we developed.

I am getting the following error when i tried to load the jsp page.

[22:57:06.312] Caused by: com.caucho.jsp.JspLineParseException:
/jsp/common/taglibs.jsp:1: The taglib prefix 'c' must be defined before any
matching p
refixes are used.
[22:57:06.312]
[22:57:06.312] 1: <%@ taglib uri="http://java.sun.com/jstl/core_rt" [^]
prefix="c" %>
[22:57:06.312] 2: <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" [^]
prefix="fn" %>
[22:57:06.312] 3: <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" [^]
prefix="fmt" %>
[22:57:06.312]
[22:57:06.312] at com.caucho.jsp.JspParser.error(JspParser.java:1779)
[22:57:06.312] at
com.caucho.jsp.JspParser.processTaglibDirective(JspParser.java:1345)
[22:57:06.312] at
com.caucho.jsp.JspParser.parseDirective(JspParser.java:884)
[22:57:06.312] at
com.caucho.jsp.JspParser.parseScriptlet(JspParser.java:758)
[22:57:06.312] at com.caucho.jsp.JspParser.parseNode(JspParser.java:462)
[22:57:06.312] at com.caucho.jsp.JspParser.parseJsp(JspParser.java:362)
[22:57:06.312] at com.caucho.jsp.JspParser.parse(JspParser.java:255)
[22:57:06.312] at
com.caucho.jsp.JspCompilerInstance.generate(JspCompilerInstance.java:489)
[22:57:06.312] at
com.caucho.jsp.JspCompilerInstance.compile(JspCompilerInstance.java:386)
[22:57:06.312] at com.caucho.jsp.JspManager.compile(JspManager.java:236)
[22:57:06.312] at com.caucho.jsp.JspManager.createPage(JspManager.java:166)
[22:57:06.312] at com.caucho.jsp.JspManager.createPage(JspManager.java:146)
[22:57:06.312] at com.caucho.jsp.PageManager.getPage(PageManager.java:241)
[22:57:06.312] at com.caucho.jsp.PageManager.getPage(PageManager.java:157)
[22:57:06.312] at com.caucho.jsp.QServlet.getSubPage(QServlet.java:294)
[22:57:06.312] at com.caucho.jsp.QServlet.getPage(QServlet.java:210)
[22:57:06.312] at
com.caucho.server.dispatch.PageFilterChain.compilePage(PageFilterChain.java:233)
[22:57:06.312] at
com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:143)
[22:57:06.312] at
com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:97)
[22:57:06.312] at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:226)
[22:57:06.312] at
com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:279)
[22:57:06.312] at
com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:108)
[22:57:06.312] at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
[22:57:06.312] at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
[22:57:06.312] at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
[22:57:06.312] at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
[22:57:06.312] at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
[22:57:06.312] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
[22:57:06.312] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
[22:57:06.312] at
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103)
[22:57:06.312] at
com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:97)
[22:57:06.312] at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:226)
[22:57:06.312] at
com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:488)
[22:57:06.312] at
com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:353)
[22:57:06.312] at
org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:296)
[22:57:06.312] ... 76 more

After looking in to the jsp code what we written, and understand this
problem is causing because of we defined jsp tablib directive multiple
places.




when if we use any tablib references in between the tablib directive
declaration we are getting the above error.


Basically we are including the some jsp pages in the main page.so we are
defining the tablib primitives in the subpages also

for Ex:

MainPage.jsp

-----------------x-----------------x-------------------- Start of the
mainpage.jsp
---------------x----------------------------------x--------------------

<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" [^] prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" [^] prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" [^] prefix="fmt" %>


<@include file="/jsp/include/Menu.jsp"@>


-----------------x-----------------x---------------------end of the
mainpage.jsp
--------------x----------------------------------x--------------------

Menu.jsp
-----------------x-----------------x------------------ start of the
menu.jsp
----------------x----------------------------------x--------------------

<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" [^] prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" [^] prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" [^] prefix="fmt" %>



  • menu1


  • menu2



-----------------x-----------------x------------------- end of the menu.jsp
----------------x----------------------------------x--------------------

When i try to load the jsp MainPage.jsp i am getting this error.


Can any one have any idea please update me please.

Notes
(0001775)
seanmoore   
03-18-07 18:23   
I am current user of resin 2 and was looking to jump to 3.1.0 but this bug breaks a lot of code. Resin 3.0.23 works fine. Thanks
(0001805)
ferg   
04-03-07 14:27   
jsp/18cu