You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by James Strachan <ja...@yahoo.co.uk> on 2001/10/19 10:48:29 UTC

Re: XTags &

Hi Manuel

I'm  CC'ing the list in case anyone else hits this one too.

Basically in Servlet 2.2 & JSP 1.1 you cannot do a <jsp:include> inside a
JSP BodyTag. The only way to do looping custom tags in Servlet 2.2/JSP 1.1
is to use a BodyTag. So <xtags:forEach> is a BodyTag.

So you cannot do a <jsp:include> inside an <xtags:forEach> tag on Servlets
2.2/JSP 1.1.

Though if you use Servlet 2.3 / JSP 1.2 (such as Tomcat 4.0) you'll be
fine - this restriction has been lifted.

James
----- Original Message -----
From: "Manuel Tromm" <tr...@oTRIs.de>
To: <ja...@yahoo.co.uk>
Sent: Friday, October 19, 2001 9:45 AM
Subject: XTags & <jsp:include...>


> Hi James,
>
> I think I've found a bug in the XTags lib.
> Including a JSP-File via <jsp:include page="..." flush="true" />
> within an <xtags:forEach>-Tag will lead to an IOException
> ("Illegal to flush within a custom tag...").
> I use Tomcat 3.2.3. - I've attached two test files to this mail.
> Did I something wrong? - Thanks for your help!  ;-)
>
> Regards,
> Manuel
>
>
>
> <h1>Error: 500</h1>
> <h2>Location: /jsp/form/test.jsp</h2><b>Internal Servlet
> Error:</b><br><pre>java.io.IOException: Illegal to flush within a custom
tag
> at javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:87)
> at
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:413)
> at
>
jsp.f_00025rm._0002fjsp_0002fform_0002ftest_0002ejsptest_jsp_2._jspService(_
> 0002fjsp_0002fform_0002ftest_0002ejsptest_jsp_2.java:156)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
> va:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:282)
> at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:213)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> at java.lang.Thread.run(Thread.java:484)
> </pre>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: error with xtags and tomcat 3.3

Posted by Richard Sand <rs...@vgalleries.com>.
My fault- the example that crashed had its corresponding xml file referenced
absolutely instead of relatively, and I had the examples in a subdirectory
whic broke the absolute path.  I guess when i saw the period-table example
show 112 atoms for every element i just figured that one of the libraries
was broken.

Sorry for the confusion and thanks for your help!

Best regards,

Richard
----- Original Message -----
From: "James Strachan" <ja...@yahoo.co.uk>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Sunday, November 11, 2001 10:45 AM
Subject: Re: error with xtags and tomcat 3.3


> Hmm, again this one is wierd. It all works fine for me on Tomcat 4.0.
>
> > periodic_table2 shows every element as having 112 atoms.
>
> It should. Admitedly its a lousy example but the XPath expression is just
> counting all atoms in the periodic table.
>
> James
> ----- Original Message -----
> From: "Richard Sand" <rs...@vgalleries.com>
> To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> Sent: Saturday, November 10, 2001 1:11 PM
> Subject: Re: error with xtags and tomcat 3.3
>
>
> > Hi James,
> >
> > I still believe there is something broken between dom4j-full.jar (v1.1)
> and
> > the latest xtags build (the one you just updated, the nov 10 build).  I
> > uncompressed the examples and are running them unmodified on tomcat 3.3
> with
> > jdk 1.3.01 and the only classes in my application classpath are
> > dom4j-full.jar and xtags.jar.  Some of the examples work, for example,
the
> > simple rss example and the stock quote example.  However, the
> periodic_table
> > and much_ado examples both give an exception (shown below), and
> > periodic_table2 shows every element as having 112 atoms.  Any
suggestions?
> > Thanks!
> >
> > -Richard
> >
> > Location: /docs/xtags/examples/much_ado.jsp
> > Internal Servlet Error:
> >
> > javax.servlet.ServletException: no more input Nested exception: no more
> > input
> > at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
> > Source)
> > at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
> > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> > at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> > at org.apache.tomcat.core.Handler.service(Unknown Source)
> > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> > at
> >
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> > Source)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> > Source)
> > at java.lang.Thread.run(Thread.java:484)
> > Root cause:
> > org.dom4j.DocumentException: no more input Nested exception: no more
input
> > at org.dom4j.io.SAXReader.read(SAXReader.java:333)
> > at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> > at
org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> > at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> > at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> > at org.apache.tomcat.core.Handler.service(Unknown Source)
> > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> > at
> >
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> > Source)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> > Source)
> > at java.lang.Thread.run(Thread.java:484)
> > Nested exception:
> > java.io.EOFException: no more input
> > at org.dom4j.io.aelfred.XmlParser.popInput(XmlParser.java:3983)
> > at org.dom4j.io.aelfred.XmlParser.readCh(XmlParser.java:3376)
> > at org.dom4j.io.aelfred.XmlParser.tryRead(XmlParser.java:4060)
> > at org.dom4j.io.aelfred.XmlParser.tryEncodingDecl(XmlParser.java:3665)
> > at org.dom4j.io.aelfred.XmlParser.pushURL(XmlParser.java:3560)
> > at org.dom4j.io.aelfred.XmlParser.doParse(XmlParser.java:147)
> > at org.dom4j.io.aelfred.SAXDriver.parse(SAXDriver.java:315)
> > at org.dom4j.io.SAXReader.read(SAXReader.java:314)
> > at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> > at
org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> > at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> > at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> > at org.apache.tomcat.core.Handler.service(Unknown Source)
> > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> > at
> >
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> > Source)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> > Source)
> > at java.lang.Thread.run(Thread.java:484)
> > ----- Original Message -----
> > From: "James Strachan" <ja...@yahoo.co.uk>
> > To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> > Sent: Friday, November 09, 2001 7:22 PM
> > Subject: Re: error with xtags and tomcat 3.3
> >
> >
> > > Hi Richard.
> > >
> > > I've patched the XTags code to work properly with dom4j 1.1. Hopefully
> > Glenn
> > > will also update the nightly build soon as well.
> > >
> > > Until then the latest CVS image should work also..
> > >
> > > James
> > > ----- Original Message -----
> > > From: "Richard Sand" <rs...@vgalleries.com>
> > > To: <ta...@jakarta.apache.org>
> > > Sent: Thursday, November 08, 2001 1:20 AM
> > > Subject: error with xtags and tomcat 3.3
> > >
> > >
> > > > Hi- I am using the Nov 6 build of xtags and I just today upgraded my
> > > tomcat
> > > > from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.
> > The
> > > > error I get is:
> > > >
> > > > java.lang.AbstractMethodError:
> > > > org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
> > > > at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
> > > > at org.jaxen.Context.getVariableValue(Context.java:57)
> > > > at
> > > >
> > >
> >
>
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
> > > > eExpr.java:60)
> > > > at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
> > > > at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
> > > > at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
> > > > at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
> > > > at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
> > > > at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
> > > > at
> > > >
> >
org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
> > > > at help.help_1._jspService(help_1.java, Compiled Code)
> > > > .......etc.
> > > >
> > > > I'm suspecting a version conflict in one of the jar files but I
> haven't
> > > been
> > > > able to track it down.  Anyone have any suggestions?  I'm also using
> the
> > > > most recent dom4j-full.jar.
> > > >
> > > > Thanks!
> > > >
> > > > Best regards,
> > > >
> > > > Richard
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: error with xtags and tomcat 3.3

