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 ?


jstl x:parse outputs data

2007-04-19 Thread Isabelle Phan
My problem: x:parse is outputting the RSS feed content even though the JSP does 
not contain x:out or c:out statement


The code:

c:import var=rssFeed url=http://www.expasy.org/spotlight/index.xml/
x:parse var=rss xml=${rssFeed}/

output:

http://www.expasy.org/spotlight/ one month, one protein en-us 
[EMAIL PROTECTED] 2007-03-26T10:13:59+01:00 hourly 1 
2000-01-01T12:00+00:00

etc...

until:

while obestatin reports adequacy. [EMAIL PROTECTED]://www.expasy.org/spotlight/ Article 
2006-01-19T13:22:59+01:00  var=rss/



It looks as if part of the x:parse tag is printed on the HTML page!

I am using JSTL 1.1

Anybody seen this before?

--
Isabelle Phan, D.Phil.
Swiss Institute of Bioinformatics Tel: (+41 22) 379 51 89
CMU - 1, rue Michel ServetFax: (+41 22) 379 58 58
CH - 1211 Geneva 4 Switzerlandemail: [EMAIL PROTECTED]

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



Re: jstl x:parse outputs data

2007-04-19 Thread Kris Schneider
Are you sure you're properly declaring the x taglib? It almost looks like 
x:parse is being treated as a plain XML element and ${rssFeed} is simply 
evaluated and used for the value of the xml attribute. Can you view the 
source of the generated page?


Isabelle Phan wrote:
My problem: x:parse is outputting the RSS feed content even though the 
JSP does not contain x:out or c:out statement


The code:

c:import var=rssFeed url=http://www.expasy.org/spotlight/index.xml/
x:parse var=rss xml=${rssFeed}/

output:

http://www.expasy.org/spotlight/ one month, one protein en-us 
[EMAIL PROTECTED] 2007-03-26T10:13:59+01:00 hourly 1 
2000-01-01T12:00+00:00

etc...

until:

while obestatin reports adequacy. [EMAIL PROTECTED]://www.expasy.org/spotlight/ 
Article 2006-01-19T13:22:59+01:00  var=rss/



It looks as if part of the x:parse tag is printed on the HTML page!

I am using JSTL 1.1

Anybody seen this before?


--
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: jstl x:parse outputs data

2007-04-19 Thread Isabelle Phan

Hi Kris

the x taglib is declared like other jstl libraries:

 xmlns:x=jstl-xml

it follows the taglib declarations in web.xml, but from the output you are 
right, it seems like the tag is ignored:


x:parse escapeXml=true xml=?xml version=1.0 encoding=ISO-8859-1?
etc...


I have the vague feeling it's some stupid typo...

thanks for your help

Isabelle

Kris Schneider wrote:
Are you sure you're properly declaring the x taglib? It almost looks 
like x:parse is being treated as a plain XML element and ${rssFeed} is 
simply evaluated and used for the value of the xml attribute. Can you 
view the source of the generated page?


Isabelle Phan wrote:
My problem: x:parse is outputting the RSS feed content even though the 
JSP does not contain x:out or c:out statement


The code:

c:import var=rssFeed url=http://www.expasy.org/spotlight/index.xml/
x:parse var=rss xml=${rssFeed}/

output:

http://www.expasy.org/spotlight/ one month, one protein en-us 
[EMAIL PROTECTED] 2007-03-26T10:13:59+01:00 hourly 1 
2000-01-01T12:00+00:00

etc...

until:

while obestatin reports adequacy. [EMAIL PROTECTED]://www.expasy.org/spotlight/ 
Article 2006-01-19T13:22:59+01:00  var=rss/



It looks as if part of the x:parse tag is printed on the HTML page!

I am using JSTL 1.1

Anybody seen this before?





--
Isabelle Phan, D.Phil.
Swiss Institute of Bioinformatics Tel: (+41 22) 379 51 89
CMU - 1, rue Michel ServetFax: (+41 22) 379 58 58
CH - 1211 Geneva 4 Switzerlandemail: [EMAIL PROTECTED]

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



Re: jstl x:parse outputs data

2007-04-19 Thread Isabelle Phan

this is the complete declaration in the JSP:

jsp:root
xmlns=http://www.w3.org/1999/xhtml;
xmlns:jsp=http://java.sun.com/JSP/Page;
xmlns:tags=urn:jsptagdir:/WEB-INF/tags/
xmlns:c=jstl-core
xmlns:fmt=jstl-fmt
xmlns:x=jstl-xml
xmlns:html=struts-html
version=2.0


and in web.xml:

jsp-config

taglib
taglib-urijstl-core/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location
/taglib

taglib
taglib-urijstl-functions/taglib-uri
taglib-location/WEB-INF/tld/fn.tld/taglib-location
/taglib

taglib
taglib-urijstl-fmt/taglib-uri
taglib-location/WEB-INF/tld/fmt.tld/taglib-location
/taglib

taglib
taglib-urijstl-xml/taglib-uri
taglib-location/WEB-INF/tld/x.tld/taglib-location
/taglib


Kris Schneider wrote:

I would think you'd be using these:

xmlns:c=http://java.sun.com/jsp/jstl/core;
xmlns:x=http://java.sun.com/jsp/jstl/xml;

