Re: JSTL BUG? Url problem

2002-10-29 Thread flare
> What version of Resin are you using? Resin 2.1.5 is supposed to be
> complete I think.
> 
> Stef

Latest, well..  it's almost complete but the url related tags don't work 

<%@ page language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>




javax.servlet.jsp.JspException: com.caucho.jsp.JspParseException: c.tld:13
java.lang.ClassNotFoundException: org.apache.taglibs.standard.tlv.JstlCoreTLV
(...)

 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSTL BUG? Url problem

2002-10-29 Thread Stefan
What version of Resin are you using? Resin 2.1.5 is supposed to be complete
I think.

Stef



- Original Message -
From: "flare" <[EMAIL PROTECTED]>
To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 29, 2002 2:27 PM
Subject: RE: JSTL BUG? Url problem


> >
> > No, it shouldn't.  One possible difference is that you're using
> >  from Resin's implementation of JSTL and  from the
> > Standard Taglib.
>
> Exactly, It seems the Resin jstl support is partial, if such a tag is
available Resin is used,  if
> not the container searches in the classpath and find the Apache
implementation
> That's the reason of the strange behaviour
>
>  Thanx
>
>
> --
> To unsubscribe, e-mail:
<mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:taglibs-user-help@;jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>




RE: JSTL BUG? Url problem

2002-10-29 Thread flare
> 
> No, it shouldn't.  One possible difference is that you're using
>  from Resin's implementation of JSTL and  from the
> Standard Taglib.

Exactly, It seems the Resin jstl support is partial, if such a tag is available Resin 
is used,  if 
not the container searches in the classpath and find the Apache implementation
That's the reason of the strange behaviour 

 Thanx 
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread flare
> On Tue, 29 Oct 2002, flare wrote:
> 
> > I'm using latest stable Apache JSTL Implementation on Resin 2.1.5
> 
> Are you sure you're not using Resin's JSTL implementation?  See
> 
>  http://www.caucho.com/news/2002-06-12.xtp

I really didn't know resin had a JSTL implementation! You're right I was using their  
implementation because I removed the jars and the page worked fine ;)

So that's a Resin bug of feature.. sorry about the confusion I've to read the release 
notes 
next time 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread Shawn Bayern
On Tue, 29 Oct 2002, flare wrote:

> I forgot to say since I'm only using core and fmt tags I only have
> "jstl.jar" and "standard.jar"  in the classpath not the whole
> distribution , dunno if this makes any difference (probably not)

No, it shouldn't.  One possible difference is that you're using 
from Resin's implementation of JSTL and  from the Standard
Taglib.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread flare
I forgot to say since I'm only using core and fmt tags I only have "jstl.jar" and 
"standard.jar" 
in the classpath not the whole distribution , dunno if this makes any difference 
(probably 
not) 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread Shawn Bayern
On Tue, 29 Oct 2002, flare wrote:

> I'm using latest stable Apache JSTL Implementation on Resin 2.1.5

Are you sure you're not using Resin's JSTL implementation?  See

 http://www.caucho.com/news/2002-06-12.xtp

for more information.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread flare

> Again, it'd be helpful if you posted a complete page that demonstrates
> the difference. 


<%@ page language="java" import="org.apache.commons.beanutils.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"; %>

<%
  DynaProperty[] props = new DynaProperty[2];
  BasicDynaClass dClass = null;

  props[0] = new DynaProperty("ciccio");
  props[1] = new DynaProperty("pippo");


  try {dClass = new BasicDynaClass("flare", 
Class.forName("org.apache.commons.beanutils.BasicDynaBean"), props);
  } catch (Exception e) {  e.printStackTrace(); }

  DynaBean dbean = dClass.newInstance();
  dbean.set("ciccio","uno");
  dbean.set("pippo","due");
  pageContext.setAttribute("flare",dbean);
 %>





 


the result is
-
javax.servlet.jsp.JspException: An error occurred while evaluating custom
action attribute "value" with value "${flare.ciccio}": Unable to find a
value for "ciccio" in object of class "org.apache.commons.beanutils.BasicDynaBean"
using operator "." (null)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:146)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:166)
at 
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(Expressio
nEvaluatorManager.java:112)
at 
org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNotNull(ExpressionUtil.java:85)
at 
org.apache.taglibs.standard.tag.el.core.ParamTag.evaluateExpressions(ParamTag.java:14
8)
at org.apache.taglibs.standard.tag.el.core.ParamTag.doStartTag(ParamTag.java:100)
at _prova__jsp._jspService(/aste/prova.jsp:22)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:312)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:536)

