Re: c:forEach problem

2007-09-25 Thread Ashmeet

Hi, 
try using this ...[EMAIL PROTECTED] prefix = c  uri =
http://java.sun.com/jsp/jstl/core; %
I also had same problem  which was solved by using above directive.
 
regards,
Ashmeet


Andre Prasetya-2 wrote:
 
 Hi
 
 i m new to jsp and jstl. i m using tomcat 5.5, and standard.jar
 
 my taglib declaration is
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 
 the code that is in problem is
 c:forEach var=prod items=${model.products}
 ${prod.products} ${prod.price}br/br/
 /c:forEach
 
 the model declaration is as follows
 String now = new Date().toString();
 Map myModel = new HashMap();
 myModel.put(now, now);
 myModel.put(products, productManager.getProducts());
 
 productManager.getProducts() will return a List
 
 i get exception
 org.apache.jasper.JasperException: /WEB-INF/jsp/hello.jsp(12,0) According
 to
 TLD or attribute directive in tag file, attribute items does not accept
 any
 expressions
 
 where have i gone wrong ?
 
 -- 
 -Andre-
 
 People see things the way they are and say why ? I see things that never
 were and say Why not ?
 
 

-- 
View this message in context: 
http://www.nabble.com/c%3AforEach-problem-tf3604887.html#a12893918
Sent from the Taglibs - User mailing list archive at Nabble.com.


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



Re: c:forEach problem

2007-04-19 Thread Franz Reitinger
See http://forum.java.sun.com/thread.jspa?threadID=683007tstart=75


You can use
[EMAIL PROTECTED] prefix=c uri=http://java.sun.com/jstl/core_rt; %

or use the correct JSTL1.1 URI with as JSP2.0 container (prefered way):
JSTL1.0 for Tomcat 4 (Servlet2.3 / JSP1.2)
JSTL1.1 for Tomcat 5 (Servlet2.4/ JSP2.0)


/franzR



zitiere wer=Andre Prasetya
 Hi

 i m new to jsp and jstl. i m using tomcat 5.5, and standard.jar

 my taglib declaration is
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %

 the code that is in problem is
 c:forEach var=prod items=${model.products}
 ${prod.products} i${prod.price}/ibr/br/
 /c:forEach

 the model declaration is as follows
 String now = new Date().toString();
 Map myModel = new HashMap();
 myModel.put(now, now);
 myModel.put(products, productManager.getProducts());

 productManager.getProducts() will return a List

 i get exception
 org.apache.jasper.JasperException: /WEB-INF/jsp/hello.jsp(12,0)
 According to TLD or attribute directive in tag file, attribute items
 does not accept any expressions

 where have i gone wrong ?

 --
 -Andre-

 People see things the way they are and say why ? I see things that
 never were and say Why not ?




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



Re: c:forEach problem

2007-04-19 Thread Andre Prasetya

thanks pak,
kl dibaca lg di bawahnya dikasih tahu kl core_rt cuma buat servlet 2.3

On 4/19/07, Franz Reitinger [EMAIL PROTECTED] wrote:


See http://forum.java.sun.com/thread.jspa?threadID=683007tstart=75


You can use
[EMAIL PROTECTED] prefix=c uri=http://java.sun.com/jstl/core_rt; %

or use the correct JSTL1.1 URI with as JSP2.0 container (prefered way):
JSTL1.0 for Tomcat 4 (Servlet2.3 / JSP1.2)
JSTL1.1 for Tomcat 5 (Servlet2.4/ JSP2.0)


/franzR



zitiere wer=Andre Prasetya
 Hi

 i m new to jsp and jstl. i m using tomcat 5.5, and standard.jar

 my taglib declaration is
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %

 the code that is in problem is
 c:forEach var=prod items=${model.products}
 ${prod.products} i${prod.price}/ibr/br/
 /c:forEach

 the model declaration is as follows
 String now = new Date().toString();
 Map myModel = new HashMap();
 myModel.put(now, now);
 myModel.put(products, productManager.getProducts());

 productManager.getProducts() will return a List

 i get exception
 org.apache.jasper.JasperException: /WEB-INF/jsp/hello.jsp(12,0)
 According to TLD or attribute directive in tag file, attribute items
 does not accept any expressions

 where have i gone wrong ?

 --
 -Andre-

 People see things the way they are and say why ? I see things that
 never were and say Why not ?




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





--
-Andre-

People see things the way they are and say why ? I see things that never
were and say Why not ?


Re: c:forEach problem

2007-04-19 Thread Andre Prasetya

sorry i tought i m talking at indonesian mailing list.

i ve got the answer to the problem,
i should be using [EMAIL PROTECTED] prefix=c 
uri=http://java.sun.com/jsp/jstl/core;
%
as the one without /jsp dont support EL,

