Re: Basic JSTL Question...

2003-11-06 Thread Martin Cooper

"Jacob Wilson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi...
> I would appreciate if someone out there helps me with these basic JSTL
questions...

JSTL questions should be addressed to taglibs-user, not struts-user. Please
respect the focus of this list, and any others you subscribe to.

--
Martin Cooper


>
> 1. In c:foreach how do I check whether the collection contains values???
When it has values, it iterates a loop fine... Now, if I want to specify 'No
records' how do I do that???
>
> 2. How do I check condition.s.. for eg.
>
> I wanna alternate row colors... when I do  this, it doesn't work...
> 
>   
> 
> 
>   
> 
> Wat's the right way to do this???
>
> Thanx.
> -Jacob
>
>
>
> -
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Basic JSTL Question...

2003-11-06 Thread Arik Levin ( Tikal )
1) See operators (empty)
http://developer.java.sun.com/developer/technicalArticles/javaserverpages/fa
ster/

2) it goes :   



-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 06, 2003 1:04 PM
To: [EMAIL PROTECTED]
Subject: Basic JSTL Question...

Hi...
I would appreciate if someone out there helps me with these basic JSTL
questions...
 
1. In c:foreach how do I check whether the collection contains values???
When it has values, it iterates a loop fine... Now, if I want to specify 'No
records' how do I do that???
 
2. How do I check condition.s.. for eg.
 
I wanna alternate row colors... when I do  this, it doesn't work...

  
 

  

Wat's the right way to do this???

Thanx.
-Jacob



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Basic JSTL Question...

2003-11-06 Thread Jacob Wilson
Hi...
I would appreciate if someone out there helps me with these basic JSTL questions...
 
1. In c:foreach how do I check whether the collection contains values??? When it has 
values, it iterates a loop fine... Now, if I want to specify 'No records' how do I do 
that???
 
2. How do I check condition.s.. for eg.
 
I wanna alternate row colors... when I do  this, it doesn't work...

  
 

  

Wat's the right way to do this???

Thanx.
-Jacob



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: JSTL Question...

2003-10-13 Thread Daniel H. F. e Silva
Hi Jacob,
 Try displaytag: http://displaytag.sourceforge.net.
 It is an amazing piece of code.

Regards,
 Daniel.
--- Jacob Wilson <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a question regarding JSTL. Is there anyway to do sorting of the colums on a 
> table using
> JSTL.
> 
> I know there is one table tag that does sorting... But, does it sort all the values 
> that is present in the collection or does it do just page level sorting???
> Is there any other tag libr
> ary that takes all the values present in the collection and does
> a complete sorting??? 
>  
> -Jacob
> 
> 
> -
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSTL Question...

2003-10-12 Thread Jacob Wilson
Hi,
I have a question regarding JSTL. Is there anyway to do sorting of the colums on a 
table using JSTL.

I know there is one table tag that does sorting... But, does it sort all the values 
that is present in the collection or does it do just page level sorting???
Is there any other tag libr
ary that takes all the values present in the collection and does
a complete sorting??? 
 
-Jacob


-
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

RE: jstl question

2003-09-17 Thread Mark Galbreath
smartass

-Original Message-
From: Bradley Handy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:44 AM
To: Struts Users Mailing List
Subject: RE: jstl question


Accessors of java.util.Map implementations use a single parameter.  Is
the instance variable behind the "valueNum" property an implementation
of java.util.Map (ie. HashMap,
org.apache.commons.collections.FastHashMap, etc)?

If it is, then Mark's suggestion needs one little tweak.

Change:  ${whatever} -> ${whatever.key}

Where "key" is the java.util.Map key, under which, you wish to store
your parameter from your form.


Brad Handy


> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 17, 2003 9:39 AM
> To: Struts Users Mailing List
> Subject: RE: jstl question
> 
> I don't get it.  Accessors for JavaBeans do not use parameters (public
> String getValueNum()); mutators use parameters (public void
setValueNum(
> String param ).  Why are you passing an accessor a param argument?
> 
> Nevertheless, if this were a real JavaBean, you would set and get its
> values
> in JSTL like this:
> 
> // reference the tab library
> <@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> 
> // instantiate the bean in page scope
> 
> 
> // set the property from the request parameter passed to the page
>  value='${param.valueNum}'/>('
> 
> // print the parameter value
> 
> 
> 
> Happy Hurricanes!
> Mark
> 
> -Original Message-
> From: Richard Raquepo [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2003 12:10 AM
> To: Struts Users Mailing List
> Subject: jstl question
> 
> 
> i have a bean that has this gettter method
> 
> ...
> 
> public String getValueNum(String param){
> 
> }
> 
> ...
> 
> using struts tag i can call it like:
> 
> 
> and it will works.
> 
> now i can't seem to figure out how can i do that using jstl.
> 
> i need your expert advice on this very simple problem that i can't
seem to
> hack.
> 
> thanks
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: jstl question

2003-09-17 Thread Bradley Handy
Accessors of java.util.Map implementations use a single parameter.  Is
the instance variable behind the "valueNum" property an implementation
of java.util.Map (ie. HashMap,
org.apache.commons.collections.FastHashMap, etc)?

If it is, then Mark's suggestion needs one little tweak.

Change:  ${whatever} -> ${whatever.key}

Where "key" is the java.util.Map key, under which, you wish to store
your parameter from your form.


Brad Handy


> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 17, 2003 9:39 AM
> To: Struts Users Mailing List
> Subject: RE: jstl question
> 
> I don't get it.  Accessors for JavaBeans do not use parameters (public
> String getValueNum()); mutators use parameters (public void
setValueNum(
> String param ).  Why are you passing an accessor a param argument?
> 
> Nevertheless, if this were a real JavaBean, you would set and get its
> values
> in JSTL like this:
> 
> // reference the tab library
> <@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> 
> // instantiate the bean in page scope
> 
> 
> // set the property from the request parameter passed to the page
>  value='${param.valueNum}'/>('
> 
> // print the parameter value
> 
> 
> 
> Happy Hurricanes!
> Mark
> 
> -Original Message-
> From: Richard Raquepo [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2003 12:10 AM
> To: Struts Users Mailing List
> Subject: jstl question
> 
> 
> i have a bean that has this gettter method
> 
> ...
> 
> public String getValueNum(String param){
> 
> }
> 
> ...
> 
> using struts tag i can call it like:
> 
> 
> and it will works.
> 
> now i can't seem to figure out how can i do that using jstl.
> 
> i need your expert advice on this very simple problem that i can't
seem to
> hack.
> 
> thanks
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: jstl question

2003-09-17 Thread Mark Galbreath
I don't get it.  Accessors for JavaBeans do not use parameters (public
String getValueNum()); mutators use parameters (public void setValueNum(
String param ).  Why are you passing an accessor a param argument?

Nevertheless, if this were a real JavaBean, you would set and get its values
in JSTL like this:

// reference the tab library
<@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>

// instantiate the bean in page scope


// set the property from the request parameter passed to the page
('

// print the parameter value



Happy Hurricanes!
Mark

-Original Message-
From: Richard Raquepo [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 12:10 AM
To: Struts Users Mailing List
Subject: jstl question


i have a bean that has this gettter method

...

public String getValueNum(String param){

}

...

using struts tag i can call it like:


and it will works.

now i can't seem to figure out how can i do that using jstl.

i need your expert advice on this very simple problem that i can't seem to
hack.

thanks





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] JSTL question

2003-09-11 Thread denis
!


My god.  Sometimes it really helps having another pair of eyes.

Thank you.
- Original Message - 
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, September 11, 2003 4:04 PM
Subject: Re: [OT] JSTL question


> Closing tag too early?
>
> 
>
> Quoting [EMAIL PROTECTED]:
>
> > I am not sure what that will accomplish since my problem is that I am
not
> > getting any iteration at all.
> >
> > when i try to do this:
> > 
> > aa
> >
> >
> > > value="${selectBox[prop.key][loop.index].key}"/>
> > 
> >
> > on a list that I know has 15 items, all i get as output is
> >
> > aa
> >
> > So, what is wrong there?
> >
> > - Original Message ----- 
> > From: "Karr, David" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, September 11, 2003 3:59 PM
> > Subject: RE: [OT] JSTL question
> >
> >
> > > Actually, in this case, "loop.index" is probably more appropriate.
They
> > > are similar, but different.
> > >
> > > > -Original Message-
> > > > From: Erez Efrati [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, September 11, 2003 1:54 PM
> > > > To: 'Struts Users Mailing List'
> > > > Subject: RE: [OT] JSTL question
> > > >
> > > >
> > > > You need to put loop.COUNT :
> > > >
> > > >  
> > > >
> > > > Erez
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, September 11, 2003 9:50 PM
> > > > To: Struts Users Mailing List
> > > > Subject: [OT] JSTL question
> > > >
> > > > Ok, i have a map named selectBox that contains a number of
ArrayLists
> > > > keyed by strings.
> > > >
> > > > When I try to iterate over it, nothing happens!
> > > >
> > > > 
> > > > Shows something of the order [ java.com.blah.bean,
java.com.blah.bean,
> > > > java.com.blah.bean]
> > > >
> > > > 
> > > > shows something like: java.com.blah.bean
> > > >
> > > > 
> > > > shows the value stored in the bean under the property key.
> > > >
> > > >
> > > > However when i try to do this:
> > > >
> > > > 
> > > >
> > > >  
> > > >  
> > > > 
> > > >
> > > > nothing shows.
> > > >
> > > > I am really confused.  What am I doing wrong?
> > > >
> > > > Thanks.
> > > >
> > > > Denis
> > > >
> > > >
> > > >
> > >
> -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -- 
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech   <http://www.dotech.com/>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] JSTL question

2003-09-11 Thread Kris Schneider
Closing tag too early?



Quoting [EMAIL PROTECTED]:

> I am not sure what that will accomplish since my problem is that I am not
> getting any iteration at all.
> 
> when i try to do this:
> 
> aa
>
>
> value="${selectBox[prop.key][loop.index].key}"/>
> 
> 
> on a list that I know has 15 items, all i get as output is
> 
> aa
> 
> So, what is wrong there?
> 
> - Original Message - 
> From: "Karr, David" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, September 11, 2003 3:59 PM
> Subject: RE: [OT] JSTL question
> 
> 
> > Actually, in this case, "loop.index" is probably more appropriate.  They
> > are similar, but different.
> >
> > > -Original Message-
> > > From: Erez Efrati [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, September 11, 2003 1:54 PM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: [OT] JSTL question
> > >
> > >
> > > You need to put loop.COUNT :
> > >
> > >  
> > >
> > > Erez
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, September 11, 2003 9:50 PM
> > > To: Struts Users Mailing List
> > > Subject: [OT] JSTL question
> > >
> > > Ok, i have a map named selectBox that contains a number of ArrayLists
> > > keyed by strings.
> > >
> > > When I try to iterate over it, nothing happens!
> > >
> > > 
> > > Shows something of the order [ java.com.blah.bean, java.com.blah.bean,
> > > java.com.blah.bean]
> > >
> > > 
> > > shows something like: java.com.blah.bean
> > >
> > > 
> > > shows the value stored in the bean under the property key.
> > >
> > >
> > > However when i try to do this:
> > >
> > > 
> > >
> > >  
> > >  
> > > 
> > >
> > > nothing shows.
> > >
> > > I am really confused.  What am I doing wrong?
> > >
> > > Thanks.
> > >
> > > Denis
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] JSTL question

2003-09-11 Thread Kris Schneider
Careful. The "count" property is 1-based and keeps track of the current round of
the iteration. The "index" property is 0-based and keeps track of the index of
the current item in the collection being iterated over.

Quoting Erez Efrati <[EMAIL PROTECTED]>:

> You need to put loop.COUNT : 
> 
>  
> 
> Erez
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 11, 2003 9:50 PM
> To: Struts Users Mailing List
> Subject: [OT] JSTL question
> 
> Ok, i have a map named selectBox that contains a number of ArrayLists
> keyed by strings.
> 
> When I try to iterate over it, nothing happens!
> 
>   
> Shows something of the order [ java.com.blah.bean, java.com.blah.bean,
> java.com.blah.bean]
> 
> 
> shows something like: java.com.blah.bean
> 
> 
> shows the value stored in the bean under the property key.
> 
> 
> However when i try to do this:
> 
> 
> 
>  
>  
> 
> 
> nothing shows.
> 
> I am really confused.  What am I doing wrong?
> 
> Thanks.
> 
> Denis

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] JSTL question

2003-09-11 Thread denis
I am not sure what that will accomplish since my problem is that I am not
getting any iteration at all.

when i try to do this:

aa
   
   
   


on a list that I know has 15 items, all i get as output is

aa

So, what is wrong there?

- Original Message - 
From: "Karr, David" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, September 11, 2003 3:59 PM
Subject: RE: [OT] JSTL question


> Actually, in this case, "loop.index" is probably more appropriate.  They
> are similar, but different.
>
> > -Original Message-
> > From: Erez Efrati [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 11, 2003 1:54 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: [OT] JSTL question
> >
> >
> > You need to put loop.COUNT :
> >
> >  
> >
> > Erez
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 11, 2003 9:50 PM
> > To: Struts Users Mailing List
> > Subject: [OT] JSTL question
> >
> > Ok, i have a map named selectBox that contains a number of ArrayLists
> > keyed by strings.
> >
> > When I try to iterate over it, nothing happens!
> >
> > 
> > Shows something of the order [ java.com.blah.bean, java.com.blah.bean,
> > java.com.blah.bean]
> >
> > 
> > shows something like: java.com.blah.bean
> >
> > 
> > shows the value stored in the bean under the property key.
> >
> >
> > However when i try to do this:
> >
> > 
> >
> >  
> >  
> > 
> >
> > nothing shows.
> >
> > I am really confused.  What am I doing wrong?
> >
> > Thanks.
> >
> > Denis
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] JSTL question

2003-09-11 Thread Karr, David
Actually, in this case, "loop.index" is probably more appropriate.  They
are similar, but different.

> -Original Message-
> From: Erez Efrati [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 11, 2003 1:54 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [OT] JSTL question
> 
> 
> You need to put loop.COUNT : 
> 
>  
> 
> Erez
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 11, 2003 9:50 PM
> To: Struts Users Mailing List
> Subject: [OT] JSTL question
> 
> Ok, i have a map named selectBox that contains a number of ArrayLists
> keyed by strings.
> 
> When I try to iterate over it, nothing happens!
> 
>   
> Shows something of the order [ java.com.blah.bean, java.com.blah.bean,
> java.com.blah.bean]
> 
> 
> shows something like: java.com.blah.bean
> 
> 
> shows the value stored in the bean under the property key.
> 
> 
> However when i try to do this:
> 
> 
> 
>  
>  
> 
> 
> nothing shows.
> 
> I am really confused.  What am I doing wrong?
> 
> Thanks.
> 
> Denis
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] JSTL question

2003-09-11 Thread Kris Schneider
varStatus gives you an instance of javax.servlet.jsp.jstl.core.LoopTagStatus. It
has a property called "index" that might be of interest...

Quoting [EMAIL PROTECTED]:

> Ok, i have a map named selectBox that contains a number of ArrayLists keyed
> by strings.
> 
> When I try to iterate over it, nothing happens!
> 
>   
> Shows something of the order [ java.com.blah.bean, java.com.blah.bean,
> java.com.blah.bean]
> 
> 
> shows something like: java.com.blah.bean
> 
> 
> shows the value stored in the bean under the property key.
> 
> 
> However when i try to do this:
> 
> 
> 
>  
>  
> 
> 
> nothing shows.
> 
> I am really confused.  What am I doing wrong?
> 
> Thanks.
> 
> Denis


-- 
Kris Schneider 
D.O.Tech   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] JSTL question

2003-09-11 Thread Erez Efrati
You need to put loop.COUNT : 

 

Erez

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2003 9:50 PM
To: Struts Users Mailing List
Subject: [OT] JSTL question

Ok, i have a map named selectBox that contains a number of ArrayLists
keyed by strings.

When I try to iterate over it, nothing happens!

  
Shows something of the order [ java.com.blah.bean, java.com.blah.bean,
java.com.blah.bean]


shows something like: java.com.blah.bean


shows the value stored in the bean under the property key.


However when i try to do this:



 
 


nothing shows.

I am really confused.  What am I doing wrong?

Thanks.

Denis



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] JSTL question

2003-09-11 Thread denis
Ok, i have a map named selectBox that contains a number of ArrayLists keyed by strings.

When I try to iterate over it, nothing happens!

  
Shows something of the order [ java.com.blah.bean, java.com.blah.bean, 
java.com.blah.bean]


shows something like: java.com.blah.bean


shows the value stored in the bean under the property key.


However when i try to do this:



 
 


nothing shows.

I am really confused.  What am I doing wrong?

Thanks.

Denis

Re: jstl question

2003-09-11 Thread Adam Hardy
Hi Richard,
you should ask this on the taglib-user list. If people don't stick to 
one list, it makes twice as much work to search the archives, which I 
find a PITA anyway.

With my crude knowledge of jstl I would do this:

<%=bean.getValueNum(test) %>

People on taglibs-user might know a better way. I cc'd them.

hth
Adam
On 09/11/2003 06:10 AM Richard Raquepo wrote:
i have a bean that has this gettter method

...

public String getValueNum(String param){

}
...

using struts tag i can call it like:

and it will works.

now i can't seem to figure out how can i do that using jstl.

i need your expert advice on this very simple problem that i can't seem to hack.

thanks



--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


jstl question

2003-09-10 Thread Richard Raquepo
i have a bean that has this gettter method

...

public String getValueNum(String param){

}

...

using struts tag i can call it like:


and it will works.

now i can't seem to figure out how can i do that using jstl.

i need your expert advice on this very simple problem that i can't seem to hack.

thanks




Re: simple JSTL question

2003-08-14 Thread Yann Cébron
> 1) How do I subscribe to the JSTL mailing list? (I rather ask simple
> dumb questions than stay with dumb answers :)

there's no stupid questions ;-)

mailto:[EMAIL PROTECTED]

> 2) What is the latest version of JSTL that I should use? Currently I am
> using the JSTL and Struts-el in combination.

V1.0.3, see

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

Yann




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: simple JSTL question

2003-08-14 Thread Mark Galbreath
But there are grammatically-challenged answers.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Yann Cébron
Sent: Sunday, August 10, 2003 8:26 AM

there's no stupid questions ;-)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: simple JSTL question

2003-08-14 Thread Adam Hardy
Sun have got a package of JSTL out, part of

http://java.sun.com/webservices/downloads/webservicespack.html

but I think their v1.1 is dependent on JSP 2.0 but you can get 1.0.3 
there. Not that there's any reason to, but just FYI

Yann Cébron wrote:
1) How do I subscribe to the JSTL mailing list? (I rather ask simple
dumb questions than stay with dumb answers :)


there's no stupid questions ;-)

mailto:[EMAIL PROTECTED]


2) What is the latest version of JSTL that I should use? Currently I am
using the JSTL and Struts-el in combination.