Posted by James Strachan <ja...@yahoo.co.uk>.
Hmm, again this one is wierd. It all works fine for me on Tomcat 4.0.

> periodic_table2 shows every element as having 112 atoms.

It should. Admitedly its a lousy example but the XPath expression is just
counting all atoms in the periodic table.

James
----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Saturday, November 10, 2001 1:11 PM
Subject: Re: error with xtags and tomcat 3.3


> Hi James,
>
> I still believe there is something broken between dom4j-full.jar (v1.1)
and
> the latest xtags build (the one you just updated, the nov 10 build).  I
> uncompressed the examples and are running them unmodified on tomcat 3.3
with
> jdk 1.3.01 and the only classes in my application classpath are
> dom4j-full.jar and xtags.jar.  Some of the examples work, for example, the
> simple rss example and the stock quote example.  However, the
periodic_table
> and much_ado examples both give an exception (shown below), and
> periodic_table2 shows every element as having 112 atoms.  Any suggestions?
> Thanks!
>
> -Richard
>
> Location: /docs/xtags/examples/much_ado.jsp
> Internal Servlet Error:
>
> javax.servlet.ServletException: no more input Nested exception: no more
> input
> at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
> Source)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> Root cause:
> org.dom4j.DocumentException: no more input Nested exception: no more input
> at org.dom4j.io.SAXReader.read(SAXReader.java:333)
> at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> Nested exception:
> java.io.EOFException: no more input
> at org.dom4j.io.aelfred.XmlParser.popInput(XmlParser.java:3983)
> at org.dom4j.io.aelfred.XmlParser.readCh(XmlParser.java:3376)
> at org.dom4j.io.aelfred.XmlParser.tryRead(XmlParser.java:4060)
> at org.dom4j.io.aelfred.XmlParser.tryEncodingDecl(XmlParser.java:3665)
> at org.dom4j.io.aelfred.XmlParser.pushURL(XmlParser.java:3560)
> at org.dom4j.io.aelfred.XmlParser.doParse(XmlParser.java:147)
> at org.dom4j.io.aelfred.SAXDriver.parse(SAXDriver.java:315)
> at org.dom4j.io.SAXReader.read(SAXReader.java:314)
> at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> ----- Original Message -----
> From: "James Strachan" <ja...@yahoo.co.uk>
> To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> Sent: Friday, November 09, 2001 7:22 PM
> Subject: Re: error with xtags and tomcat 3.3
>
>
> > Hi Richard.
> >
> > I've patched the XTags code to work properly with dom4j 1.1. Hopefully
> Glenn
> > will also update the nightly build soon as well.
> >
> > Until then the latest CVS image should work also..
> >
> > James
> > ----- Original Message -----
> > From: "Richard Sand" <rs...@vgalleries.com>
> > To: <ta...@jakarta.apache.org>
> > Sent: Thursday, November 08, 2001 1:20 AM
> > Subject: error with xtags and tomcat 3.3
> >
> >
> > > Hi- I am using the Nov 6 build of xtags and I just today upgraded my
> > tomcat
> > > from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.
> The
> > > error I get is:
> > >
> > > java.lang.AbstractMethodError:
> > > org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
> > > at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
> > > at org.jaxen.Context.getVariableValue(Context.java:57)
> > > at
> > >
> >
>
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
> > > eExpr.java:60)
> > > at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
> > > at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
> > > at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
> > > at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
> > > at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
> > > at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
> > > at
> > >
> org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
> > > at help.help_1._jspService(help_1.java, Compiled Code)
> > > .......etc.
> > >
> > > I'm suspecting a version conflict in one of the jar files but I
haven't
> > been
> > > able to track it down.  Anyone have any suggestions?  I'm also using
the
> > > most recent dom4j-full.jar.
> > >
> > > Thanks!
> > >
> > > Best regards,
> > >
> > > Richard
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: error with xtags and tomcat 3.3