and there is another error about the calling of ${prod.products} it should
be ${prod.description}

On 4/19/07, Franz Reitinger [EMAIL PROTECTED] wrote:


See http://forum.java.sun.com/thread.jspa?threadID=683007tstart=75


You can use
[EMAIL PROTECTED] prefix=c uri=http://java.sun.com/jstl/core_rt; %

or use the correct JSTL1.1 URI with as JSP2.0 container (prefered way):
JSTL1.0 for Tomcat 4 (Servlet2.3 / JSP1.2)
JSTL1.1 for Tomcat 5 (Servlet2.4/ JSP2.0)


/franzR



zitiere wer=Andre Prasetya
 Hi

 i m new to jsp and jstl. i m using tomcat 5.5, and standard.jar

 my taglib declaration is
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %

 the code that is in problem is
 c:forEach var=prod items=${model.products}
 ${prod.products} i${prod.price}/ibr/br/
 /c:forEach

 the model declaration is as follows
 String now = new Date().toString();
 Map myModel = new HashMap();
 myModel.put(now, now);
 myModel.put(products, productManager.getProducts());

 productManager.getProducts() will return a List

 i get exception
 org.apache.jasper.JasperException: /WEB-INF/jsp/hello.jsp(12,0)
 According to TLD or attribute directive in tag file, attribute items
 does not accept any expressions

 where have i gone wrong ?

 --
 -Andre-

 People see things the way they are and say why ? I see things that
 never were and say Why not ?




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





--
-Andre-

People see things the way they are and say why ? I see things that never
were and say Why not ?


c:forEach problem

2007-04-18 Thread Andre Prasetya

Hi

i m new to jsp and jstl. i m using tomcat 5.5, and standard.jar

my taglib declaration is
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %

the code that is in problem is
c:forEach var=prod items=${model.products}
   ${prod.products} i${prod.price}/ibr/br/
/c:forEach

the model declaration is as follows
   String now = new Date().toString();
   Map myModel = new HashMap();
   myModel.put(now, now);
   myModel.put(products, productManager.getProducts());

productManager.getProducts() will return a List

i get exception
org.apache.jasper.JasperException: /WEB-INF/jsp/hello.jsp(12,0) According to
TLD or attribute directive in tag file, attribute items does not accept any
expressions

where have i gone wrong ?

--
-Andre-

People see things the way they are and say why ? I see things that never
were and say Why not ?


c:forEach problem

2005-03-29 Thread nitin dubey
Hello,

My JSP code looks like this..

c:if test=${! empty CONTEXT_STRUCTURE.directories}
c:forEach var=directory
items=CONTEXT_STRUCTURE.directories 
tr
td width=57%c:out value=${directory.name}
//td
td width=22%Template/td
td width=21%nbsp;/td
/tr
/c:forEach
/c:if


CONTEXT_STRUCTURE will return an Object of class
ContextStructure from the session scope. The sole two
members in ContextStructure class is ArrayList
directories, Arraylist files with its setters and
getters. This ArrayList further has ContextItem class
instances that has properties like name and path with
its setters and getters.

I am getting an exception

Unable to find a value for name in object of class
java.lang.String using operator .

when I try to access the name property of the
ContextItem object as in the JSP code.

Could anyone tell me where I am getting wrong ?

Regards,


Nitin Dubey

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: c:forEach problem

2005-03-29 Thread Rahul P Akolkar
 c:forEach var=directory
 items=CONTEXT_STRUCTURE.directories 

EL expression for items? String argument will be treated as a CSV.

-Rahul


c:forEach problem

2003-09-02 Thread Adam Hardy
Hi All,
I'm trying to swop a struts logic:iterate tag for a c:forEach and I have 
run into the problem that I get no output. I get no errors either. There 
is obviously something wrong with my forEach tag.

Here is what I have:

c:set var=sectionListKey value=%=Constants4Lists.SECTION_LIST % /
c:forEach var=idata items=${requestScope[sectionListKey]}
  blacksail:row oddStyleClass=odd evenStyleClass=even
td class=listTitle
  c:out value=${idata.map.title} default=error/
/td
  /blacksail:row
/c:forEach
My key identifying the collection in the request attributes is the 
constant Constants4Lists.SECTION_LIST, which is why I use the c:set tag 
first. This is what I had with struts' logic:iterate

logic:iterate id=idata name=%=Constants4Lists.SECTION_LIST % 
scope=request 
  blacksail:row oddStyleClass=odd evenStyleClass=even
td class=listTitle
  bean:write name=idata property=title/
/td
  /blacksail:row
/logic:iterate

Any help gratefully accepted.

Adam

--
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]