V1.0.3, see

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

Yann



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


simple JSTL question

2003-08-11 Thread Erez Efrati
Some simple questions:

1) How do I subscribe to the JSTL mailing list? (I rather ask simple
dumb questions than stay with dumb answers :)

2) What is the latest version of JSTL that I should use? Currently I am
using the JSTL and Struts-el in combination.

Thanks,
Erez



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: simple JSTL question

2003-08-10 Thread Erez Efrati
Thanks Yan,
Erez

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Yann Cיbron
Sent: Sunday, August 10, 2003 2:26 PM
To: [EMAIL PROTECTED]
Subject: Re: simple JSTL question

> 1) How do I subscribe to the JSTL mailing list? (I rather ask simple
> dumb questions than stay with dumb answers :)

there's no stupid questions ;-)

mailto:[EMAIL PROTECTED]

> 2) What is the latest version of JSTL that I should use? Currently I
am
> using the JSTL and Struts-el in combination.

V1.0.3, see

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

Yann




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL Question

2003-03-22 Thread David Graham
This is not a JSTL list.  Please post your question to 
http://forum.java.sun.com/forum.jsp?forum=45

David



From: "Navjot Singh" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users List" <[EMAIL PROTECTED]>
Subject: JSTL Question
Date: Sat, 22 Mar 2003 13:12:04 +0530
Hi Guys,