Posted by James Strachan <ja...@yahoo.co.uk>.
Wierd. I can run the samples fine. Could it be an old version of crimson? Do
you get the same problem when running on Tomcat 4.0?

James
----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Saturday, November 10, 2001 1:19 PM
Subject: Re: error with xtags and tomcat 3.3


> I tried the much_ado example again with the jar files that ship with the
> xtags distribution and it doesn't work either, but the exception is
> different:
>
> Location: /docs/xtags/examples/much_ado.jsp
> Internal Servlet Error:
>
> javax.servlet.ServletException: Error on line 1 of document  :
> org.apache.crimson.parser/P-067 Nested exception:
> org.apache.crimson.parser/P-067
> at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
> Source)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> Root cause:
> org.dom4j.DocumentException: Error on line 1 of document  :
> org.apache.crimson.parser/P-067 Nested exception:
> org.apache.crimson.parser/P-067
> at org.dom4j.io.SAXReader.read(SAXReader.java:330)
> at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> Nested exception:
> org.xml.sax.SAXParseException: org.apache.crimson.parser/P-067
> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023)
> at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
> at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
> at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
> at org.dom4j.io.SAXReader.read(SAXReader.java:314)
> at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
>
>
> ----- Original Message -----
> From: "Richard Sand" <rs...@vgalleries.com>
> To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> Sent: Saturday, November 10, 2001 2:11 PM
> Subject: Re: error with xtags and tomcat 3.3
>
>
> > Hi James,
> >
> > I still believe there is something broken between dom4j-full.jar (v1.1)
> and
> > the latest xtags build (the one you just updated, the nov 10 build).  I
> > uncompressed the examples and are running them unmodified on tomcat 3.3
> with
> > jdk 1.3.01 and the only classes in my application classpath are
> > dom4j-full.jar and xtags.jar.  Some of the examples work, for example,
the
> > simple rss example and the stock quote example.  However, the
> periodic_table
> > and much_ado examples both give an exception (shown below), and
> > periodic_table2 shows every element as having 112 atoms.  Any
suggestions?
> > Thanks!
> >
> > -Richard
> >
> > Location: /docs/xtags/examples/much_ado.jsp
> > Internal Servlet Error:
> >
> > javax.servlet.ServletException: no more input Nested exception: no more
> > input
> > at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
> > Source)
> > at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
> > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> > at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> > at org.apache.tomcat.core.Handler.service(Unknown Source)
> > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> > at
> >
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> > Source)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> > Source)
> > at java.lang.Thread.run(Thread.java:484)
> > Root cause:
> > org.dom4j.DocumentException: no more input Nested exception: no more
input
> > at org.dom4j.io.SAXReader.read(SAXReader.java:333)
> > at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> > at
org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> > at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> > at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> > at org.apache.tomcat.core.Handler.service(Unknown Source)
> > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> > at
> >
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> > Source)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> > Source)
> > at java.lang.Thread.run(Thread.java:484)
> > Nested exception:
> > java.io.EOFException: no more input
> > at org.dom4j.io.aelfred.XmlParser.popInput(XmlParser.java:3983)
> > at org.dom4j.io.aelfred.XmlParser.readCh(XmlParser.java:3376)
> > at org.dom4j.io.aelfred.XmlParser.tryRead(XmlParser.java:4060)
> > at org.dom4j.io.aelfred.XmlParser.tryEncodingDecl(XmlParser.java:3665)
> > at org.dom4j.io.aelfred.XmlParser.pushURL(XmlParser.java:3560)
> > at org.dom4j.io.aelfred.XmlParser.doParse(XmlParser.java:147)
> > at org.dom4j.io.aelfred.SAXDriver.parse(SAXDriver.java:315)
> > at org.dom4j.io.SAXReader.read(SAXReader.java:314)
> > at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> > at
org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> > at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> > at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> > at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> > at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> > at org.apache.tomcat.core.Handler.service(Unknown Source)
> > at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> > at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> > at
> >
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> > Source)
> > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> > Source)
> > at java.lang.Thread.run(Thread.java:484)
> > ----- Original Message -----
> > From: "James Strachan" <ja...@yahoo.co.uk>
> > To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> > Sent: Friday, November 09, 2001 7:22 PM
> > Subject: Re: error with xtags and tomcat 3.3
> >
> >
> > > Hi Richard.
> > >
> > > I've patched the XTags code to work properly with dom4j 1.1. Hopefully
> > Glenn
> > > will also update the nightly build soon as well.
> > >
> > > Until then the latest CVS image should work also..
> > >
> > > James
> > > ----- Original Message -----
> > > From: "Richard Sand" <rs...@vgalleries.com>
> > > To: <ta...@jakarta.apache.org>
> > > Sent: Thursday, November 08, 2001 1:20 AM
> > > Subject: error with xtags and tomcat 3.3
> > >
> > >
> > > > Hi- I am using the Nov 6 build of xtags and I just today upgraded my
> > > tomcat
> > > > from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.
> > The
> > > > error I get is:
> > > >
> > > > java.lang.AbstractMethodError:
> > > > org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
> > > > at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
> > > > at org.jaxen.Context.getVariableValue(Context.java:57)
> > > > at
> > > >
> > >
> >
>
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
> > > > eExpr.java:60)
> > > > at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
> > > > at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
> > > > at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
> > > > at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
> > > > at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
> > > > at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
> > > > at
> > > >
> >
org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
> > > > at help.help_1._jspService(help_1.java, Compiled Code)
> > > > .......etc.
> > > >
> > > > I'm suspecting a version conflict in one of the jar files but I
> haven't
> > > been
> > > > able to track it down.  Anyone have any suggestions?  I'm also using
> the
> > > > most recent dom4j-full.jar.
> > > >
> > > > Thanks!
> > > >
> > > > Best regards,
> > > >
> > > > Richard
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > > >
> > >
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: error with xtags and tomcat 3.3