---


<%@ page language="java" import="org.apache.commons.beanutils.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"; %>

<%
  DynaProperty[] props = new DynaProperty[2];
  BasicDynaClass dClass = null;

  props[0] = new DynaProperty("ciccio");
  props[1] = new DynaProperty("pippo");


  try {dClass = new BasicDynaClass("flare", 
Class.forName("org.apache.commons.beanutils.BasicDynaBean"), props);
  } catch (Exception e) {  e.printStackTrace(); }

  DynaBean dbean = dClass.newInstance();
  dbean.set("ciccio","uno");
  dbean.set("pippo","due");
  pageContext.setAttribute("flare",dbean);
 %>

 
 <%=((DynaBean)pageContext.getAttribute("flare")).get("pippo")%>

the result is:

uno due 

I'm using latest stable Apache JSTL Implementation on Resin 2.1.5  



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread Shawn Bayern
On Tue, 29 Oct 2002, flare wrote:

> I was able to use dynabeans in "out" and "fmt" tags but not in param,
> that's strange I know .. since I should to use the code in production
> I hope next releases of JSTL won't break the compatibility with the
> clean but (now I guess) unsupported format I'm using ! It would be
> very sad switching to scriptlets :(

Again, it'd be helpful if you posted a complete page that demonstrates the
difference.  The code that the Standard Taglib uses to interpret the
expression is the same for both tags.  Thus, I don't simply mean that the
behavior you're noting is nonstandard; I'm suggesting it's not happening
the way you're describing if you're using our implementation.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread flare
> On Tue, 29 Oct 2002, flare wrote:

> My only point was that if an expression works in , it will
> also work in .  You made a claim otherwise, and I wanted you to
> confirm it since it sounded wrong.

I was able to use dynabeans in "out" and "fmt" tags but not in param,  
that's strange I know .. since I should to use the code in production I hope next 
releases of 
JSTL won't break the compatibility with the clean but (now I guess) unsupported format 
I'm 
using ! It would be very sad switching to scriptlets :(  



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread Shawn Bayern
On Tue, 29 Oct 2002, flare wrote:

> no, I'm using struts 1.02, I don't know anything about DynaActionForm
> but I use DynaBeans to store resultsets output, I was able to iterate
> the collection with JSTL and display the results properly, look at the
> code in my latest email

Again, I made no statement about whether DynaBeans would work or not; I
don't know offhand enough about how they work.  If they implement the
JavaBeans specification or the Map interface, you'd be able to retrieve
properties via the '.' operator.  If they implement Map, you'd also be
able to iterate over them.

My only point was that if an expression works in , it will also
work in .  You made a claim otherwise, and I wanted you to confirm
it since it sounded wrong.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread flare
> So you're telling us that referencing "${item.a_nomefile}" in a
> "c:out" tag, where "item" is an instance of DynaActionForm 
no, I'm using struts 1.02, I don't know anything about DynaActionForm but I use 
DynaBeans 
to store resultsets output, I was able to iterate the collection with JSTL and display 
the 
results properly, look at the code in my latest email

 regards 

 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-29 Thread flare
> It shouldn't work; a.get("b") is not supported in any form by the JSTL
> 1.0 expression language, whether in  or elsewhere.  JSP 2.0
> will introduce functions that could conceivably be mapped to such a
> method, though only through a static wrapper that would cause the
> expression to look more like
> 
>  ${get(dynabean, property)}

ROTFL, I always thought dynabeans were supported (BTW I've only  started using JSTL a 
week ago), well.. I've a good news , just try my code out 

--- cut here ---
<%@ page language="java" import="org.apache.commons.beanutils.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>

<%
  DynaProperty[] props = new DynaProperty[2];
  BasicDynaClass dClass = null;

  props[0] = new DynaProperty("ciccio");
  props[1] = new DynaProperty("pippo");


  try {dClass = new BasicDynaClass("flare", 
Class.forName("org.apache.commons.beanutils.BasicDynaBean"), props);
  } catch (Exception e) {  e.printStackTrace(); }

  DynaBean dbean = dClass.newInstance();
  dbean.set("ciccio","uno");
  dbean.set("pippo","due");
  pageContext.setAttribute("flare",dbean);
 %>

 
 <%=((DynaBean)pageContext.getAttribute("flare")).get("pippo")%>

-- cut here 

Perhaps JSTL works better than his coders think of ;)

 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSTL BUG? Url problem

2002-10-28 Thread Shawn Bayern
It shouldn't work; a.get("b") is not supported in any form by the JSTL 1.0
expression language, whether in  or elsewhere.  JSP 2.0 will
introduce functions that could conceivably be mapped to such a method,
though only through a static wrapper that would cause the expression to
look more like

 ${get(dynabean, property)}

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com

On Mon, 28 Oct 2002, Karr, David wrote:

> So you're telling us that referencing "${item.a_nomefile}" in a "c:out" tag,
> where "item" is an instance of DynaActionForm (or a subclass) actually
> prints out the value of that property?  I recently started looking into this
> issue, and I frankly don't see how that can work.  The properties of a
> DynaActionForm are not declared with standard JavaBeans accessors, they are
> stored in a HashMap.  I'm investigating the possibility of an enhancement to
> DynaActionForm which just adds an accessor for the HashMap, which would then
> allow you to specify an EL expression to get DynaActionForm properties.
> 
> > -Original Message-
> > From: flare [mailto:flare@;flare.it]
> > Sent: Monday, October 28, 2002 1:05 PM
> > To: Tag Libraries Users List
> > Subject: Re: JSTL BUG? Url problem
> > 
> > 
> > > On Sun, 27 Oct 2002, flare wrote:
> > > 
> > > Irrespective of whether you're using DynaBeans or not, if 
> > it works in
> > > the latter case, it should work in the former one.  That is, the two
> > > expressions you've shown are identical, and both tags evaluate their
> > > attributes as String objects.
> > 
> >  > varStatus="status">
> >  
> >  
> >  
> >  
> >  
> > ... 
> > 
> > I've tried but doesn't work.. if I try to render the url with 
> > a dynabean accessor (a_nomefile or 
> > others) I get an error, the out tag works fine instead.  
> > I'm using JSTL on Resin 2.1.5  + Linux 
> > 
> > 500 Servlet Exception
> > 
> > javax.servlet.jsp.JspException: An error occurred while 
> > evaluating custom
> > action attribute "value" with value "${item.a_nomefile}": 
> > Unable to find
> > a value for "a_nomefile" in object of class 
> > "org.apache.commons.beanutils.BasicDynaBean"
> > using operator "." (null)
> > at 
> > org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
> > ator.java:146)
> > at 
> > org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
> > ator.java:166)
> > at 
> > org.apache.taglibs.standard.lang.support.ExpressionEvaluatorMa
> > nager.evaluate(Expressio
> > nEvaluatorManager.java:112)
> > at 
> > org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNot
> > Null(ExpressionUtil.java:85)
> > at 
> > org.apache.taglibs.standard.tag.el.core.ParamTag.evaluateExpre
> > ssions(ParamTag.java:14
> > 8)
> > at 
> > org.apache.taglibs.standard.tag.el.core.ParamTag.doStartTag(Pa
> > ramTag.java:100)
> > (...)
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:taglibs-user-help@;jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>




