tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42943] New: - jsp:text gets confused with other *:text elements in a JSP tag file
Date Fri, 20 Jul 2007 10:46:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42943>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42943

           Summary: jsp:text gets confused with other *:text elements in a
                    JSP tag file
           Product: Tomcat 5
           Version: 5.0.30
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: vojtech@x-hive.com


I have a JSP .tag file (label.tagx) that I want to use in other JSPs. The tag
file looks as follows:

<jsp:root version="2.0"
   xmlns:jsp="http://java.sun.com/JSP/Page">
  <jsp:directive.tag body-content="scriptless"/>
  <dul:text xmlns:dul="http://www.whatever.com/dul"><jsp:doBody/></dul:text>
</jsp:root>


When I want to use this tag file in a JSP:

...
<tagx:label>blablabla</tagx:label>
...

I get the stacktrace at the end of this message.

However, if I replace the dul:text element with something else, such as
dul:dul:textzz, then everything works fine:

<jsp:root version="2.0"
   xmlns:jsp="http://java.sun.com/JSP/Page">
  <jsp:directive.tag body-content="scriptless"/>
  <dul:textzz xmlns:dul="http://www.whatever.com/dul"><jsp:doBody/></dul:textzz>
</jsp:root>

Seems like the dul:text and jsp:text tags get confused (namespace problems?)
somewhere during the page compilation.

Stacktrace:

2007-07-20 12:05:50,828 [http-8080-Processor25] ERROR
org.apache.struts.taglib.tiles.InsertTag - ServletException in
'/WEB-INF/jsp/test-page.jsp': /WEB-INF/tags/label.tagx(6,90) &lt;jsp:text&gt;
must not have any subelements
org.apache.jasper.JasperException: /WEB-INF/tags/label.tagx(6,90)
&lt;jsp:text&gt; must not have any subelements
	at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:90)
	at org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:201)
	at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:197)
	at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
	at
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:201)
	at
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:514)
	at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:47)
	at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:565)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2324)
	at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1185)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:569)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2224)
	at org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:525)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at
org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:583)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:226)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
	at
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:201)
	at
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:514)
	at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:47)
	at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:565)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2324)
	at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1185)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2324)
	at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1185)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:569)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2324)
	at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1185)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2324)
	at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1185)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2324)
	at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1185)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:569)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2224)
	at org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:525)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
	at
org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:583)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:226)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:585)
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:602)
	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:101)
	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:137)
	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:758)
	at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:890)
	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
	at
org.apache.jsp.WEB_002dINF.jsp.layouts.default_jsp._jspx_meth_tiles_insert_4(default_jsp.java:401)
	at
org.apache.jsp.WEB_002dINF.jsp.layouts.default_jsp._jspService(default_jsp.java:135)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
	at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
	at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
	at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message