Posted by Richard Sand <rs...@vgalleries.com>.
I tried the much_ado example again with the jar files that ship with the
xtags distribution and it doesn't work either, but the exception is
different:

Location: /docs/xtags/examples/much_ado.jsp
Internal Servlet Error:

javax.servlet.ServletException: Error on line 1 of document  :
org.apache.crimson.parser/P-067 Nested exception:
org.apache.crimson.parser/P-067
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
Source)
	at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)
Root cause:
org.dom4j.DocumentException: Error on line 1 of document  :
org.apache.crimson.parser/P-067 Nested exception:
org.apache.crimson.parser/P-067
	at org.dom4j.io.SAXReader.read(SAXReader.java:330)
	at org.dom4j.io.SAXReader.read(SAXReader.java:249)
	at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
	at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)
Nested exception:
org.xml.sax.SAXParseException: org.apache.crimson.parser/P-067
	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
	at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023)
	at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
	at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
	at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
	at org.dom4j.io.SAXReader.read(SAXReader.java:314)
	at org.dom4j.io.SAXReader.read(SAXReader.java:249)
	at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
	at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)


----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Saturday, November 10, 2001 2:11 PM
Subject: Re: error with xtags and tomcat 3.3


> Hi James,
>
> I still believe there is something broken between dom4j-full.jar (v1.1)
and
> the latest xtags build (the one you just updated, the nov 10 build).  I
> uncompressed the examples and are running them unmodified on tomcat 3.3
with
> jdk 1.3.01 and the only classes in my application classpath are
> dom4j-full.jar and xtags.jar.  Some of the examples work, for example, the
> simple rss example and the stock quote example.  However, the
periodic_table
> and much_ado examples both give an exception (shown below), and
> periodic_table2 shows every element as having 112 atoms.  Any suggestions?
> Thanks!
>
> -Richard
>
> Location: /docs/xtags/examples/much_ado.jsp
> Internal Servlet Error:
>
> javax.servlet.ServletException: no more input Nested exception: no more
> input
> at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
> Source)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> Root cause:
> org.dom4j.DocumentException: no more input Nested exception: no more input
> at org.dom4j.io.SAXReader.read(SAXReader.java:333)
> at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> Nested exception:
> java.io.EOFException: no more input
> at org.dom4j.io.aelfred.XmlParser.popInput(XmlParser.java:3983)
> at org.dom4j.io.aelfred.XmlParser.readCh(XmlParser.java:3376)
> at org.dom4j.io.aelfred.XmlParser.tryRead(XmlParser.java:4060)
> at org.dom4j.io.aelfred.XmlParser.tryEncodingDecl(XmlParser.java:3665)
> at org.dom4j.io.aelfred.XmlParser.pushURL(XmlParser.java:3560)
> at org.dom4j.io.aelfred.XmlParser.doParse(XmlParser.java:147)
> at org.dom4j.io.aelfred.SAXDriver.parse(SAXDriver.java:315)
> at org.dom4j.io.SAXReader.read(SAXReader.java:314)
> at org.dom4j.io.SAXReader.read(SAXReader.java:249)
> at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
> at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
> at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
> at org.apache.tomcat.core.Handler.invoke(Unknown Source)
> at org.apache.tomcat.core.Handler.service(Unknown Source)
> at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
> at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
> at org.apache.tomcat.core.ContextManager.service(Unknown Source)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
> Source)
> at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:484)
> ----- Original Message -----
> From: "James Strachan" <ja...@yahoo.co.uk>
> To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> Sent: Friday, November 09, 2001 7:22 PM
> Subject: Re: error with xtags and tomcat 3.3
>
>
> > Hi Richard.
> >
> > I've patched the XTags code to work properly with dom4j 1.1. Hopefully
> Glenn
> > will also update the nightly build soon as well.
> >
> > Until then the latest CVS image should work also..
> >
> > James
> > ----- Original Message -----
> > From: "Richard Sand" <rs...@vgalleries.com>
> > To: <ta...@jakarta.apache.org>
> > Sent: Thursday, November 08, 2001 1:20 AM
> > Subject: error with xtags and tomcat 3.3
> >
> >
> > > Hi- I am using the Nov 6 build of xtags and I just today upgraded my
> > tomcat
> > > from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.
> The
> > > error I get is:
> > >
> > > java.lang.AbstractMethodError:
> > > org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
> > > at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
> > > at org.jaxen.Context.getVariableValue(Context.java:57)
> > > at
> > >
> >
>
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
> > > eExpr.java:60)
> > > at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
> > > at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
> > > at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
> > > at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
> > > at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
> > > at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
> > > at
> > >
> org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
> > > at help.help_1._jspService(help_1.java, Compiled Code)
> > > .......etc.
> > >
> > > I'm suspecting a version conflict in one of the jar files but I
haven't
> > been
> > > able to track it down.  Anyone have any suggestions?  I'm also using
the
> > > most recent dom4j-full.jar.
> > >
> > > Thanks!
> > >
> > > Best regards,
> > >
> > > Richard
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: error with xtags and tomcat 3.3

Posted by Richard Sand <rs...@vgalleries.com>.
Hi James,

I still believe there is something broken between dom4j-full.jar (v1.1) and
the latest xtags build (the one you just updated, the nov 10 build).  I
uncompressed the examples and are running them unmodified on tomcat 3.3 with
jdk 1.3.01 and the only classes in my application classpath are
dom4j-full.jar and xtags.jar.  Some of the examples work, for example, the
simple rss example and the stock quote example.  However, the periodic_table
and much_ado examples both give an exception (shown below), and
periodic_table2 shows every element as having 112 atoms.  Any suggestions?
Thanks!

-Richard

Location: /docs/xtags/examples/much_ado.jsp
Internal Servlet Error:

javax.servlet.ServletException: no more input Nested exception: no more
input
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
Source)
	at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:874)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)
Root cause:
org.dom4j.DocumentException: no more input Nested exception: no more input
	at org.dom4j.io.SAXReader.read(SAXReader.java:333)
	at org.dom4j.io.SAXReader.read(SAXReader.java:249)
	at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
	at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)
Nested exception:
java.io.EOFException: no more input
	at org.dom4j.io.aelfred.XmlParser.popInput(XmlParser.java:3983)
	at org.dom4j.io.aelfred.XmlParser.readCh(XmlParser.java:3376)
	at org.dom4j.io.aelfred.XmlParser.tryRead(XmlParser.java:4060)
	at org.dom4j.io.aelfred.XmlParser.tryEncodingDecl(XmlParser.java:3665)
	at org.dom4j.io.aelfred.XmlParser.pushURL(XmlParser.java:3560)
	at org.dom4j.io.aelfred.XmlParser.doParse(XmlParser.java:147)
	at org.dom4j.io.aelfred.SAXDriver.parse(SAXDriver.java:315)
	at org.dom4j.io.SAXReader.read(SAXReader.java:314)
	at org.dom4j.io.SAXReader.read(SAXReader.java:249)
	at org.apache.taglibs.xtags.xpath.ParseTag.doAfterBody(ParseTag.java:138)
	at docs.xtags.examples.much_ado_1._jspService(much_ado_1.java:187)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)
----- Original Message -----
From: "James Strachan" <ja...@yahoo.co.uk>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Friday, November 09, 2001 7:22 PM
Subject: Re: error with xtags and tomcat 3.3


> Hi Richard.
>
> I've patched the XTags code to work properly with dom4j 1.1. Hopefully
Glenn
> will also update the nightly build soon as well.
>
> Until then the latest CVS image should work also..
>
> James
> ----- Original Message -----
> From: "Richard Sand" <rs...@vgalleries.com>
> To: <ta...@jakarta.apache.org>
> Sent: Thursday, November 08, 2001 1:20 AM
> Subject: error with xtags and tomcat 3.3
>
>
> > Hi- I am using the Nov 6 build of xtags and I just today upgraded my
> tomcat
> > from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.
The
> > error I get is:
> >
> > java.lang.AbstractMethodError:
> > org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
> > at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
> > at org.jaxen.Context.getVariableValue(Context.java:57)
> > at
> >
>
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
> > eExpr.java:60)
> > at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
> > at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
> > at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
> > at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
> > at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
> > at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
> > at
> >
org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
> > at help.help_1._jspService(help_1.java, Compiled Code)
> > .......etc.
> >
> > I'm suspecting a version conflict in one of the jar files but I haven't
> been
> > able to track it down.  Anyone have any suggestions?  I'm also using the
> > most recent dom4j-full.jar.
> >
> > Thanks!
> >
> > Best regards,
> >
> > Richard
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: error with xtags and tomcat 3.3

Posted by James Strachan <ja...@yahoo.co.uk>.
Hi Richard.

I've patched the XTags code to work properly with dom4j 1.1. Hopefully Glenn
will also update the nightly build soon as well.

Until then the latest CVS image should work also..

James
----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 1:20 AM
Subject: error with xtags and tomcat 3.3


> Hi- I am using the Nov 6 build of xtags and I just today upgraded my
tomcat
> from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.  The
> error I get is:
>
> java.lang.AbstractMethodError:
> org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
> at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
> at org.jaxen.Context.getVariableValue(Context.java:57)
> at
>
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
> eExpr.java:60)
> at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
> at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
> at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
> at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
> at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
> at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
> at
> org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
> at help.help_1._jspService(help_1.java, Compiled Code)
> .......etc.
>
> I'm suspecting a version conflict in one of the jar files but I haven't
been
> able to track it down.  Anyone have any suggestions?  I'm also using the
> most recent dom4j-full.jar.
>
> Thanks!
>
> Best regards,
>
> Richard
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


xtags supports JSP scopes (was Re: error with xtags and tomcat 3.3)

Posted by James Strachan <ja...@yahoo.co.uk>.
Hi Richard

Also while patching the code I've also added support for explicit JSP
scopes. So that in XPath expressions the following expressions can now be
used...

$page:foo    -> page scope "foo"
$request:foo    -> request scope "foo"
$session:foo    -> session scope "foo"
$app:foo    -> applicaiton scope "foo"

$param:foo -> request.getParameter( "foo" );
$initParam:foo -> context.getInitParameter( "foo" );

$header:foo -> request.getHeader( "foo" );
$cookie:foo        -> get Cookie for name "foo" and return Cookie.getValue()

e.g.

<xtags:if test="starts-with($header:agent, 'Mozilla')">
    ....
</xtags:if>

James
----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 1:20 AM
Subject: error with xtags and tomcat 3.3


> Hi- I am using the Nov 6 build of xtags and I just today upgraded my
tomcat
> from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.  The
> error I get is:
>
> java.lang.AbstractMethodError:
> org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
> at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
> at org.jaxen.Context.getVariableValue(Context.java:57)
> at
>
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
> eExpr.java:60)
> at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
> at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
> at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
> at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
> at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
> at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
> at
> org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
> at help.help_1._jspService(help_1.java, Compiled Code)
> .......etc.
>
> I'm suspecting a version conflict in one of the jar files but I haven't
been
> able to track it down.  Anyone have any suggestions?  I'm also using the
> most recent dom4j-full.jar.
>
> Thanks!
>
> Best regards,
>
> Richard
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


error with xtags and tomcat 3.3

Posted by Richard Sand <rs...@vgalleries.com>.
Hi- I am using the Nov 6 build of xtags and I just today upgraded my tomcat
from 3.2.2 to 3.3.  Suddenly, my jsp page using xtags will not work.  The
error I get is:

java.lang.AbstractMethodError:
org/apache/taglibs/xtags/util/JspVariableContext.getVariableValue
	at org.jaxen.ContextSupport.getVariableValue(ContextSupport.java:97)
	at org.jaxen.Context.getVariableValue(Context.java:57)
	at
org.jaxen.expr.DefaultVariableReferenceExpr.evaluate(DefaultVariableReferenc
eExpr.java:60)
	at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
	at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
	at org.jaxen.JaXPath.jaSelectSingleNode(JaXPath.java:40)
	at org.jaxen.JaXPath.jaValueOf(JaXPath.java:52)
	at org.jaxen.BaseXPath.valueOf(BaseXPath.java:32)
	at org.dom4j.xpath.DefaultXPath.valueOf(DefaultXPath.java:169)
	at
org.apache.taglibs.xtags.xpath.VariableTag.doStartTag(VariableTag.java:99)
	at help.help_1._jspService(help_1.java, Compiled Code)
.......etc.

I'm suspecting a version conflict in one of the jar files but I haven't been
able to track it down.  Anyone have any suggestions?  I'm also using the
most recent dom4j-full.jar.

Thanks!

Best regards,

Richard





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: xtags question with when tag

Posted by James Strachan <ja...@yahoo.co.uk>.
Hi Richard

----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
> Hi all,
>
> I have a simple xtags file that loops through all of the topics and
keywords
> in an xml help file.
>
> My loop is:
>
> <xtags:forEach select="/help/topic | /help/keyword">
>
> Within this loop, I want to process topics different than keywords.  I
> haven't been able to find a way to do this. I tried to do it by testing
for
> the existence of a child that only exists for a keyword, but the xtag:when
> tag doesn't seem to accept wildcards in its test parameter, i.e.:
>
> <xtags:forEach select="/help/topic | /help/keyword">
>    <xtags:choose>
>       <xtags:when test="keyword_file=*">
>          ....
>       </xtags:when>
>       <xtags:otherwise>
>          .....
>       </xtags:otherwise>
>    </xtags:choose>
> </xtags:forEach>

You could try this...

<xtags:when test="keyword_file">

which will match if the current node (a <keyword> or <topic>) has at least
one child <keyword_file> child.

> Is there some way to do this?

Maybe something like this, iterate through all children of <help> then
branch based on the name

<xtags:forEach select="/help/*">
   <xtags:choose>
      <xtags:when test="name()='topic'">
         ....
        process a <topic>
        ...
      </xtags:when>
      <xtags:when test="name()='keyword'">

         ....

        process a <keyword>
        ...
      </xtags:when>
      <xtags:otherwise>
         .....
      </xtags:otherwise>
   </xtags:choose>
</xtags:forEach>


James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


xtags question with when tag

Posted by Richard Sand <rs...@vgalleries.com>.
Hi all,

I have a simple xtags file that loops through all of the topics and keywords
in an xml help file.

My loop is:

<xtags:forEach select="/help/topic | /help/keyword">

Within this loop, I want to process topics different than keywords.  I
haven't been able to find a way to do this. I tried to do it by testing for
the existence of a child that only exists for a keyword, but the xtag:when
tag doesn't seem to accept wildcards in its test parameter, i.e.:

<xtags:forEach select="/help/topic | /help/keyword">
   <xtags:choose>
      <xtags:when test="keyword_file=*">
         ....
      </xtags:when>
      <xtags:otherwise>
         .....
      </xtags:otherwise>
   </xtags:choose>
</xtags:forEach>

Is there some way to do this?

Thanks!

-Richard


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: rtexprvalue apparently being ignored for xtag forEach select parameter

Posted by Richard Sand <rs...@vgalleries.com>.
Sorry BTW when I put the entire select string into a variable, it works,
i.e. this works:

<% String xpath = "/help/" + subjectstr + "[" + subjectstr +
"-key=$subjectjey][1]"; %>
<xtags:forEach select="<%= xpath %>"/>

So, the conclusion that I draw is that the JSP compiler isn't accepting a
combination of text and expression inside a tag parameter.  This also
explains why my other tags work.  Is this normal behavior?

Thanks!

-Richard


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: rtexprvalue apparently being ignored for xtag forEach select parameter

Posted by Richard Sand <rs...@vgalleries.com>.
Hi James-

I looked at the .java for my compiled page, and I see the following:

When I use my own tag library with an expression inside a tag, I see the
following:

My custom tag:
     <ipa:helpLink
keyword="<%=keyword_file%>"><%=keyword_title%></ipa:helpLink>

gets interpreted as:
    _jspx_th_ipa_helpLink_0.setKeyword(keyword_file);

where you can see that the expresion is properly evaluated.

But when I use the xtags tag in the same file, I see:

Tag:
<xtags:forEach
select="/help/<%=subjectstr%>[<%=subjectstr%>-key=$subjectkey][1]">

interpreted as:

_jspx_th_xtags_forEach_0.setSelect("/help/<%=subjectstr%>[<%=subjectstr%>-ke
y=$subjectkey][1]");

Can this be a bug in the jsp compiled?

Thanks!

-Richard

----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Wednesday, December 19, 2001 11:28 AM
Subject: Re: rtexprvalue apparently being ignored for xtag forEach select
parameter