RE: JSTL BUG? Url problem

2002-10-28 Thread Karr, David
So you're telling us that referencing "${item.a_nomefile}" in a "c:out" tag,
where "item" is an instance of DynaActionForm (or a subclass) actually
prints out the value of that property?  I recently started looking into this
issue, and I frankly don't see how that can work.  The properties of a
DynaActionForm are not declared with standard JavaBeans accessors, they are
stored in a HashMap.  I'm investigating the possibility of an enhancement to
DynaActionForm which just adds an accessor for the HashMap, which would then
allow you to specify an EL expression to get DynaActionForm properties.

> -Original Message-
> From: flare [mailto:flare@;flare.it]
> Sent: Monday, October 28, 2002 1:05 PM
> To: Tag Libraries Users List
> Subject: Re: JSTL BUG? Url problem
> 
> 
> > On Sun, 27 Oct 2002, flare wrote:
> > 
> > Irrespective of whether you're using DynaBeans or not, if 
> it works in
> > the latter case, it should work in the former one.  That is, the two
> > expressions you've shown are identical, and both tags evaluate their
> > attributes as String objects.
> 
>  varStatus="status">
>  
>  
>  
>  
>  
> ... 
> 
> I've tried but doesn't work.. if I try to render the url with 
> a dynabean accessor (a_nomefile or 
> others) I get an error, the out tag works fine instead.  
> I'm using JSTL on Resin 2.1.5  + Linux 
> 
> 500 Servlet Exception
> 
> javax.servlet.jsp.JspException: An error occurred while 
> evaluating custom
> action attribute "value" with value "${item.a_nomefile}": 
> Unable to find
> a value for "a_nomefile" in object of class 
> "org.apache.commons.beanutils.BasicDynaBean"
> using operator "." (null)
> at 
> org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
> ator.java:146)
> at 
> org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evalu
> ator.java:166)
> at 
> org.apache.taglibs.standard.lang.support.ExpressionEvaluatorMa
> nager.evaluate(Expressio
> nEvaluatorManager.java:112)
> at 
> org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNot
> Null(ExpressionUtil.java:85)
> at 
> org.apache.taglibs.standard.tag.el.core.ParamTag.evaluateExpre
> ssions(ParamTag.java:14
> 8)
> at 
> org.apache.taglibs.standard.tag.el.core.ParamTag.doStartTag(Pa
> ramTag.java:100)
> (...)
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:taglibs-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@;jakarta.apache.org>