Isabelle Phan wrote:

Hi Kris

the x taglib is declared like other jstl libraries:

 xmlns:x=jstl-xml

it follows the taglib declarations in web.xml, but from the output you 
are right, it seems like the tag is ignored:


x:parse escapeXml=true xml=?xml version=1.0 
encoding=ISO-8859-1?

etc...


I have the vague feeling it's some stupid typo...

thanks for your help

Isabelle

Kris Schneider wrote:

Are you sure you're properly declaring the x taglib? It almost looks 
like x:parse is being treated as a plain XML element and ${rssFeed} 
is simply evaluated and used for the value of the xml attribute. Can 
you view the source of the generated page?


Isabelle Phan wrote:

My problem: x:parse is outputting the RSS feed content even though 
the JSP does not contain x:out or c:out statement


The code:

c:import var=rssFeed 
url=http://www.expasy.org/spotlight/index.xml/

x:parse var=rss xml=${rssFeed}/

output:

http://www.expasy.org/spotlight/ one month, one protein en-us 
[EMAIL PROTECTED] 2007-03-26T10:13:59+01:00 hourly 1 
2000-01-01T12:00+00:00

etc...

until:

while obestatin reports adequacy. 
[EMAIL PROTECTED]://www.expasy.org/spotlight/ Article 
2006-01-19T13:22:59+01:00  var=rss/



It looks as if part of the x:parse tag is printed on the HTML page!

I am using JSTL 1.1

Anybody seen this before?





--
Isabelle Phan, D.Phil.
Swiss Institute of Bioinformatics Tel: (+41 22) 379 51 89
CMU - 1, rue Michel ServetFax: (+41 22) 379 58 58
CH - 1211 Geneva 4 Switzerlandemail: [EMAIL PROTECTED]

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



Re: jstl x:parse outputs data

2007-04-19 Thread Kris Schneider
You don't need those taglib entries in web.xml. Remove them and use the 
proper JSTL 1.1 URIs:


jsp:root xmlns:jsp=”http://java.sun.com/JSP/Page”
  xmlns:c=http://java.sun.com/jsp/jstl/core;
  xmlns:fmt=http://java.sun.com/jsp/jstl/fmt;
  xmlns:fn=http://java.sun.com/jsp/jstl/functions;
  xmlns:x=http://java.sun.com/jsp/jstl/xml;
  ...
  version=”2.0

You don't need a taglib entry for the Struts taglib either. Find out what 
its proper URI is and use it instead of struts-html.


Isabelle Phan wrote:

this is the complete declaration in the JSP:

jsp:root
xmlns=http://www.w3.org/1999/xhtml;
xmlns:jsp=http://java.sun.com/JSP/Page;
xmlns:tags=urn:jsptagdir:/WEB-INF/tags/
xmlns:c=jstl-core
xmlns:fmt=jstl-fmt
xmlns:x=jstl-xml
xmlns:html=struts-html
version=2.0
 

and in web.xml:

jsp-config

taglib
taglib-urijstl-core/taglib-uri

taglib-location/WEB-INF/tld/c.tld/taglib-location

/taglib

taglib
taglib-urijstl-functions/taglib-uri

taglib-location/WEB-INF/tld/fn.tld/taglib-location

/taglib

taglib
taglib-urijstl-fmt/taglib-uri

taglib-location/WEB-INF/tld/fmt.tld/taglib-location

/taglib

taglib
taglib-urijstl-xml/taglib-uri

taglib-location/WEB-INF/tld/x.tld/taglib-location

/taglib


Kris Schneider wrote:


I would think you'd be using these:

xmlns:c=http://java.sun.com/jsp/jstl/core;
xmlns:x=http://java.sun.com/jsp/jstl/xml;

Isabelle Phan wrote:


Hi Kris

the x taglib is declared like other jstl libraries:

 xmlns:x=jstl-xml

it follows the taglib declarations in web.xml, but from the output 
you are right, it seems like the tag is ignored:


x:parse escapeXml=true xml=?xml version=1.0 
encoding=ISO-8859-1?

etc...


I have the vague feeling it's some stupid typo...

thanks for your help

Isabelle

Kris Schneider wrote:

Are you sure you're properly declaring the x taglib? It almost looks 
like x:parse is being treated as a plain XML element and 
${rssFeed} is simply evaluated and used for the value of the xml 
attribute. Can you view the source of the generated page?


Isabelle Phan wrote:

My problem: x:parse is outputting the RSS feed content even though 
the JSP does not contain x:out or c:out statement


The code:

c:import var=rssFeed 
url=http://www.expasy.org/spotlight/index.xml/

x:parse var=rss xml=${rssFeed}/

output:

http://www.expasy.org/spotlight/ one month, one protein en-us 
[EMAIL PROTECTED] 2007-03-26T10:13:59+01:00 hourly 1 
2000-01-01T12:00+00:00

etc...

until:

while obestatin reports adequacy. 
[EMAIL PROTECTED]://www.expasy.org/spotlight/ Article 
2006-01-19T13:22:59+01:00  var=rss/



It looks as if part of the x:parse tag is printed on the HTML page!

I am using JSTL 1.1

Anybody seen this before?








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