> Hi James-
>
> I tried both actually, neither work.  It just seems that the expression is
> not being evaluated!  I'd suspect something in Tomcat4 or the servlet api
> but I have other custom tags in the same page that include java
expressions
> in their variables and they work.  When I put the whole expression in a
> variable (your second suggestion), my page returns empty, and when I put
the
> expression into my select parameter (your first suggestion), the exception
> changes to:
>
> org.apache.jasper.compiler.ParseException: /help/help.jsp(45,28) Attribute
> has no value
> at
>
org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)
>
> What else can I check?  Of course, if I go back to hardcoded "topic" or
> "keyword" so there is no expression in the select parameter, the page
works,
> so I know its not a problem with my data or expression.
>
> Thanks!
>
> -Richard
>
> ----- Original Message -----
> From: "James Strachan" <ja...@yahoo.co.uk>
> To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
> Sent: Wednesday, December 19, 2001 11:13 AM
> Subject: Re: rtexprvalue apparently being ignored for xtag forEach select
> parameter
>
>
> > Hi Richard
> >
> > ----- Original Message -----
> > From: "Richard Sand" <rs...@vgalleries.com>
> > > Hi,
> > >
> > > My xtags tag is:
> > >
> > > <xtags:forEach
> > > select="/help/<%=subjectstr%>[<%=subjectstr%>-key=$subjectkey][1]">
> >
> > Try building up the xpath in one single expression. e.g.
> >
> > <xtags:forEach select="<%= "/help" + subjectstr + "[" + subjectstr +
> > "-key=$subjectjey][1]" %>"/>
> >
> > Or using a variable for the XPath expression...
> >
> > <% String xpath = "/help" + subjectstr + "[" + subjectstr +
> > "-key=$subjectjey][1]"; %>
> >
> > <xtags:forEach select="<%  xpath %>"/>
> >
> > James
> >
> >
> > >
> > > where subjectstr is a string that can be set to "topic" or "keyword".
> > >
> > > However, I get the following exception:
> > >
> > > Message: org.dom4j.InvalidXPathException: Invalid XPath expression:
> > > /help/[-key=$subjectkey][1] Expected one of '.', '..', '@', '*',
> > >
> > > You can see from the exception that the variable 'subjectstr' is not
> being
> > > put into the expression.  I commented out the rest of my code and left
> > > <%=subjectstr%> there just to make sure that the variable was set
> properly
> > > and it was.  It seems to me like the "rtexprvalue" is being ignored
from
> > the
> > > tld for the select parameter.
> > >
> > > Has anyone else seen this behavior?
> > >
> > > I'm using Tomcat 4.01 on W2k.
> > >
> > > Thanks!
> > >
> > > Best regards,
> > >
> > > Richard
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> > >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: rtexprvalue apparently being ignored for xtag forEach select parameter

Posted by Richard Sand <rs...@vgalleries.com>.
Hi James-

I tried both actually, neither work.  It just seems that the expression is
not being evaluated!  I'd suspect something in Tomcat4 or the servlet api
but I have other custom tags in the same page that include java expressions
in their variables and they work.  When I put the whole expression in a
variable (your second suggestion), my page returns empty, and when I put the
expression into my select parameter (your first suggestion), the exception
changes to:

org.apache.jasper.compiler.ParseException: /help/help.jsp(45,28) Attribute
has no value
	at
org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:563)

What else can I check?  Of course, if I go back to hardcoded "topic" or
"keyword" so there is no expression in the select parameter, the page works,
so I know its not a problem with my data or expression.

Thanks!

-Richard

----- Original Message -----
From: "James Strachan" <ja...@yahoo.co.uk>
To: "Tag Libraries Users List" <ta...@jakarta.apache.org>
Sent: Wednesday, December 19, 2001 11:13 AM
Subject: Re: rtexprvalue apparently being ignored for xtag forEach select
parameter


> Hi Richard
>
> ----- Original Message -----
> From: "Richard Sand" <rs...@vgalleries.com>
> > Hi,
> >
> > My xtags tag is:
> >
> > <xtags:forEach
> > select="/help/<%=subjectstr%>[<%=subjectstr%>-key=$subjectkey][1]">
>
> Try building up the xpath in one single expression. e.g.
>
> <xtags:forEach select="<%= "/help" + subjectstr + "[" + subjectstr +
> "-key=$subjectjey][1]" %>"/>
>
> Or using a variable for the XPath expression...
>
> <% String xpath = "/help" + subjectstr + "[" + subjectstr +
> "-key=$subjectjey][1]"; %>
>
> <xtags:forEach select="<%  xpath %>"/>
>
> James
>
>
> >
> > where subjectstr is a string that can be set to "topic" or "keyword".
> >
> > However, I get the following exception:
> >
> > Message: org.dom4j.InvalidXPathException: Invalid XPath expression:
> > /help/[-key=$subjectkey][1] Expected one of '.', '..', '@', '*',
> >
> > You can see from the exception that the variable 'subjectstr' is not
being
> > put into the expression.  I commented out the rest of my code and left
> > <%=subjectstr%> there just to make sure that the variable was set
properly
> > and it was.  It seems to me like the "rtexprvalue" is being ignored from
> the
> > tld for the select parameter.
> >
> > Has anyone else seen this behavior?
> >
> > I'm using Tomcat 4.01 on W2k.
> >
> > Thanks!
> >
> > Best regards,
> >
> > Richard
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: rtexprvalue apparently being ignored for xtag forEach select parameter

Posted by James Strachan <ja...@yahoo.co.uk>.
Hi Richard

----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
> Hi,
>
> My xtags tag is:
>
> <xtags:forEach
> select="/help/<%=subjectstr%>[<%=subjectstr%>-key=$subjectkey][1]">

Try building up the xpath in one single expression. e.g.

<xtags:forEach select="<%= "/help" + subjectstr + "[" + subjectstr +
"-key=$subjectjey][1]" %>"/>

Or using a variable for the XPath expression...

<% String xpath = "/help" + subjectstr + "[" + subjectstr +
"-key=$subjectjey][1]"; %>

<xtags:forEach select="<%  xpath %>"/>

James


>
> where subjectstr is a string that can be set to "topic" or "keyword".
>
> However, I get the following exception:
>
> Message: org.dom4j.InvalidXPathException: Invalid XPath expression:
> /help/[-key=$subjectkey][1] Expected one of '.', '..', '@', '*',
>
> You can see from the exception that the variable 'subjectstr' is not being
> put into the expression.  I commented out the rest of my code and left
> <%=subjectstr%> there just to make sure that the variable was set properly
> and it was.  It seems to me like the "rtexprvalue" is being ignored from
the
> tld for the select parameter.
>
> Has anyone else seen this behavior?
>
> I'm using Tomcat 4.01 on W2k.
>
> Thanks!
>
> Best regards,
>
> Richard
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


rtexprvalue apparently being ignored for xtag forEach select parameter

Posted by Richard Sand <rs...@vgalleries.com>.
Hi,

My xtags tag is:

<xtags:forEach
select="/help/<%=subjectstr%>[<%=subjectstr%>-key=$subjectkey][1]">

where subjectstr is a string that can be set to "topic" or "keyword".

However, I get the following exception:

Message: org.dom4j.InvalidXPathException: Invalid XPath expression:
/help/[-key=$subjectkey][1] Expected one of '.', '..', '@', '*',

You can see from the exception that the variable 'subjectstr' is not being
put into the expression.  I commented out the rest of my code and left
<%=subjectstr%> there just to make sure that the variable was set properly
and it was.  It seems to me like the "rtexprvalue" is being ignored from the
tld for the select parameter.

Has anyone else seen this behavior?

I'm using Tomcat 4.01 on W2k.

Thanks!

Best regards,

Richard


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cannot update page variable for use with xtags?

Posted by James Strachan <ja...@yahoo.co.uk>.
Hi Richard

XTags uses JSP scopes or 'attributes'. It cannot see the values of scriptlet
expressions unless they are explicitly exported using the pageContext.

If you modify the code as follows it should work...

> <xtags:variable id="helptopic" select="$topic"/>
>
> <%
>    if ("".equals(helptopic)) helptopic = "nohelp";
>    if (helptopic == null) helptopic = "nohelp";  // wasn't sure if i'd see
> an empty string or null

       pageContext.setAttribute( "helptopic", helptopic );


> %>
>
> <xtags:forEach select="/help/topic[topic-key=$helptopic][1]">

James

----- Original Message -----
From: "Richard Sand" <rs...@vgalleries.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 1:27 AM
Subject: cannot update page variable for use with xtags?


> Hi all-
>
> The problem I am encountering is that when I use an xtags tag with a
> variable from the request or page scope, I cannot alter the variable in my
> JSP code.
>
> I'm trying to do the following:
>
> I have a help page generator called help.jsp which uses xtags to display
the
> selected help topic from an xml file (each topic is a tree such as:
> <topic><topic-key>mytopic</topic-key>....</topic>).  The page gets invoked
> with the desired topic on the query string, such as:
>
> /help.jsp?topic=changepassword
>
> When my xtag usage is as follows, to get the variable directly from the
> request, it works fine, i.e.:
>
> <xtags:forEach select="/help/topic[topic-key=$topic][1]">
>
> However, what I want to do is make sure that the "topic" is provided, so I
> check the value of topic and if its missing, I set it, as follows:
>
> <xtags:variable id="helptopic" select="$topic"/>
>
> <%
>    if ("".equals(helptopic)) helptopic = "nohelp";
>    if (helptopic == null) helptopic = "nohelp";  // wasn't sure if i'd see
> an empty string or null
> %>
>
> <xtags:forEach select="/help/topic[topic-key=$helptopic][1]">
>
> However, this doesn't work!  The xtags treats helptopic as null and exits
> immediately.  I've also tried other hacks like creating a new page
variable,
> but that doesn't work either.  Basically, what I am seeing is that xtags
> allows me to see variables in my page, but it won't pick up on any changes
> to those variables in the page.
>
> Is this the expected behavior?
>
> Thank!
>
> Best regards,
>
> Richard
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


cannot update page variable for use with xtags?

Posted by Richard Sand <rs...@vgalleries.com>.
Hi all-

The problem I am encountering is that when I use an xtags tag with a
variable from the request or page scope, I cannot alter the variable in my
JSP code.

I'm trying to do the following:

I have a help page generator called help.jsp which uses xtags to display the
selected help topic from an xml file (each topic is a tree such as:
<topic><topic-key>mytopic</topic-key>....</topic>).  The page gets invoked
with the desired topic on the query string, such as:

/help.jsp?topic=changepassword

When my xtag usage is as follows, to get the variable directly from the
request, it works fine, i.e.:

<xtags:forEach select="/help/topic[topic-key=$topic][1]">

However, what I want to do is make sure that the "topic" is provided, so I
check the value of topic and if its missing, I set it, as follows:

<xtags:variable id="helptopic" select="$topic"/>

<%
   if ("".equals(helptopic)) helptopic = "nohelp";
   if (helptopic == null) helptopic = "nohelp";  // wasn't sure if i'd see
an empty string or null
%>

<xtags:forEach select="/help/topic[topic-key=$helptopic][1]">

However, this doesn't work!  The xtags treats helptopic as null and exits
immediately.  I've also tried other hacks like creating a new page variable,
but that doesn't work either.  Basically, what I am seeing is that xtags
allows me to see variables in my page, but it won't pick up on any changes
to those variables in the page.

Is this the expected behavior?

Thank!

Best regards,

Richard


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>