Re: JSTL BUG? Url problem

2002-10-28 Thread flare
> 
> I'm not really familiar with DynaBeans and how they work.  My point is
> just that if 

dynabeans are not javabeans , since they've dynamic properties you should access them 
using  bean.get("property") instead of bean.getProperty() 
The jstl out tag supports this method of invocation, perhaps other tags have problems 
with 
it 
 

 -- 
> Shawn Bayern
> "JSTL in Action"   http://www.jstlbook.com
> 
> 
> --
> To unsubscribe, e-mail:  
>  For additional
> commands, e-mail: 
> 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSTL BUG? Url problem

2002-10-28 Thread Shawn Bayern
On Mon, 28 Oct 2002, flare wrote:

> 
>  
>  
>  
>  
>  
> ... 
> 
> I've tried but doesn't work.. if I try to render the url with a
> dynabean accessor (a_nomefile or others) I get an error, the out tag
> works fine instead.  I'm using JSTL on Resin 2.1.5 + Linux

I'm not really familiar with DynaBeans and how they work.  My point is
just that if 

  

works, then a  tag that uses the same expression ought to work as
well.  Your previous message indicated that there was some difference
between the two in the same JSP page, and I wanted to confirm that that
was what you meant.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSTL BUG? Url problem

2002-10-28 Thread flare
> On Sun, 27 Oct 2002, flare wrote:
> 
> Irrespective of whether you're using DynaBeans or not, if it works in
> the latter case, it should work in the former one.  That is, the two
> expressions you've shown are identical, and both tags evaluate their
> attributes as String objects.


 
 
 
 
 
... 

I've tried but doesn't work.. if I try to render the url with a dynabean accessor 
(a_nomefile or 
others) I get an error, the out tag works fine instead.  
I'm using JSTL on Resin 2.1.5  + Linux 

500 Servlet Exception

javax.servlet.jsp.JspException: An error occurred while evaluating custom
action attribute "value" with value "${item.a_nomefile}": Unable to find
a value for "a_nomefile" in object of class 
"org.apache.commons.beanutils.BasicDynaBean"
using operator "." (null)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:146)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:166)
at 
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(Expressio
nEvaluatorManager.java:112)
at 
org.apache.taglibs.standard.tag.el.core.ExpressionUtil.evalNotNull(ExpressionUtil.java:85)
at 
org.apache.taglibs.standard.tag.el.core.ParamTag.evaluateExpressions(ParamTag.java:14
8)
at org.apache.taglibs.standard.tag.el.core.ParamTag.doStartTag(ParamTag.java:100)
(...)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSTL BUG? Url problem

2002-10-27 Thread Shawn Bayern
On Sun, 27 Oct 2002, flare wrote:

> 
> [...]
> 
> 
> is that a bug or simply dynabens cannot be used that way? 

Irrespective of whether you're using DynaBeans or not, if it works in the
latter case, it should work in the former one.  That is, the two
expressions you've shown are identical, and both tags evaluate their
attributes as String objects.

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: