c:if problem

2004-09-08 Thread jean-charles . jabouille
Hi, I have a problem, I try to do an if condition. c:if test=${done != 'false'} blablabla /c:if I'm running it on tomcat 5. I think, that the problem is that I compare a string with a variable. thanks for your answer... this is the error trace: javax.servlet.ServletException:

Re: c:if problem

2004-09-08 Thread Big Chiz
if you used something like this c:set var=done value=true / you can check for its true/false via c:choose c:when test=${!done} value is false /c:when c:otherwise value is true /c:otherwise /c:choose On Wed, 8 Sep 2004 09:53:34 +0200, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I

Réf. : Re: c:if problem

2004-09-08 Thread jean-charles . jabouille
my variable is set in a struts action, not in the jsp... when i try c:out value=${done}/ it work fine. your solution doesn't work

using Node variables with JSTL XML tags

2004-09-08 Thread Flavio Tordini
hi all, I'm experimenting with the JSTL XML tags. I have a org.w3c.dom.Node variable and I'm trying to use the JSTL with it. Something like: x:out select=$node/@name/ The odd thing is that the XPath expression is evaluated relative the document root, not to the specified node. The following

Réf. : Réf. : Re: c:if problem

2004-09-08 Thread jean-charles . jabouille
I have solve the problem... I forgot to include the jstl.jar in my webapp :-) bye jean-charles.jabouil

Re: using Node variables with JSTL XML tags

2004-09-08 Thread Helios Alonso
Hmm... I don't know too much about xtags but try: [EMAIL PROTECTED] (without the bar) :-) Hope it helps. At 10:36 08/09/2004 +0200, you wrote: hi all, I'm experimenting with the JSTL XML tags. I have a org.w3c.dom.Node variable and I'm trying to use the JSTL with it. Something like: x:out

Re: using Node variables with JSTL XML tags

2004-09-08 Thread Flavio Tordini
hi helios, Unfortunately it does not work. it gives the following error: Illegal argument evaluating XPath expression /*: java.lang.IllegalArgumentException: Node must be non-null for getDTMHandleFromNode Clearly the JSTL implementation is trying to use [EMAIL PROTECTED] as the variable name.

Re: using Node variables with JSTL XML tags

2004-09-08 Thread Flavio Tordini
hi all, In the list archive, I found that the same question has been asked in June e never answered: http://www.mail-archive.com/[EMAIL PROTECTED]/msg07315.html should I post to the dev mailing list? should I report a bug? please someone answer! flavio Flavio Tordini wrote: hi all, I'm

RE: using Node variables with JSTL XML tags

2004-09-08 Thread Johnson, Chris
It seems that what 1.1 is doing is more correct. How do you expect jstl to find your sub node without telling it how to get there? That's how it works in directories on a computer (unix or pc). The only way that I know of to go to a subnode without providing the full path is by using the //

How to access java object method from JSTL expression

2004-09-08 Thread Helen Ge
Hi, I saw some examples to access standard java bean properties from JSTL expression language on JSP page. I am wondering is there any way to access regular java class methods from JSTL expression? Now in the JSP, I am trying to access a Java class, which has a business method return a

Re: using Node variables with JSTL XML tags

2004-09-08 Thread Flavio Tordini
hi chris, thank you for your answer. The problem is i'm actually passing a *Node* to the tag, not a Document. So I'd like to evaluate the XPath starting from that Node, not from the root of the Document the Node belongs to. I also tried: x:forEach select=$node x:out select=@name/ /x:forEach

RE: using Node variables with JSTL XML tags

2004-09-08 Thread Johnson, Chris
I see. I ran across a similar problem with JDOM Xpath, although they solved it in a newer version, but totally screwed up the API and some other stuff, so it killed the fix for me. I had performance problems with the xml jstl tags (forEach), so I've since moved on to using xslt. They're clearly

Re: How to access java object method from JSTL expression

2004-09-08 Thread Helios Alonso
If you have a normal class with standard-named methods it's alright. In fact, a JavaBean means an object with it's properties declared with a defined naming convention (an Enterprise Java Bean is another story). If you have a class with String getTheValue() // you can read the property

RE: using Node variables with JSTL XML tags

2004-09-08 Thread Kris Schneider
It seems like an issue with Xalan's XPath implementation. The Standard 1.1 taglib uses Xalan while Standard 1.0 uses Jaxen/SAXPath. Here's an example app that mimics what it sounds like Flavio is trying to do: import java.io.*; import javax.xml.parsers.*; import org.apache.xpath.*; import

Re: How to access java object method from JSTL expression

2004-09-08 Thread Kris Schneider
Are you using JSTL 1.0 (JSP 1.2) or JSTL 1.1 (JSP 2.0)? Quoting Helen Ge [EMAIL PROTECTED]: Hi, I saw some examples to access standard java bean properties from JSTL expression language on JSP page. I am wondering is there any way to access regular java class methods from JSTL

RE: How to access java object method from JSTL expression

2004-09-08 Thread Karl Coleman
I haven't tried it out yet, but I think in JSTL 1.1 you can map function calls in a TLD to static methods in regular Java classes that you can call with JSTL. Someone that has used it can shed more light on it. Karl At 11:35 08/09/2004 -0400, you wrote: Hi, I saw some examples to access

RE: How to access java object method from JSTL expression

2004-09-08 Thread Helen Ge
I am using JSTL 1.0(JSP 1.2) now. The java class method I am trying to access is a static method. I saw JSP 2.0 added the ability to call public static methods in EL expressions by adding a function element to our tag library descriptor (TLD). does JSP 1.2 has anyway to do that? Also, what if

RE: How to access java object method from JSTL expression

2004-09-08 Thread Kris Schneider
Nope, there's nothing really directly available in JSTL 1.0/JSP 1.2 (outside of using scripting expressions) to do the same thing as JSP 2.0 EL functions. I'm in the process of building something that may help however. The Standard 1.1 implementation includes the