I have an ArrayList of HashMaps that i wish to iterate over using
 tag. How can i do that?
thanks for any help
-navjot


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JSTL Question

2003-03-21 Thread Navjot Singh
Hi Guys,

I have an ArrayList of HashMaps that i wish to iterate over using
 tag. How can i do that?

thanks for any help
-navjot



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL Question (EL vs. RT + Struts)

2002-11-21 Thread Kris Schneider
Well, for whatever reason, this seemed kind of entertaining (sad, huh?) so I
fleshed it out a bit and actually gave it a test run. Since both JSTL and Struts
taglibs can deal with a Map (JSTL doesn't have a clue about DynaBeans), that
seemed like a better way to go. So, the reflection can be done by a couple of
different methods:

public static DynaBean getConstantFieldsAsBean(Class cls)
   throws IllegalAccessException,
  InstantiationException,
  InvocationTargetException

public static Map getConstantFieldsAsMap(Class cls)
  throws IllegalAccessException

I added a context-param element to web.xml:


  com.dotech.CLASS_NAMES
 
javax.servlet.http.HttpServletResponse,org.apache.struts.Globals


along with a listener element:


  com.dotech.ConstantsContextListener


The listener parses class names out of the context init param, invokes the
utility method to create a Map of its constants, and then stores the Map in
application scope using the class name as the key.

For the Struts taglibs, the following kinds of access worked fine:





For JSTL:







I have no idea if that's of help to anyone, but if you want more details I'd be
happy to follow-up.

Quoting Kris Schneider <[EMAIL PROTECTED]>:

> Sounds like a job for a beanutils mechanism that does something like 
> (untested):
> 
> Class clazz = GLOBALS.class;
> String className = clazz.getName();
> 
> Map propMap = new HashMap();
> List dynaProps = new ArrayList();
> Field[] allFields = clazz.getDeclaredFields();
> for (int i = 0, n = allFields.length; i < n; i++) {
>Field f = allFields[i];
>int mods = f.getModifiers();
>if (Modifier.isPublic(mods) &&
>Modifier.isStatic(mods) &&
>Modifier.isFinal(mods)) {
>  String name = f.getName();
>  Class type = f.getType();
>  Object value = f.get(null);
>  DynaProperty prop = new DynaProperty(name, type);
>  dynaProps.add(prop);
>  propMap.put(name, value);
>}
> }
> 
> DynaProperty[] props = new DynaProperty[dynaProps.size()];
> dynaProps.toArray(props);
> 
> BasicDynaClass dynaClass = new BasicDynaClass(className, null, props);
> DynaBean dynaBean = dynaClass.newInstance();
> BeanUtils.populate(dynaBean, propMap);
> servletCtx.setAttribute(className, dynaBean);
> 
> Which gets you a DynaBean with all the constants exposed as properties. 
> Lots of other twists possible...
> 
> Eddie Bush wrote:
> > ... but can you even do that?  Can you use class-static methods without 
> > an instance of the class?
> > 
> > I've toyed with the idea of adding getters for constants into the 
> > Globals class, and then placing an instance of that class into 
> > application-scope.  What name should a person use though?  If you use 
> > the typical method of doing this you wind up with a chicken and egg 
> > scenario in your pages.  Of course, if we feel pretty satisfied that the 
> > location of the Globals probably isn't going to change again we could 
> > probably just decide that they will always be available under 
> > "org.apache.struts.GLOBALS" and be done with it.  You could then get 
> > ahold of the instance easily - and use that instance to reference other 
> > objects.
> > 
> > Incidentally, I don't believe there are any getters in the Globals class.
> > 
> > David Graham wrote:
> > 
> >> I see, so I have to do constants.getMyKey().  I guess that's easy
> enough.
> >>
> >> David 
> > 
> > 
> 
> -- 
> Kris Schneider 
> D.O.Tech   
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


-- 
Kris Schneider 
D.O.Tech   

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




Re: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Kris Schneider
Sounds like a job for a beanutils mechanism that does something like 
(untested):

Class clazz = GLOBALS.class;
String className = clazz.getName();

Map propMap = new HashMap();
List dynaProps = new ArrayList();
Field[] allFields = clazz.getDeclaredFields();
for (int i = 0, n = allFields.length; i < n; i++) {
  Field f = allFields[i];
  int mods = f.getModifiers();
  if (Modifier.isPublic(mods) &&
  Modifier.isStatic(mods) &&
  Modifier.isFinal(mods)) {
String name = f.getName();
Class type = f.getType();
Object value = f.get(null);
DynaProperty prop = new DynaProperty(name, type);
dynaProps.add(prop);
propMap.put(name, value);
  }
}

DynaProperty[] props = new DynaProperty[dynaProps.size()];
dynaProps.toArray(props);

BasicDynaClass dynaClass = new BasicDynaClass(className, null, props);
DynaBean dynaBean = dynaClass.newInstance();
BeanUtils.populate(dynaBean, propMap);
servletCtx.setAttribute(className, dynaBean);

Which gets you a DynaBean with all the constants exposed as properties. 
Lots of other twists possible...

Eddie Bush wrote:
... but can you even do that?  Can you use class-static methods without 
an instance of the class?

I've toyed with the idea of adding getters for constants into the 
Globals class, and then placing an instance of that class into 
application-scope.  What name should a person use though?  If you use 
the typical method of doing this you wind up with a chicken and egg 
scenario in your pages.  Of course, if we feel pretty satisfied that the 
location of the Globals probably isn't going to change again we could 
probably just decide that they will always be available under 
"org.apache.struts.GLOBALS" and be done with it.  You could then get 
ahold of the instance easily - and use that instance to reference other 
objects.

Incidentally, I don't believe there are any getters in the Globals class.

David Graham wrote:

I see, so I have to do constants.getMyKey().  I guess that's easy enough.

David 




--
Kris Schneider 
D.O.Tech   


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




RE: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Karr, David
As long as we're experimenting here :) , you could even have a method
that takes a hashmap and a class, and uses reflection to load up all the
"static final int" constants into the hashmap.

> -Original Message-
> From: Karr, David [mailto:[EMAIL PROTECTED]]
> 
> It's a little more verbose, but you might also consider 
> having a servlet
> context Hashmap attribute, called "constants", perhaps, and your app
> setup would put all your constants into the map, so you would 
> reference
> it like this:
> 
>   '${constants["MY_KEY"]}'
> 
> Actually, if you assume that all of your constant names have no spaces
> in them (I guess that's reasonable :) ), you could also do:
> 
>   "${constants.MY_KEY}"
> 
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > 
> > On Wed, 20 Nov 2002, David Graham wrote:
> > 
> > > Date: Wed, 20 Nov 2002 15:02:22 -0700
> > >
> > > But what is the EL expression to get a constant like 
> > Constants.MY_KEY?
> > >
> > 
> > What I would do is have my app setup code save the value of
> > Constants.MY_KEY as a servlet context attribute such as 
> > "MY_KEY".  Then,
> > the expression to access it would be the obvious one:  "${MY_KEY}".
> > 
> > > David
> > >
> > 
> > Craig

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




RE: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Karr, David
It's a little more verbose, but you might also consider having a servlet
context Hashmap attribute, called "constants", perhaps, and your app
setup would put all your constants into the map, so you would reference
it like this:

  '${constants["MY_KEY"]}'

Actually, if you assume that all of your constant names have no spaces
in them (I guess that's reasonable :) ), you could also do:

  "${constants.MY_KEY}"

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> 
> On Wed, 20 Nov 2002, David Graham wrote:
> 
> > Date: Wed, 20 Nov 2002 15:02:22 -0700
> > From: David Graham <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: JSTL Question (EL vs. RT + Struts)
> >
> > But what is the EL expression to get a constant like 
> Constants.MY_KEY?
> >
> 
> What I would do is have my app setup code save the value of
> Constants.MY_KEY as a servlet context attribute such as 
> "MY_KEY".  Then,
> the expression to access it would be the obvious one:  "${MY_KEY}".
> 
> > David
> >
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Craig R. McClanahan


On Wed, 20 Nov 2002, David Graham wrote:

> Date: Wed, 20 Nov 2002 15:02:22 -0700
> From: David Graham <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: JSTL Question (EL vs. RT + Struts)
>
> But what is the EL expression to get a constant like Constants.MY_KEY?
>

What I would do is have my app setup code save the value of
Constants.MY_KEY as a servlet context attribute such as "MY_KEY".  Then,
the expression to access it would be the obvious one:  "${MY_KEY}".

> David
>

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Eddie Bush
... but can you even do that?  Can you use class-static methods without 
an instance of the class?

I've toyed with the idea of adding getters for constants into the 
Globals class, and then placing an instance of that class into 
application-scope.  What name should a person use though?  If you use 
the typical method of doing this you wind up with a chicken and egg 
scenario in your pages.  Of course, if we feel pretty satisfied that the 
location of the Globals probably isn't going to change again we could 
probably just decide that they will always be available under 
"org.apache.struts.GLOBALS" and be done with it.  You could then get 
ahold of the instance easily - and use that instance to reference other 
objects.

Incidentally, I don't believe there are any getters in the Globals class.

David Graham wrote:

I see, so I have to do constants.getMyKey().  I guess that's easy enough.

David 

--
Eddie Bush




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




RE: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Wendy Smoak
>>> But what is the EL expression to get a constant like Constants.MY_KEY?
>>There is none.  JavaBeans.  JavaBeans.  JavaBeans.
> I see, so I have to do constants.getMyKey().  I guess that's easy enough.

What about  ?

-- 
Wendy



RE: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Karr, David
Well, if you actually have a scoped attribute named "constants" with a
"getMyKey()" accessor, then the expression would be
"${constants.myKey}".

> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 20, 2002 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: JSTL Question (EL vs. RT + Struts)
> 
> I see, so I have to do constants.getMyKey().  I guess that's 
> easy enough.
> 
> David
> 
> >From: "Karr, David" <[EMAIL PROTECTED]>
> >
> >There is none.  JavaBeans.  JavaBeans.  JavaBeans.
> >
> > > -Original Message-
> > > From: David Graham [mailto:[EMAIL PROTECTED]]
> > >
> > > But what is the EL expression to get a constant like 
> Constants.MY_KEY?

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread David Graham
I see, so I have to do constants.getMyKey().  I guess that's easy enough.

David







From: "Karr, David" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: JSTL Question (EL vs. RT + Struts)
Date: Wed, 20 Nov 2002 14:05:03 -0800

There is none.  JavaBeans.  JavaBeans.  JavaBeans.

> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]]
>
> But what is the EL expression to get a constant like Constants.MY_KEY?
>
> David
>
> >From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> >
> >On Wed, 20 Nov 2002, Hohlen, John wrote:
> >
> > > Date: Wed, 20 Nov 2002 13:14:43 -0600
> > > From: "Hohlen, John" <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List
> <[EMAIL PROTECTED]>
> > > To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
> > > Subject: JSTL Question (EL vs. RT + Struts)
> > >
> > > My team is starting a new project with Struts.  In our
> previous Struts
> > > projects, our JSPs used mostly tags from the Struts tag
> libraries.  For
> >our
> > > new project, I want my team to start using the JSTL.  For
> that reason,
> >the
> > > "Struts-EL" subproject is very appealing because it will force our
> > > developers to learn the JSTL  -- as functionality
> duplicated in the
> >Struts
> > > libraries (Bean & Logic) are removed when it is available
> in the JSTL.
> > > Obviously, we'll still be using many of the Struts tags
> -- especially
> >those
> > > tied to the Struts framework (e.g. all tags in the Struts "html"
> >library).
> > > However, we're not sure whether to use the "Request Time"
> (RT) version
> >or
> > > the "Expression Language" (EL) version of the JSTL
> library.  And we have
> >the
> > > same question for the "Struts" subproject (Struts-EL or
> Struts-RT)?
> > >
> >
> >The "EL" version is normally the one you want to use,
> because that is what
> >actually enables expression language support.
> >
> >The "RT" version has exactly the same tags and attributes,
> but does not
> >recognize EL expressions.  It was created for the rare, but
> possible, case
> >that someone might have used a tag like this in a JSP page:
> >
> >   
> >
> >and expected the "bar" property of the tag to actually
> receive "${baz}"
> >the way it would have prior to EL support.  (An EL-enabled
> version of the
> >tag would look up the "baz" attribute in
> page/request/session/application
> >scope and assign that value to bar.)
> >
> > > Does anyone have any advice here?  Will JSTL compliant
> application
> >servers
> > > be required to implement a "EL" and "RT" version of the
> JSTL, or will
> >they
> > > only have to implement the "EL" version?
> > >
> > > One other issue:  We want to reference constants declared
> in our Java
> >files
> > > in our JSP.  These are often the bean or error key
> constants.  This
> >helps
> > > guard against a String typo in the JSP as any mistyped
> constant name
> >will
> > > get caught a JSP compile time -- where a string typo will not be
> >detected
> > > until JSP execution time.  Does anyone how to reference
> Java variables
> >in
> > > your JSP if you're using the JSTL-EL tags?  Is this even
> possible?  If
> >not,
> > > what are the alternatives?
> > >
> >
> >As was pointed out by others, the EL libraries don't
> recognize runtime
> >expressions so you can't use "<%= ... %>" to get these.
> Your alternatives
> >would be:
> >
> >* Go to the RT version (but give up EL expressions)
> >
> >* Store the constants you need under some well known names,
> >   perhaps in application scope, so that you can use an
> >   EL expression to get them.
> >
> > > Thanks,
> > >
> > > JOHN
> >
> >Craig

--
To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



RE: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Karr, David
There is none.  JavaBeans.  JavaBeans.  JavaBeans.

> -Original Message-
> From: David Graham [mailto:[EMAIL PROTECTED]]
> 
> But what is the EL expression to get a constant like Constants.MY_KEY?
> 
> David
> 
> >From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> >
> >On Wed, 20 Nov 2002, Hohlen, John wrote:
> >
> > > Date: Wed, 20 Nov 2002 13:14:43 -0600
> > > From: "Hohlen, John" <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List 
> <[EMAIL PROTECTED]>
> > > To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
> > > Subject: JSTL Question (EL vs. RT + Struts)
> > >
> > > My team is starting a new project with Struts.  In our 
> previous Struts
> > > projects, our JSPs used mostly tags from the Struts tag 
> libraries.  For 
> >our
> > > new project, I want my team to start using the JSTL.  For 
> that reason, 
> >the
> > > "Struts-EL" subproject is very appealing because it will force our
> > > developers to learn the JSTL  -- as functionality 
> duplicated in the 
> >Struts
> > > libraries (Bean & Logic) are removed when it is available 
> in the JSTL.
> > > Obviously, we'll still be using many of the Struts tags 
> -- especially 
> >those
> > > tied to the Struts framework (e.g. all tags in the Struts "html" 
> >library).
> > > However, we're not sure whether to use the "Request Time" 
> (RT) version 
> >or
> > > the "Expression Language" (EL) version of the JSTL 
> library.  And we have 
> >the
> > > same question for the "Struts" subproject (Struts-EL or 
> Struts-RT)?
> > >
> >
> >The "EL" version is normally the one you want to use, 
> because that is what
> >actually enables expression language support.
> >
> >The "RT" version has exactly the same tags and attributes, 
> but does not
> >recognize EL expressions.  It was created for the rare, but 
> possible, case
> >that someone might have used a tag like this in a JSP page:
> >
> >   
> >
> >and expected the "bar" property of the tag to actually 
> receive "${baz}"
> >the way it would have prior to EL support.  (An EL-enabled 
> version of the
> >tag would look up the "baz" attribute in 
> page/request/session/application
> >scope and assign that value to bar.)
> >
> > > Does anyone have any advice here?  Will JSTL compliant 
> application 
> >servers
> > > be required to implement a "EL" and "RT" version of the 
> JSTL, or will 
> >they
> > > only have to implement the "EL" version?
> > >
> > > One other issue:  We want to reference constants declared 
> in our Java 
> >files
> > > in our JSP.  These are often the bean or error key 
> constants.  This 
> >helps
> > > guard against a String typo in the JSP as any mistyped 
> constant name  
> >will
> > > get caught a JSP compile time -- where a string typo will not be 
> >detected
> > > until JSP execution time.  Does anyone how to reference 
> Java variables 
> >in
> > > your JSP if you're using the JSTL-EL tags?  Is this even 
> possible?  If 
> >not,
> > > what are the alternatives?
> > >
> >
> >As was pointed out by others, the EL libraries don't 
> recognize runtime
> >expressions so you can't use "<%= ... %>" to get these.  
> Your alternatives
> >would be:
> >
> >* Go to the RT version (but give up EL expressions)
> >
> >* Store the constants you need under some well known names,
> >   perhaps in application scope, so that you can use an
> >   EL expression to get them.
> >
> > > Thanks,
> > >
> > > JOHN
> >
> >Craig

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread David Graham
But what is the EL expression to get a constant like Constants.MY_KEY?

David







From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: JSTL Question (EL vs. RT + Struts)
Date: Wed, 20 Nov 2002 13:58:57 -0800 (PST)



On Wed, 20 Nov 2002, Hohlen, John wrote:

> Date: Wed, 20 Nov 2002 13:14:43 -0600
> From: "Hohlen, John" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
> Subject: JSTL Question (EL vs. RT + Struts)
>
> My team is starting a new project with Struts.  In our previous Struts
> projects, our JSPs used mostly tags from the Struts tag libraries.  For 
our
> new project, I want my team to start using the JSTL.  For that reason, 
the
> "Struts-EL" subproject is very appealing because it will force our
> developers to learn the JSTL  -- as functionality duplicated in the 
Struts
> libraries (Bean & Logic) are removed when it is available in the JSTL.
> Obviously, we'll still be using many of the Struts tags -- especially 
those
> tied to the Struts framework (e.g. all tags in the Struts "html" 
library).
> However, we're not sure whether to use the "Request Time" (RT) version 
or
> the "Expression Language" (EL) version of the JSTL library.  And we have 
the
> same question for the "Struts" subproject (Struts-EL or Struts-RT)?
>

The "EL" version is normally the one you want to use, because that is what
actually enables expression language support.

The "RT" version has exactly the same tags and attributes, but does not
recognize EL expressions.  It was created for the rare, but possible, case
that someone might have used a tag like this in a JSP page:

  

and expected the "bar" property of the tag to actually receive "${baz}"
the way it would have prior to EL support.  (An EL-enabled version of the
tag would look up the "baz" attribute in page/request/session/application
scope and assign that value to bar.)

> Does anyone have any advice here?  Will JSTL compliant application 
servers
> be required to implement a "EL" and "RT" version of the JSTL, or will 
they
> only have to implement the "EL" version?
>
> One other issue:  We want to reference constants declared in our Java 
files
> in our JSP.  These are often the bean or error key constants.  This 
helps
> guard against a String typo in the JSP as any mistyped constant name  
will
> get caught a JSP compile time -- where a string typo will not be 
detected
> until JSP execution time.  Does anyone how to reference Java variables 
in
> your JSP if you're using the JSTL-EL tags?  Is this even possible?  If 
not,
> what are the alternatives?
>

As was pointed out by others, the EL libraries don't recognize runtime
expressions so you can't use "<%= ... %>" to get these.  Your alternatives
would be:

* Go to the RT version (but give up EL expressions)

* Store the constants you need under some well known names,
  perhaps in application scope, so that you can use an
  EL expression to get them.

> Thanks,
>
> JOHN

Craig


--
To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Re: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Craig R. McClanahan


On Wed, 20 Nov 2002, Hohlen, John wrote:

> Date: Wed, 20 Nov 2002 13:14:43 -0600
> From: "Hohlen, John" <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
> Subject: JSTL Question (EL vs. RT + Struts)
>
> My team is starting a new project with Struts.  In our previous Struts
> projects, our JSPs used mostly tags from the Struts tag libraries.  For our
> new project, I want my team to start using the JSTL.  For that reason, the
> "Struts-EL" subproject is very appealing because it will force our
> developers to learn the JSTL  -- as functionality duplicated in the Struts
> libraries (Bean & Logic) are removed when it is available in the JSTL.
> Obviously, we'll still be using many of the Struts tags -- especially those
> tied to the Struts framework (e.g. all tags in the Struts "html" library).
> However, we're not sure whether to use the "Request Time" (RT) version or
> the "Expression Language" (EL) version of the JSTL library.  And we have the
> same question for the "Struts" subproject (Struts-EL or Struts-RT)?
>

The "EL" version is normally the one you want to use, because that is what
actually enables expression language support.

The "RT" version has exactly the same tags and attributes, but does not
recognize EL expressions.  It was created for the rare, but possible, case
that someone might have used a tag like this in a JSP page:

  

and expected the "bar" property of the tag to actually receive "${baz}"
the way it would have prior to EL support.  (An EL-enabled version of the
tag would look up the "baz" attribute in page/request/session/application
scope and assign that value to bar.)

> Does anyone have any advice here?  Will JSTL compliant application servers
> be required to implement a "EL" and "RT" version of the JSTL, or will they
> only have to implement the "EL" version?
>
> One other issue:  We want to reference constants declared in our Java files
> in our JSP.  These are often the bean or error key constants.  This helps
> guard against a String typo in the JSP as any mistyped constant name  will
> get caught a JSP compile time -- where a string typo will not be detected
> until JSP execution time.  Does anyone how to reference Java variables in
> your JSP if you're using the JSTL-EL tags?  Is this even possible?  If not,
> what are the alternatives?
>

As was pointed out by others, the EL libraries don't recognize runtime
expressions so you can't use "<%= ... %>" to get these.  Your alternatives
would be:

* Go to the RT version (but give up EL expressions)

* Store the constants you need under some well known names,
  perhaps in application scope, so that you can use an
  EL expression to get them.

> Thanks,
>
> JOHN

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Kris Schneider
You pretty much need the RT taglibs to get at constants:





Quoting David Graham <[EMAIL PROTECTED]>:

> You should use the JSTL EL library because of the expression language's 
> power.  These tags replace most of the logic and bean tags from Struts.  On
> 
> my projects I only use the struts html taglib and the rest is handled with 
> jstl.  The constants in JSP issue is tricky and I haven't solved it myself.
> 
> David
> 
> 
> 
> 
> 
> 
> >From: "Hohlen, John" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
> >Subject: JSTL Question (EL vs. RT + Struts)
> >Date: Wed, 20 Nov 2002 13:14:43 -0600
> >
> >My team is starting a new project with Struts.  In our previous Struts
> >projects, our JSPs used mostly tags from the Struts tag libraries.  For
> our
> >new project, I want my team to start using the JSTL.  For that reason, the
> >"Struts-EL" subproject is very appealing because it will force our
> >developers to learn the JSTL  -- as functionality duplicated in the Struts
> >libraries (Bean & Logic) are removed when it is available in the JSTL.
> >Obviously, we'll still be using many of the Struts tags -- especially
> those
> >tied to the Struts framework (e.g. all tags in the Struts "html" library).
> >However, we're not sure whether to use the "Request Time" (RT) version or
> >the "Expression Language" (EL) version of the JSTL library.  And we have 
> >the
> >same question for the "Struts" subproject (Struts-EL or Struts-RT)?
> >
> >Does anyone have any advice here?  Will JSTL compliant application servers
> >be required to implement a "EL" and "RT" version of the JSTL, or will they
> >only have to implement the "EL" version?
> >
> >One other issue:  We want to reference constants declared in our Java
> files
> >in our JSP.  These are often the bean or error key constants.  This helps
> >guard against a String typo in the JSP as any mistyped constant name  will
> >get caught a JSP compile time -- where a string typo will not be detected
> >until JSP execution time.  Does anyone how to reference Java variables in
> >your JSP if you're using the JSTL-EL tags?  Is this even possible?  If
> not,
> >what are the alternatives?
> >
> >Thanks,
> >
> >JOHN
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> ><mailto:[EMAIL PROTECTED]>
> 
> 
> _
> Protect your PC - get McAfee.com VirusScan Online 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: JSTL Question (EL vs. RT + Struts + nested?? )

2002-11-20 Thread Jeff_Mychasiw

I am curious about how the nested taglib fits into this discussion.
 I have been using the nested tags for just about all my forms and logic
tags.
Do JSTL tags  have the capability as nested tags?

Thanks




"David Graham" <[EMAIL PROTECTED]> on 11/20/2002 01:37:27 PM

Please respond to "Struts Users Mailing List"
   <[EMAIL PROTECTED]>

To:[EMAIL PROTECTED]
cc:

Subject:Re: JSTL Question (EL vs. RT + Struts)


You should use the JSTL EL library because of the expression language's
power.  These tags replace most of the logic and bean tags from Struts.  On
my projects I only use the struts html taglib and the rest is handled with
jstl.  The constants in JSP issue is tricky and I haven't solved it myself.

David






>From: "Hohlen, John" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
>Subject: JSTL Question (EL vs. RT + Struts)
>Date: Wed, 20 Nov 2002 13:14:43 -0600
>
>My team is starting a new project with Struts.  In our previous Struts
>projects, our JSPs used mostly tags from the Struts tag libraries.  For
our
>new project, I want my team to start using the JSTL.  For that reason, the
>"Struts-EL" subproject is very appealing because it will force our
>developers to learn the JSTL  -- as functionality duplicated in the Struts
>libraries (Bean & Logic) are removed when it is available in the JSTL.
>Obviously, we'll still be using many of the Struts tags -- especially
those
>tied to the Struts framework (e.g. all tags in the Struts "html" library).
>However, we're not sure whether to use the "Request Time" (RT) version or
>the "Expression Language" (EL) version of the JSTL library.  And we have
>the
>same question for the "Struts" subproject (Struts-EL or Struts-RT)?
>
>Does anyone have any advice here?  Will JSTL compliant application servers
>be required to implement a "EL" and "RT" version of the JSTL, or will they
>only have to implement the "EL" version?
>
>One other issue:  We want to reference constants declared in our Java
files
>in our JSP.  These are often the bean or error key constants.  This helps
>guard against a String typo in the JSP as any mistyped constant name  will
>get caught a JSP compile time -- where a string typo will not be detected
>until JSP execution time.  Does anyone how to reference Java variables in
>your JSP if you're using the JSTL-EL tags?  Is this even possible?  If
not,
>what are the alternatives?
>
>Thanks,
>
>JOHN
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>


_
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>








--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread David Graham
You should use the JSTL EL library because of the expression language's 
power.  These tags replace most of the logic and bean tags from Struts.  On 
my projects I only use the struts html taglib and the rest is handled with 
jstl.  The constants in JSP issue is tricky and I haven't solved it myself.

David






From: "Hohlen, John" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts-Help (E-mail)" <[EMAIL PROTECTED]>
Subject: JSTL Question (EL vs. RT + Struts)
Date: Wed, 20 Nov 2002 13:14:43 -0600

My team is starting a new project with Struts.  In our previous Struts
projects, our JSPs used mostly tags from the Struts tag libraries.  For our
new project, I want my team to start using the JSTL.  For that reason, the
"Struts-EL" subproject is very appealing because it will force our
developers to learn the JSTL  -- as functionality duplicated in the Struts
libraries (Bean & Logic) are removed when it is available in the JSTL.
Obviously, we'll still be using many of the Struts tags -- especially those
tied to the Struts framework (e.g. all tags in the Struts "html" library).
However, we're not sure whether to use the "Request Time" (RT) version or
the "Expression Language" (EL) version of the JSTL library.  And we have 
the
same question for the "Struts" subproject (Struts-EL or Struts-RT)?

Does anyone have any advice here?  Will JSTL compliant application servers
be required to implement a "EL" and "RT" version of the JSTL, or will they
only have to implement the "EL" version?

One other issue:  We want to reference constants declared in our Java files
in our JSP.  These are often the bean or error key constants.  This helps
guard against a String typo in the JSP as any mistyped constant name  will
get caught a JSP compile time -- where a string typo will not be detected
until JSP execution time.  Does anyone how to reference Java variables in
your JSP if you're using the JSTL-EL tags?  Is this even possible?  If not,
what are the alternatives?

Thanks,

JOHN



--
To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>


_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



JSTL Question (EL vs. RT + Struts)

2002-11-20 Thread Hohlen, John
My team is starting a new project with Struts.  In our previous Struts
projects, our JSPs used mostly tags from the Struts tag libraries.  For our
new project, I want my team to start using the JSTL.  For that reason, the
"Struts-EL" subproject is very appealing because it will force our
developers to learn the JSTL  -- as functionality duplicated in the Struts
libraries (Bean & Logic) are removed when it is available in the JSTL.
Obviously, we'll still be using many of the Struts tags -- especially those
tied to the Struts framework (e.g. all tags in the Struts "html" library).
However, we're not sure whether to use the "Request Time" (RT) version or
the "Expression Language" (EL) version of the JSTL library.  And we have the
same question for the "Struts" subproject (Struts-EL or Struts-RT)?

Does anyone have any advice here?  Will JSTL compliant application servers
be required to implement a "EL" and "RT" version of the JSTL, or will they
only have to implement the "EL" version?

One other issue:  We want to reference constants declared in our Java files
in our JSP.  These are often the bean or error key constants.  This helps
guard against a String typo in the JSP as any mistyped constant name  will
get caught a JSP compile time -- where a string typo will not be detected
until JSP execution time.  Does anyone how to reference Java variables in
your JSP if you're using the JSTL-EL tags?  Is this even possible?  If not,
what are the alternatives?

Thanks,

JOHN



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