Re: JSTL XML ---org/apache/xpath/XPathException

2008-07-15 Thread Kris Schneider
Make sure that you have *both* Xerces and Xalan installed. You can put
the JARs in Tomcat's common/endorsed directory.

On Tue, Jul 15, 2008 at 12:04 AM, Rajasekhar [EMAIL PROTECTED] wrote:

 The out.jsp contains
 
 %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
 %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; %
 html
 head
 titleJSTL: XML Support -- Parse / Out/title
 /head
 body bgcolor=#FF
 h3x:parse / x:out/h3
 c:import var=docString url=games.xml/
 x:parse var=doc doc=${docString}/
 table border=1
 tr
 td valign=topprec:out value=${docString}//pre/td
 td valign=top
 table border=1
 tr
 thExpression/th
 thResult/th
 /tr
 %--
 tr
 td3 + 3/td
 tdprex:out select=3 + 3//pre/td
 /tr
 --%
 tr
 td$doc//sport/td
 tdprex:out select=$doc//sport//pre/td
 /tr
 tr
 td$doc/games/country/*/td
 tdprex:out select=$doc/games/country/*//pre/td
 /tr
 tr
 td$doc//*/td
 tdprex:out select=$doc//*//pre/td
 /tr
 tr
 td$doc/games/country/td
 tdprex:out select=$doc/games/country//pre/td
 /tr
 tr
 td$doc/games/country[last()]/td
 tdprex:out select=$doc/games/country[last()]//pre/td
 /tr
 tr
 td$doc//@id/td
 tdprex:out select=$doc//@id//pre/td
 /tr
 tr
 td$doc//[EMAIL PROTECTED]'Denmark']/td
 tdprex:out select=$doc//[EMAIL PROTECTED]'Denmark']//pre/td
 /tr
 /table
 /td
 /tr
 /table
 /body
 /html
 ==
 games.xml contains

 ===


 ?xml version=1.0 encoding=ISO-8859-1?
 games
   country id=Luxembourg
 athlete
   nameLux 1/name
   sportswimming/sport
   age23/age
   genderM/gender
 /athlete
 athlete
   nameLux 2/name
   sportwrestling/sport
   age31/age
   genderM/gender
 /athlete
   /country
   country id=Denmark
 athlete
   nameDen 1/name
   sportcycling/sport
   age18/age
   genderF/gender
 /athlete
 athlete
   nameDen 2/name
   sportsailing/sport
   age27/age
   genderM/gender
 /athlete
   /country
 /games
 

 I am using Tomcat 5.5 app svr.

 when I run the web app the following errors are shown


 HTTP Status 500 -


 type Exception report
 message
 description The server encountered an internal error () that prevented it 
 from fulfilling this request.
 exception javax.servlet.ServletException: org/apache/xpath/XPathException

 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)

 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 root cause java.lang.NoClassDefFoundError: org/apache/xpath/XPathException
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

 org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)

 org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

 org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(ExprSupport.java:63)

 org.apache.jsp.xml.Out_jsp._jspx_meth_x_out_0(org.apache.jsp.xml.Out_jsp:230)
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:97)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 note The full stack trace of the root cause is available in the Apache 
 Tomcat/5.5.9 logs.


 Thanks  Regards
 Rajasekhar






 --- On Mon, 14/7/08, Kris Schneider [EMAIL PROTECTED] wrote:

 From: Kris Schneider [EMAIL PROTECTED]
 Subject: Re: JSTL XML ---org/apache/xpath/XPathException
 To: Tag Libraries Users List taglibs-user@jakarta.apache.org
 Date: Monday, 14 July, 2008

Re: JSTL XML ---org/apache/xpath/XPathException

2008-07-15 Thread Rajasekhar
Hi 
 
Thank you very much Mr. Kris. Its working for me. I have placed XercesImpl.jar 
and xalan.jar into the tomcat/common/endorsed folder as you specified.
 
I have downloaded these jars from the site http://www.apache.org/dist/xerces/j/
 
Can you tell me whats the purpose of endorsed folder. cant these jars workout 
if they are placed in tomcat/common/lib directory ??


Thanks  Regards
Rajasekhar

 

 
 

--- On Tue, 15/7/08, Kris Schneider [EMAIL PROTECTED] wrote:

From: Kris Schneider [EMAIL PROTECTED]
Subject: Re: JSTL XML ---org/apache/xpath/XPathException
To: Tag Libraries Users List taglibs-user@jakarta.apache.org
Date: Tuesday, 15 July, 2008, 7:43 PM

Make sure that you have *both* Xerces and Xalan installed. You can put
the JARs in Tomcat's common/endorsed directory.

On Tue, Jul 15, 2008 at 12:04 AM, Rajasekhar [EMAIL PROTECTED] wrote:

 The out.jsp contains
 
 %@ taglib prefix=c
uri=http://java.sun.com/jsp/jstl/core; %
 %@ taglib prefix=x
uri=http://java.sun.com/jsp/jstl/xml; %
 html
 head
 titleJSTL: XML Support -- Parse / Out/title
 /head
 body bgcolor=#FF
 h3x:parse / x:out/h3
 c:import var=docString url=games.xml/
 x:parse var=doc doc=${docString}/
 table border=1
 tr
 td valign=topprec:out
value=${docString}//pre/td
 td valign=top
 table border=1
 tr
 thExpression/th
 thResult/th
 /tr
 %--
 tr
 td3 + 3/td
 tdprex:out select=3 +
3//pre/td
 /tr
 --%
 tr
 td$doc//sport/td
 tdprex:out
select=$doc//sport//pre/td
 /tr
 tr
 td$doc/games/country/*/td
 tdprex:out
select=$doc/games/country/*//pre/td
 /tr
 tr
 td$doc//*/td
 tdprex:out
select=$doc//*//pre/td
 /tr
 tr
 td$doc/games/country/td
 tdprex:out
select=$doc/games/country//pre/td
 /tr
 tr
 td$doc/games/country[last()]/td
 tdprex:out
select=$doc/games/country[last()]//pre/td
 /tr
 tr
 td$doc//@id/td
 tdprex:out
select=$doc//@id//pre/td
 /tr
 tr
 td$doc//[EMAIL PROTECTED]'Denmark']/td
 tdprex:out
select=$doc//[EMAIL PROTECTED]'Denmark']//pre/td
 /tr
 /table
 /td
 /tr
 /table
 /body
 /html
 ==
 games.xml contains

 ===


 ?xml version=1.0 encoding=ISO-8859-1?
 games
   country id=Luxembourg
 athlete
   nameLux 1/name
   sportswimming/sport
   age23/age
   genderM/gender
 /athlete
 athlete
   nameLux 2/name
   sportwrestling/sport
   age31/age
   genderM/gender
 /athlete
   /country
   country id=Denmark
 athlete
   nameDen 1/name
   sportcycling/sport
   age18/age
   genderF/gender
 /athlete
 athlete
   nameDen 2/name
   sportsailing/sport
   age27/age
   genderM/gender
 /athlete
   /country
 /games
 

 I am using Tomcat 5.5 app svr.

 when I run the web app the following errors are shown


 HTTP Status 500 -


 type Exception report
 message
 description The server encountered an internal error () that prevented it
from fulfilling this request.
 exception javax.servlet.ServletException: org/apache/xpath/XPathException
   
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
   
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
   
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
   
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 root cause java.lang.NoClassDefFoundError: org/apache/xpath/XPathException
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
   
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)
   
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)
   
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
   
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
   
org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(ExprSupport.java:63)
   
org.apache.jsp.xml.Out_jsp._jspx_meth_x_out_0(org.apache.jsp.xml.Out_jsp:230)
   
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:97)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802

Re: JSTL XML ---org/apache/xpath/XPathException

2008-07-15 Thread Kris Schneider
When Tomcat starts up, it sets the java.endorsed.dirs system property
to its common/endorsed dir. Check this out:

http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html#XML%20Parsers%20and%20J2SE%201.4

You could also try putting the JARs in your app's WEB-INF/lib dir
(this would be the preferred approach if you couldn't install them on
the server).

On Wed, Jul 16, 2008 at 12:00 AM, Rajasekhar [EMAIL PROTECTED] wrote:
 Hi

 Thank you very much Mr. Kris. Its working for me. I have placed 
 XercesImpl.jar and xalan.jar into the tomcat/common/endorsed folder as you 
 specified.

 I have downloaded these jars from the site 
 http://www.apache.org/dist/xerces/j/

 Can you tell me whats the purpose of endorsed folder. cant these jars workout 
 if they are placed in tomcat/common/lib directory ??


 Thanks  Regards
 Rajasekhar






 --- On Tue, 15/7/08, Kris Schneider [EMAIL PROTECTED] wrote:

 From: Kris Schneider [EMAIL PROTECTED]
 Subject: Re: JSTL XML ---org/apache/xpath/XPathException
 To: Tag Libraries Users List taglibs-user@jakarta.apache.org
 Date: Tuesday, 15 July, 2008, 7:43 PM

 Make sure that you have *both* Xerces and Xalan installed. You can put
 the JARs in Tomcat's common/endorsed directory.

 On Tue, Jul 15, 2008 at 12:04 AM, Rajasekhar [EMAIL PROTECTED] wrote:

 The out.jsp contains
 
 %@ taglib prefix=c
 uri=http://java.sun.com/jsp/jstl/core; %
 %@ taglib prefix=x
 uri=http://java.sun.com/jsp/jstl/xml; %
 html
 head
 titleJSTL: XML Support -- Parse / Out/title
 /head
 body bgcolor=#FF
 h3x:parse / x:out/h3
 c:import var=docString url=games.xml/
 x:parse var=doc doc=${docString}/
 table border=1
 tr
 td valign=topprec:out
 value=${docString}//pre/td
 td valign=top
 table border=1
 tr
 thExpression/th
 thResult/th
 /tr
 %--
 tr
 td3 + 3/td
 tdprex:out select=3 +
 3//pre/td
 /tr
 --%
 tr
 td$doc//sport/td
 tdprex:out
 select=$doc//sport//pre/td
 /tr
 tr
 td$doc/games/country/*/td
 tdprex:out
 select=$doc/games/country/*//pre/td
 /tr
 tr
 td$doc//*/td
 tdprex:out
 select=$doc//*//pre/td
 /tr
 tr
 td$doc/games/country/td
 tdprex:out
 select=$doc/games/country//pre/td
 /tr
 tr
 td$doc/games/country[last()]/td
 tdprex:out
 select=$doc/games/country[last()]//pre/td
 /tr
 tr
 td$doc//@id/td
 tdprex:out
 select=$doc//@id//pre/td
 /tr
 tr
 td$doc//[EMAIL PROTECTED]'Denmark']/td
 tdprex:out
 select=$doc//[EMAIL PROTECTED]'Denmark']//pre/td
 /tr
 /table
 /td
 /tr
 /table
 /body
 /html
 ==
 games.xml contains

 ===


 ?xml version=1.0 encoding=ISO-8859-1?
 games
   country id=Luxembourg
 athlete
   nameLux 1/name
   sportswimming/sport
   age23/age
   genderM/gender
 /athlete
 athlete
   nameLux 2/name
   sportwrestling/sport
   age31/age
   genderM/gender
 /athlete
   /country
   country id=Denmark
 athlete
   nameDen 1/name
   sportcycling/sport
   age18/age
   genderF/gender
 /athlete
 athlete
   nameDen 2/name
   sportsailing/sport
   age27/age
   genderM/gender
 /athlete
   /country
 /games
 

 I am using Tomcat 5.5 app svr.

 when I run the web app the following errors are shown


 HTTP Status 500 -


 type Exception report
 message
 description The server encountered an internal error () that prevented it
 from fulfilling this request.
 exception javax.servlet.ServletException: org/apache/xpath/XPathException

 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)

 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)

 org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 root cause java.lang.NoClassDefFoundError: org/apache/xpath/XPathException
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)

 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

 org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)

 org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)

 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319

Re: JSTL XML ---org/apache/xpath/XPathException

2008-07-14 Thread Kris Schneider
Can you provide some more details about how you're using the tag and
which app server and version you're using?

On Mon, Jul 14, 2008 at 10:49 AM, Rajasekhar [EMAIL PROTECTED] wrote:
 Hi

 I have used xml tags of jstl in my jsp. but it throwing errors like the 
 following..How can I get rid of it.
  javax.servlet.ServletException: org/apache/xpath/XPathException

 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)

 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)

 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 root cause


 Thanks  Regards
 Rajasekhar

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
directThought http://www.directThought.com/

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



Re: JSTL XML ---org/apache/xpath/XPathException

2008-07-14 Thread Rahul Akolkar
CC'ing OP since I moderated the message.

Rajasekhar - Please see response below. Also, please subscribe to this
mailing list before posting. Details:

  http://jakarta.apache.org/site/mail2.html#Taglibs

-Rahul


On 7/14/08, Kris Schneider [EMAIL PROTECTED] wrote:
 Can you provide some more details about how you're using the tag and
  which app server and version you're using?


  On Mon, Jul 14, 2008 at 10:49 AM, Rajasekhar [EMAIL PROTECTED] wrote:
   Hi
  
   I have used xml tags of jstl in my jsp. but it throwing errors like the 
 following..How can I get rid of it.
javax.servlet.ServletException: org/apache/xpath/XPathException
  
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
  
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
  
 org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
  
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
  
   root cause
  
  
   Thanks  Regards
   Rajasekhar


 --
  Kris Schneider mailto:[EMAIL PROTECTED]
  directThought http://www.directThought.com/


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



Re: JSTL XML ---org/apache/xpath/XPathException

2008-07-14 Thread Rajasekhar

The out.jsp contains

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; %
html
head
titleJSTL: XML Support -- Parse / Out/title
/head
body bgcolor=#FF
h3lt;x:parsegt; / lt;x:outgt;/h3
c:import var=docString url=games.xml/
x:parse var=doc doc=${docString}/
table border=1
tr
td valign=topprec:out value=${docString}//pre/td
td valign=top
table border=1
tr
thExpression/th
thResult/th
/tr
%--
tr
td3 + 3/td
tdprex:out select=3 + 3//pre/td
/tr
--%
tr
td$doc//sport/td
tdprex:out select=$doc//sport//pre/td
/tr
tr
td$doc/games/country/*/td
tdprex:out select=$doc/games/country/*//pre/td
/tr
tr
td$doc//*/td
tdprex:out select=$doc//*//pre/td
/tr
tr
td$doc/games/country/td
tdprex:out select=$doc/games/country//pre/td
/tr
tr
td$doc/games/country[last()]/td
tdprex:out select=$doc/games/country[last()]//pre/td
/tr
tr
td$doc//@id/td
tdprex:out select=$doc//@id//pre/td
/tr
tr
td$doc//[EMAIL PROTECTED]'Denmark']/td
tdprex:out select=$doc//[EMAIL PROTECTED]'Denmark']//pre/td
/tr
/table
/td
/tr
/table
/body
/html
==
games.xml contains
 
===
 
 
?xml version=1.0 encoding=ISO-8859-1?
games
  country id=Luxembourg
    athlete
  nameLux 1/name
  sportswimming/sport
  age23/age
  genderM/gender
    /athlete
    athlete
  nameLux 2/name
  sportwrestling/sport
  age31/age
  genderM/gender
    /athlete
  /country
  country id=Denmark
    athlete
  nameDen 1/name
  sportcycling/sport
  age18/age
  genderF/gender
    /athlete
    athlete
  nameDen 2/name
  sportsailing/sport
  age27/age
  genderM/gender
    /athlete
  /country
/games

 
I am using Tomcat 5.5 app svr. 
 
when I run the web app the following errors are shown
 
 
HTTP Status 500 - 


type Exception report
message 
description The server encountered an internal error () that prevented it from 
fulfilling this request.
exception javax.servlet.ServletException: org/apache/xpath/XPathException

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:155)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause java.lang.NoClassDefFoundError: org/apache/xpath/XPathException
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(ExprSupport.java:63)

org.apache.jsp.xml.Out_jsp._jspx_meth_x_out_0(org.apache.jsp.xml.Out_jsp:230)
org.apache.jsp.xml.Out_jsp._jspService(org.apache.jsp.xml.Out_jsp:97)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache 
Tomcat/5.5.9 logs.

 
Thanks  Regards
Rajasekhar
 
 

 
 

--- On Mon, 14/7/08, Kris Schneider [EMAIL PROTECTED] wrote:

From: Kris Schneider [EMAIL PROTECTED]
Subject: Re: JSTL XML ---org/apache/xpath/XPathException
To: Tag Libraries Users List taglibs-user@jakarta.apache.org
Date: Monday, 14 July, 2008, 10:49 PM

Can you provide some more details about how you're using the tag and
which app server and version you're using?

On Mon, Jul 14, 2008 at 10:49 AM, Rajasekhar [EMAIL PROTECTED] wrote:
 Hi

 I have used xml tags of jstl in my jsp. but it throwing errors like the
following..How can

Re: jstl 1.1.2, xml - how to concat two variables?

2007-05-24 Thread Wadim Kruse

Problem solved another way around: JSP which returns an XSL-Stylesheet.


Wadim Kruse wrote:
 
 Hi,
 
 I wasn't able to figure out, how to concat two variables (xml-document and
 xpath-expression).
 The documentation says that XPathExpression in x:set var= select=
 should be a string literal... What is the way to use a variable
 XPathExpression to select an xml-fragment? I don't want to hard-code it in
 the JSP. In case it's not possible to concat two variables, what would be
 the alternative to do that? SAX-filter?
 
 Best regards,
 Wadim
 
 
 --
 %@ pagelanguage=javacontentType=text/html; charset=UTF-8 
 pageEncoding=UTF-8% 
 
 %@ taglibprefix=curi=http://java.sun.com/jsp/jstl/core% 
 %@ taglibprefix=xuri=http://java.sun.com/jsp/jstl/xml% 
 
 c:setvar=doc 
 c:importurl=data/collection.xml/c:import 
 /c:set 
 
 c:setvar=xpath 
...some xpath-expression...
 /c:set 
 
 c:setvar=xsl 
 c:importurl=styles/tree2.xsl/c:import 
 /c:set 
 
 x:parsevar=xmlxml=${doc}/ 
 
 x:setvar=testselect=$xml$xpath/   !-- DOESN'T WORK!!! , hard-coded
 xpath works... --
 
 x:outselect={$test}/
 

-- 
View this message in context: 
http://www.nabble.com/jstl-1.1.2%2C-xml---how-to-concat-two-variables--tf3806497.html#a10780246
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: jstl x:parse outputs data

2007-04-20 Thread Isabelle Phan

with both Xalan 2.7.0 and 2.5.0 I now get the error

   WARN: Unhandled exception
org.apache.jasper.JasperException: Exception in JSP: /index.jspx:102

100:c:import var=rssFeed 
url=http://www.expasy.org/spotlight/index.xml/
101:x:parse var=rss xml=${rssFeed}/
102: 	x:out select=$rss//*[name()='channel']/*[name()='title'][1] 
escapeXml=false/


  ERROR: Nested in javax.servlet.ServletException: 
javax.servlet.jsp.JspException: Cannot access session scope in page that does 
not participate in any session:
java.lang.IllegalStateException: Cannot access session scope in page that does 
not participate in any session



Kris Schneider wrote:
 You'll need both Xerces and Xalan (Xerces should be included in the
 Xalan download). I believe the release notes for Standard 1.1 state that
 Xalan 2.5 is required. Use this link:

 http://www.apache.org/dyn/closer.cgi/xml/xalan-j

 to download the latest version. If you run into any issues, you can try
 falling back to 2.5.0:

 http://archive.apache.org/dist/xml/xalan-j/binaries/xalan-j_2_5_0-bin.zip

  From the ZIP file, you'll want the following JARs:

 xalan.jar
 xercesImpl.jar
 xml-apis.jar
--
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-20 Thread Isabelle Phan

Thanks Kris,

x:parse tag is now silent :-)

however, I can't get x:out to output anything, it throws

  ERROR: Nested in javax.servlet.ServletException: 
javax.servlet.jsp.JspException: org/apache/xpath/XPathException:

java.lang.NoClassDefFoundError: org/apache/xpath/XPathException

I read somewhere that this could be due to a missing xerces library, my 
application has xerces.jar, I am completely lost :-(



Kris Schneider wrote:
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?











--
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-20 Thread zuber Ali

Hi Isabelle,

Can you send code where u r using for output?

Regards,
zuber

On 4/20/07, Isabelle Phan [EMAIL PROTECTED] wrote:

Thanks Kris,

x:parse tag is now silent :-)

however, I can't get x:out to output anything, it throws

  ERROR: Nested in javax.servlet.ServletException:
javax.servlet.jsp.JspException: org/apache/xpath/XPathException:
java.lang.NoClassDefFoundError: org/apache/xpath/XPathException

I read somewhere that this could be due to a missing xerces library, my
application has xerces.jar, I am completely lost :-(


Kris Schneider wrote:
 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?







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




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



Re: jstl x:parse outputs data

2007-04-20 Thread Bob Arnott

Isabelle Phan wrote:

Thanks Kris,

x:parse tag is now silent :-)

however, I can't get x:out to output anything, it throws

  ERROR: Nested in javax.servlet.ServletException: 
javax.servlet.jsp.JspException: org/apache/xpath/XPathException:

java.lang.NoClassDefFoundError: org/apache/xpath/XPathException

I read somewhere that this could be due to a missing xerces library, my 
application has xerces.jar, I am completely lost :-(


To solve that one I just downloaded hte latest version of Xerces from the
Apache website and installed it into the relevant folder under my Tomcat
install.

Cheers,

--
Bob Arnott


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



Re: jstl x:parse outputs data

2007-04-20 Thread Kris Schneider

For now, try removing session=false from your page directive.

Isabelle Phan wrote:

with both Xalan 2.7.0 and 2.5.0 I now get the error

   WARN: Unhandled exception
org.apache.jasper.JasperException: Exception in JSP: /index.jspx:102

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

101: x:parse var=rss xml=${rssFeed}/
102: x:out select=$rss//*[name()='channel']/*[name()='title'][1] 
escapeXml=false/


  ERROR: Nested in javax.servlet.ServletException: 
javax.servlet.jsp.JspException: Cannot access session scope in page that 
does not participate in any session:
java.lang.IllegalStateException: Cannot access session scope in page 
that does not participate in any session



Kris Schneider wrote:
  You'll need both Xerces and Xalan (Xerces should be included in the
  Xalan download). I believe the release notes for Standard 1.1 state that
  Xalan 2.5 is required. Use this link:
 
  http://www.apache.org/dyn/closer.cgi/xml/xalan-j
 
  to download the latest version. If you run into any issues, you can try
  falling back to 2.5.0:
 
  
http://archive.apache.org/dist/xml/xalan-j/binaries/xalan-j_2_5_0-bin.zip

 
   From the ZIP file, you'll want the following JARs:
 
  xalan.jar
  xercesImpl.jar
  xml-apis.jar


--
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-20 Thread Kris Schneider

http://issues.apache.org/bugzilla/show_bug.cgi?id=35216

This has been fixed but not yet released.

Kris Schneider wrote:

For now, try removing session=false from your page directive.

Isabelle Phan wrote:


with both Xalan 2.7.0 and 2.5.0 I now get the error

   WARN: Unhandled exception
org.apache.jasper.JasperException: Exception in JSP: /index.jspx:102

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

101: x:parse var=rss xml=${rssFeed}/
102: x:out 
select=$rss//*[name()='channel']/*[name()='title'][1] 
escapeXml=false/


  ERROR: Nested in javax.servlet.ServletException: 
javax.servlet.jsp.JspException: Cannot access session scope in page 
that does not participate in any session:
java.lang.IllegalStateException: Cannot access session scope in page 
that does not participate in any session



Kris Schneider wrote:
  You'll need both Xerces and Xalan (Xerces should be included in the
  Xalan download). I believe the release notes for Standard 1.1 state 
that

  Xalan 2.5 is required. Use this link:
 
  http://www.apache.org/dyn/closer.cgi/xml/xalan-j
 
  to download the latest version. If you run into any issues, you can 
try

  falling back to 2.5.0:
 
  
http://archive.apache.org/dist/xml/xalan-j/binaries/xalan-j_2_5_0-bin.zip

 
   From the ZIP file, you'll want the following JARs:
 
  xalan.jar
  xercesImpl.jar
  xml-apis.jar


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



Re: JSTL 1.1.2 c:url problem?

2006-11-14 Thread Hassan Schroeder

On 11/14/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:


May be if there are languages other than HTML that JSTL works with then, having 
an unescaped ampersand
makes sense if those other languages require an unescaped ampersand. But I 
don't know if there are other languages
at this point.


?! Uh, how about plain text? There's no reason to assume that I'm
using JSTL to generate an HTML/XML-based output; it could be a
text/plain response, it could be creating a plain-text email body --
there are lots of alternative possibilities.

--
Hassan Schroeder  [EMAIL PROTECTED]

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



Re: JSTL 1.1.2 c:url problem?

2006-11-14 Thread Rashmi Rubdi
- Original Message 
From: Trenton D. Adams [EMAIL PROTECTED]

 Just out of curiosity, is JSTL supposed to do encoding by default?

I don't know that. 

The W3C specs for a link in both HTML and XHTML mention that the ampersand 
should be escaped as in
a href=http://www.site.com?parameter1=abcamp;parameter2=xyz;link text/a

There's one more tag that uses URLs , it's c:redirect - this requires an 
*unescaped* ampersand version of c:url 
That is c:redirect only works when the URL is 
http://www.site.com?parameter1=abcparameter2=xyz  and not
http://www.site.com?parameter1=abcamp;parameter2=xyz

May be if there are languages other than HTML that JSTL works with then, having 
an unescaped ampersand
makes sense if those other languages require an unescaped ampersand. But I 
don't know if there are other languages 
at this point.

Rashmi



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



Re: JSTL 1.1.2 c:url problem?

2006-11-14 Thread Rashmi Rubdi
Yup, that totally makes sense to me.

-Rashmi

- Original Message 
From: Hassan Schroeder [EMAIL PROTECTED]
To: Tag Libraries Users List taglibs-user@jakarta.apache.org
Sent: Tuesday, November 14, 2006 8:42:14 AM
Subject: Re: JSTL 1.1.2 c:url problem?


On 11/14/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:

 May be if there are languages other than HTML that JSTL works with then, 
 having an unescaped ampersand
 makes sense if those other languages require an unescaped ampersand. But I 
 don't know if there are other languages
 at this point.

?! Uh, how about plain text? There's no reason to assume that I'm
using JSTL to generate an HTML/XML-based output; it could be a
text/plain response, it could be creating a plain-text email body --
there are lots of alternative possibilities.

-- 
Hassan Schroeder  [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 1.1.2 c:url problem?

2006-11-14 Thread Trenton D. Adams

Yeah, I suppose that's a good reason not to have an escaped output.

Thanks for the info.

Hassan Schroeder wrote:

On 11/14/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:

May be if there are languages other than HTML that JSTL works with 
then, having an unescaped ampersand
makes sense if those other languages require an unescaped ampersand. 
But I don't know if there are other languages

at this point.


?! Uh, how about plain text? There's no reason to assume that I'm
using JSTL to generate an HTML/XML-based output; it could be a
text/plain response, it could be creating a plain-text email body --
there are lots of alternative possibilities.



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



Re: JSTL 1.1.2 c:url problem?

2006-11-13 Thread Rashmi Rubdi
c:url by default doesn't encode the ampersand. 

However, there are options available in the current implementation of JSTL1.1 
which allows you to obtain an 
ampersand escaped URL.

1) In reference to the code you've mentioned, one option is:
c:out var=link escapeXml=true /

So you'd essentially have a link like this a href='c:out var=link 
escapeXml=true /' Link Text /a

2) Here's a shorter option:
${fn:escapeXml(link)}

a href='${fn:escapeXml(link)}' Link Text /a

This second option requires the functions Tag Lib. 
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions%



-Rashmi

- Original Message 
From: Mikolaj Rydzewski [EMAIL PROTECTED]
To: Tag Libraries Users List taglibs-user@jakarta.apache.org
Sent: Monday, November 13, 2006 2:59:21 AM
Subject: Re: JSTL 1.1.2 c:url problem?


Trenton D. Adams wrote:
 Is c:url supposed to encode your ampersands?
Unfortunately not. I have raised such case a few weeks ago:

http://mail-archives.apache.org/mod_mbox/jakarta-taglibs-user/200609.mbox/[EMAIL
 PROTECTED]

It's not a problem to build your own patched jstl version.

-- 
Mikolaj Rydzewski [EMAIL PROTECTED]



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



Re: JSTL 1.1.2 c:url problem?

2006-11-13 Thread Trenton D. Adams

Thanks for the tip.

Just out of curiosity, is JSTL supposed to do encoding by default?

Rashmi Rubdi wrote:
c:url by default doesn't encode the ampersand. 

However, there are options available in the current implementation of JSTL1.1 which allows you to obtain an 
ampersand escaped URL.


1) In reference to the code you've mentioned, one option is:
c:out var=link escapeXml=true /

So you'd essentially have a link like this a href='c:out var=link escapeXml=true 
/' Link Text /a

2) Here's a shorter option:
${fn:escapeXml(link)}

a href='${fn:escapeXml(link)}' Link Text /a

This second option requires the functions Tag Lib. 
%@ taglib prefix=fn uri=http://java.sun.com/jsp/jstl/functions%




-Rashmi

- Original Message 
From: Mikolaj Rydzewski [EMAIL PROTECTED]
To: Tag Libraries Users List taglibs-user@jakarta.apache.org
Sent: Monday, November 13, 2006 2:59:21 AM
Subject: Re: JSTL 1.1.2 c:url problem?


Trenton D. Adams wrote:

Is c:url supposed to encode your ampersands?

Unfortunately not. I have raised such case a few weeks ago:

http://mail-archives.apache.org/mod_mbox/jakarta-taglibs-user/200609.mbox/[EMAIL
 PROTECTED]

It's not a problem to build your own patched jstl version.



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



Re: JSTL 1.1.2 c:url problem?

2006-11-12 Thread Mikolaj Rydzewski

Trenton D. Adams wrote:

Is c:url supposed to encode your ampersands?

Unfortunately not. I have raised such case a few weeks ago:

http://mail-archives.apache.org/mod_mbox/jakarta-taglibs-user/200609.mbox/[EMAIL
 PROTECTED]

It's not a problem to build your own patched jstl version.

--
Mikolaj Rydzewski [EMAIL PROTECTED]



smime.p7s
Description: S/MIME Cryptographic Signature


RE: JSTL problem

2006-11-07 Thread Steve Duran


  I suggest you remove the  if it is actually in your JSP.

  Also, change this: core:out value=${languaje.descripcio}:/ 

  to this: core:out value=${languaje.descripcio}/:

  This may also also be a problem: webLangId${languaje.codi}

  Try ${ 'webLangId' + languaje.codi }

  If you're using the 2.4 spec. you can try this:

  input type=text name=webLangId${languaje.codi} size=64/

  Just suggestions.

  Steve 


-Original Message-
From: jeusdi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 07, 2006 11:17 AM
To: taglibs-user@jakarta.apache.org
Subject: JSTL problem



Mmm, In my servlet I implement this portion code --

java.util.Collection idiomes =
com.gmsoft.model.dao.DAOFactory.createIdiomaDAO().findAll();
request.setAttribute(languajes, idiomes);

dispatcher =
getServletContext().getRequestDispatcher(/content/admin/manufacturers/n
ewManufacturer.jsp);

And in newManufacturer.jsp --



...
core:forEach items='${requestScope.languajes}' var=languaje   

  td
core:out value=${languaje.descripcio}:/   
input type=text name=core:out
value=webLangId${languaje.codi}/core:out size=64/
/td
/core:forEach
...


the result is --

/content/admin/manufacturers/newManufacturer.jsp(44,9) According to TLD
or attribute directive in tag file, attribute items does not accept any
expressions
org.apache.jasper.JasperException:
/content/admin/manufacturers/newManufacturer.jsp(44,9) According to TLD
or attribute directive in tag file, attribute items does not accept any
expressions
at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:510)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:375)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:463)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:398)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:301)
at
com.gmsoft.Controller.ServletController.doPost(ServletController.java:12
2)
at
com.gmsoft.Controller.ServletController.doGet(ServletController.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
com.gmsoft.hibernate.HibernateFilter.doFilter(HibernateFilter.java:35)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
684)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.
java:876)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
at java.lang.Thread.run(Thread.java:595)

Can you say me What's happen?
Thanks in advance.
-- 
View this message in context:
http://www.nabble.com/JSTL-problem-tf2590520.html#a7223930
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: JSTL problem

2006-11-07 Thread Kris Schneider

Steve Duran wrote:


  I suggest you remove the  if it is actually in your JSP.


Might be the result of a CVS/SVN merge. Make sure to clean up any 
outstanding conflicts.


For the message:
According to TLD or attribute directive in tag file, attribute items does 
not accept any expressions


That seems to point to the forEach tag. Make sure the version of JSTL 
matches the version of JSP and type of web.xml (Servlet 2.3 DTD vs. Servlet 
2.4 Schema) that you're using for your app.


JSTL 1.0 - JSP 1.2 - Servlet 2.3
JSTL 1.1 - JSP 2.0 - Servlet 2.4

  Also, change this: core:out value=${languaje.descripcio}:/ 


  to this: core:out value=${languaje.descripcio}/:

  This may also also be a problem: webLangId${languaje.codi}

  Try ${ 'webLangId' + languaje.codi }

  If you're using the 2.4 spec. you can try this:

  input type=text name=webLangId${languaje.codi} size=64/

  Just suggestions.

  Steve 



-Original Message-
From: jeusdi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 07, 2006 11:17 AM

To: taglibs-user@jakarta.apache.org
Subject: JSTL problem



Mmm, In my servlet I implement this portion code --

java.util.Collection idiomes =
com.gmsoft.model.dao.DAOFactory.createIdiomaDAO().findAll();
request.setAttribute(languajes, idiomes);

dispatcher =
getServletContext().getRequestDispatcher(/content/admin/manufacturers/n
ewManufacturer.jsp);

And in newManufacturer.jsp --



...
core:forEach items='${requestScope.languajes}' var=languaje   


  td
core:out value=${languaje.descripcio}:/   
	input type=text name=core:out

value=webLangId${languaje.codi}/core:out size=64/
/td
/core:forEach
...


the result is --

/content/admin/manufacturers/newManufacturer.jsp(44,9) According to TLD
or attribute directive in tag file, attribute items does not accept any
expressions
org.apache.jasper.JasperException:
/content/admin/manufacturers/newManufacturer.jsp(44,9) According to TLD
or attribute directive in tag file, attribute items does not accept any
expressions
at
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:510)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:375)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(Applicatio
nDispatcher.java:463)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:398)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:301)
at
com.gmsoft.Controller.ServletController.doPost(ServletController.java:12
2)
at
com.gmsoft.Controller.ServletController.doGet(ServletController.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
com.gmsoft.hibernate.HibernateFilter.doFilter(HibernateFilter.java:35)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
684)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.
java:876)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)

Re: JSTL problem

2006-11-07 Thread Rahul Akolkar

On 11/7/06, Kris Schneider [EMAIL PROTECTED] wrote:
snip/


For the message:
According to TLD or attribute directive in tag file, attribute items does
not accept any expressions

That seems to point to the forEach tag. Make sure the version of JSTL
matches the version of JSP and type of web.xml (Servlet 2.3 DTD vs. Servlet
2.4 Schema) that you're using for your app.

JSTL 1.0 - JSP 1.2 - Servlet 2.3
JSTL 1.1 - JSP 2.0 - Servlet 2.4


snap/

Also, some related FAQ is here:

http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions

-Rahul

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



Re: JSTL c:out tag-- how to escape apostrophe

2006-07-12 Thread William Ross

At 02:04 PM 7/12/2006, you wrote:

I am using JSTL c:out tag to print server messages into HTML pages. However
some of the messages contains apostrophe. Due to special chars the JSTL c:out
tag was breaking. The following message from server breaks c:out tag.
Invalid datastore path 'No_Floppy.flp'. Is there any was I can fix this.
Thanks, Chandra


filter the input and convert special characters to entities.


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



RE: JSTL c:out tag-- how to escape apostrophe

2006-07-12 Thread Chandra Avutu
How do I filter the input? The messages are coming from server via SOAP
adapters. Can you explain more in detail. Thanks for the tip.


-Original Message-
From: William Ross [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 12, 2006 5:20 PM
To: Tag Libraries Users List
Subject: Re: JSTL c:out tag-- how to escape apostrophe 

At 02:04 PM 7/12/2006, you wrote:
I am using JSTL c:out tag to print server messages into HTML pages. 
However some of the messages contains apostrophe. Due to special chars 
the JSTL c:out tag was breaking. The following message from server breaks
c:out tag.
Invalid datastore path 'No_Floppy.flp'. Is there any was I can fix this.
Thanks, Chandra

filter the input and convert special characters to entities.


-
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 c:out tag-- how to escape apostrophe

2006-07-12 Thread William Ross

At 06:19 PM 7/12/2006, you wrote:

How do I filter the input? The messages are coming from server via SOAP
adapters. Can you explain more in detail. Thanks for the tip.


The adapter is consuming messages from a server, but
you don't specify what the server is; never the less,
unless you're working with a black box the soap envelopes
are exposed at some point, yeah? Grab 'em, scan 'em, and
convert any characters you want to entities. What do you
not understand?


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



Re: JSTL c:out tag-- how to escape apostrophe

2006-07-12 Thread Kris Schneider
Quoting Chandra Avutu [EMAIL PROTECTED]:

 I am using JSTL c:out tag to print server messages into HTML pages. However
 some of the messages contains apostrophe. Due to special chars the JSTL
 c:out
 tag was breaking. The following message from server breaks c:out tag.
 Invalid datastore path 'No_Floppy.flp'. Is there any was I can fix this.
 Thanks, Chandra

I'm not sure why this isn't working for you, but here's an example to
demonstrate that escaping should be taking place. Try this page:

%@ page contentType=text/plain %
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
c:set var=chars'/c:set
Escaped chars: c:out value=${chars}/
Unescaped chars: c:out value=${chars} escapeXml=false/

The output should look like:

Escaped chars: amp; lt; gt; #034; #039;
Unescaped chars: '

-- 
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 startup question

2006-05-02 Thread Sébastien Brodeur
Bob Arnott boba at aungate.com writes:

 
 Also, don't put any tag library defines in the web.xml... Other than
 that, it's always worked for me...
 

Why don't you include the library defines in the web.xml?  All the documentation
I read tell me to do it.

But when I do, it doesn't work.  (The application wouldn't start).


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



Re: JSTL startup question

2006-04-02 Thread digby
Check your web.xml file to see whether the DTD is 2.3 or 2.4. It all 
changed recently. http://java.sun.com/jsp/jstl/core is what you should 
be using if you're at 2.4. If the DTD is 2.3, just update it to:


web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

...
/web-app


Kevin Passey wrote:

Well I am new to this so bear with me.

I am using Tomcat5.0.28 and jdk1.5.xx so can I assume that it would be 2.4.

What's confusing me is that I have written a test page without the /jsp/ and
it works - with the /jsp/ it literally prints the variables to the screen.

The tld in the tld directory in the distribution has /jsp/ in the url.

Thanks

Kevin

-Original Message-
From: Bob Arnott [mailto:[EMAIL PROTECTED]
Sent: 29 March 2006 10:56
To: Tag Libraries Users List
Subject: Re: JSTL startup question


Kevin Passey wrote:

[snipped...]



Would anybody be so good as to comment.



Open standard.jar that came with JSTL1.1.2 zip, browse to the
META-INF folder and open c.tld. In there near the top you'll
see a tag urihttp://java.sun.com/jsp/jstl/core/uri that's
the URI to use in your JSP pages -

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

What Servlet spec are you working against...? 2.3 or 2.4...?

Cheers,




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



RE: JSTL startup question

2006-03-29 Thread Kevin Passey
Well I am new to this so bear with me.

I am using Tomcat5.0.28 and jdk1.5.xx so can I assume that it would be 2.4.

What's confusing me is that I have written a test page without the /jsp/ and
it works - with the /jsp/ it literally prints the variables to the screen.

The tld in the tld directory in the distribution has /jsp/ in the url.

Thanks

Kevin

-Original Message-
From: Bob Arnott [mailto:[EMAIL PROTECTED]
Sent: 29 March 2006 10:56
To: Tag Libraries Users List
Subject: Re: JSTL startup question


Kevin Passey wrote:

[snipped...]

 Would anybody be so good as to comment.

Open standard.jar that came with JSTL1.1.2 zip, browse to the
META-INF folder and open c.tld. In there near the top you'll
see a tag urihttp://java.sun.com/jsp/jstl/core/uri that's
the URI to use in your JSP pages -

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

What Servlet spec are you working against...? 2.3 or 2.4...?

Cheers,

-- 
Bob Arnott


-
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 startup question

2006-03-29 Thread Bob Arnott

Kevin Passey wrote:

Well I am new to this so bear with me.

I am using Tomcat5.0.28 and jdk1.5.xx so can I assume that it would be 2.4.

What's confusing me is that I have written a test page without the /jsp/ and
it works - with the /jsp/ it literally prints the variables to the screen.

The tld in the tld directory in the distribution has /jsp/ in the url.


Make sure you web.xml has the following for the web-app tag:

web-app version=2.4
xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

Also, don't put any tag library defines in the web.xml... Other than
that, it's always worked for me...

Cheers,

--
Bob Arnott


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



RE: JSTL startup question

2006-03-29 Thread Kevin Passey
Ha - I'm also using Websphere application developer and it does not
recognise the version attribute.

Maybe that's my problem - it is v5.1.0

Do you use and IDE - and would you recomend one?

Regards

Kevin

-Original Message-
From: Bob Arnott [mailto:[EMAIL PROTECTED]
Sent: 29 March 2006 14:16
To: Tag Libraries Users List
Subject: Re: JSTL startup question


Kevin Passey wrote:
 Well I am new to this so bear with me.
 
 I am using Tomcat5.0.28 and jdk1.5.xx so can I assume that it would be
2.4.
 
 What's confusing me is that I have written a test page without the /jsp/
and
 it works - with the /jsp/ it literally prints the variables to the screen.
 
 The tld in the tld directory in the distribution has /jsp/ in the url.

Make sure you web.xml has the following for the web-app tag:

web-app version=2.4
 xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

Also, don't put any tag library defines in the web.xml... Other than
that, it's always worked for me...

Cheers,

-- 
Bob Arnott


-
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 startup question

2006-03-29 Thread Bob Arnott

Kevin Passey wrote:

Ha - I'm also using Websphere application developer and it does not
recognise the version attribute.

Maybe that's my problem - it is v5.1.0

Do you use and IDE - and would you recomend one?


The ultimate test of any webapp is the ability for it to be edited in a
text editor, compiled on the command line and then have no issues with
being deployed into any container.

While I use Netbeans to do my development work in, I don't use the embedded
Tomcat, I've always used a stand alone install. My Ant build scripts all
work out with the IDE as well.

Try a different IDE...

Cheers,

--
Bob Arnott


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



RE: JSTL startup question

2006-03-29 Thread Kevin Passey
OK Bob - thanks for the advice.

I'll probably switch to Netbeans myself.

-Original Message-
From: Bob Arnott [mailto:[EMAIL PROTECTED]
Sent: 29 March 2006 15:30
To: Tag Libraries Users List
Subject: Re: JSTL startup question


Kevin Passey wrote:
 Ha - I'm also using Websphere application developer and it does not
 recognise the version attribute.
 
 Maybe that's my problem - it is v5.1.0
 
 Do you use and IDE - and would you recomend one?

The ultimate test of any webapp is the ability for it to be edited in a
text editor, compiled on the command line and then have no issues with
being deployed into any container.

While I use Netbeans to do my development work in, I don't use the embedded
Tomcat, I've always used a stand alone install. My Ant build scripts all
work out with the IDE as well.

Try a different IDE...

Cheers,

-- 
Bob Arnott


-
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-EL question (instanceOf)

2006-03-16 Thread Martin Cooper
On 3/16/06, Luca Passani [EMAIL PROTECTED] wrote:

 Martin Cooper wrote:

 
 Not with just EL, but see:
 
 
 http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#instanceOf
 
 
 
 that seems powerful. Thanks. Is there an example of usage somewhere?
 how do I combine this with c:if test?


Dunno. Sorry. I haven't used it, I just knew it was there. ;-)

--
Martin Cooper


Luca

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




Re: JSTL resource bundle issue

2005-12-23 Thread hong yuan
I have the following case: 
(1) I have an framework application which has
framework resource bundle which sits in a jar file and
also some framework jsps like header / footer etc.. 
(2) I have an application which uses the framework jar
file and copies the framework jsp files over and has
its own resource bundle.

Can I do the following:
For (1), I won't register the resource bundle in
web.xml but use fmt:bundle tags.
For (2), I will register the application resource
bundle in its web.xml file so that I don't need to use
fmt:bundle on each fmt:message call.

Thanks a lot.

--- Rahul Akolkar [EMAIL PROTECTED] wrote:

 On 12/23/05, hong yuan [EMAIL PROTECTED] wrote:
  Hi, I am using JSTL resource bundle. It is defined
 in
  web.xml:
 
  context-param
   param-name
 javax.servlet.jsp.jstl.fmt.localizationContext
   /param-name
   param-value
 package.ApplicationResources
   /param-value
  /context-param
 
  My question is that if I have two or more resource
  bundle properties such as
  ApplicationResourcesBase.properties,
  ApplicationResourcesApp.properties, how do I
 regiester
  them in web.xml, and how do I call it in my JSP
 using
  fmt tag?
 
 snip/
 
 I wouldn't recommend defining resource bundles in
 the web.xml. We have
 perfectly usable fmt:bundle and fmt:setBundle tags
 in the JSTL format
 taglib. Please use those instead, and you won't have
 this issue -- you
 can have as many bundles as you want, and you can
 pick one at any
 point in time.
 
 -Rahul
 
 
  Thanks,
  Hong
 
 
 

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




__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


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



Re: JSTL resource bundle issue

2005-12-23 Thread Rahul Akolkar
On 12/23/05, hong yuan [EMAIL PROTECTED] wrote:
 I have the following case:
 (1) I have an framework application which has
 framework resource bundle which sits in a jar file and
 also some framework jsps like header / footer etc..
 (2) I have an application which uses the framework jar
 file and copies the framework jsp files over and has
 its own resource bundle.

 Can I do the following:
 For (1), I won't register the resource bundle in
 web.xml but use fmt:bundle tags.
 For (2), I will register the application resource
 bundle in its web.xml file so that I don't need to use
 fmt:bundle on each fmt:message call.
snip/

For both, look at fmt:setBundle. Put the bundle in the scope of
choice, and you won't need a fmt:bundle wrapper for each fmt:message
tag (use the tag's bundle attribute).

-Rahul



 Thanks a lot.

snap/

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



Re: JSTL and test for file existence

2005-11-25 Thread Martin Cooper
On 11/25/05, Luca Passani [EMAIL PROTECTED] wrote:

 Hi guys,

 Is there a way to test for file existence with JSTL?


I don't believe so, and I'd be rather surprised if there was. Remember that
there is no guarantee that there even *is* a file system in a webapp
environment, so providing access to such a thing in a standard way doesn't
really make sense.

Of course, you can always create your own function to do this.

--
Martin Cooper


I would like to do something like:

 c:if test=exists( $pic)
img src=pics/c:out value=$pic/ /
 /c:if

 Thanks

 Luca


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




Re: JSTL and test for file existence

2005-11-25 Thread Luca Passani

Martin Cooper wrote:



I don't believe so, and I'd be rather surprised if there was. Remember that
there is no guarantee that there even *is* a file system in a webapp
environment, so providing access to such a thing in a standard way doesn't
really make sense.

Of course, you can always create your own function to do this.
 

I understand and I don't want to argue. Also, I can easily work this 
around with a scriptlet.
Let me throw in a couple of points just for sake of discussions, though. 
If you think I am totally off the mark, just let me know...


My understanding is that there are a few tag-libraries that break MVC 
out there. The SQL tags are a great example of this (embedding SQL in 
JSP? are we back to MS ActiveServerPages?!?! :)
Now, wouldn't creating tags that allow a certain amount of basic file 
manipulations fall in the same cathegory as the SQL tags? I mean, after 
all, there even is no guarantee that there's an SQL  DB the webapp can 
talk to.
Those tag-libs would still be good to have in the toolset for quick and 
dirty tasks (prototyping for examples), even though they are far from 
ideal in many cases...


Just my 2 cents of euro.

Luca


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



Re: jstl doesn't work

2005-10-22 Thread Christian Taylor

Hi Michael,

Did you include the necessary taglib directives at the beginning of your 
JSP? For example, to use the core taglib as you are doing:


[EMAIL PROTECTED] prefix=c uri=http://java.sun.com/jsp/jstl/core%

This needs to be included at the top of any JSP using the taglib. If you 
already know this, I apologize. It was the only thing I could think of 
that you didn't mention. Hope this helps.


-Christian

michael Muttai wrote:

Why do I get ${customers.firstName} when I use the following codes in 
a jsp file?


c:forEach var=customers items=${requestScope.customers}
tr
tdc:out value=${customers.firstName}//td
...
/tr
/c:forEach

I use JBoss 4.0.3. I include jstl.jar and standard.jar under 
web-inf/lib and some *.tld files under web-inf.


Any help is appreciated.




Michael

_
On the road to retirement? Check out MSN Life Events for advice on how 
to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



-
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 doesn't work

2005-10-22 Thread michael Muttai
Yes, I did. Jstl doesn't work if I use servlet specification 2.3. Once I 
change it to servlet specification 2.4 in web.xml, it works. I use Struts 
1.2.4 with jstl 1.1.




Michael






From: Christian Taylor [EMAIL PROTECTED]
Reply-To: Tag Libraries Users List taglibs-user@jakarta.apache.org
To: Tag Libraries Users List taglibs-user@jakarta.apache.org
Subject: Re: jstl doesn't work
Date: Sat, 22 Oct 2005 07:59:30 -0300

Hi Michael,

Did you include the necessary taglib directives at the beginning of your 
JSP? For example, to use the core taglib as you are doing:


[EMAIL PROTECTED] prefix=c uri=http://java.sun.com/jsp/jstl/core%

This needs to be included at the top of any JSP using the taglib. If you 
already know this, I apologize. It was the only thing I could think of that 
you didn't mention. Hope this helps.


-Christian

michael Muttai wrote:

Why do I get ${customers.firstName} when I use the following codes in a 
jsp file?


c:forEach var=customers items=${requestScope.customers}
tr
tdc:out value=${customers.firstName}//td
...
/tr
/c:forEach

I use JBoss 4.0.3. I include jstl.jar and standard.jar under web-inf/lib 
and some *.tld files under web-inf.


Any help is appreciated.




Michael

_
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



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



_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



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



Re: JSTL c:out method access

2005-10-20 Thread digby
I believe that EL only supports properties (including maps and lists), 
but not methods.


Digby

matador wrote:

given the following code:

1 table
2   c:forEach var=elm items=${list}
3   tr
  
4   td
5 c:out value=${elm.showMeSomething()}  
6   /td
7   /tr
8   /c:forEach
9 /table

line #5 will not work.  since its not a regular accessor (get...).  I 
assume this is by design, correct?


the workaround that i found was this:

5 %= ((MyObj) pageContext.getAttribute(elm)).showMeSomething(); %


is there an easier to do this?

thx


for ref:
http://forum.java.sun.com/thread.jspa?threadID=641164messageID=3772676



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



RE: JSTL Error

2005-09-29 Thread Kurakula, Suneetha (HCF)
I think getFromcity() is missing in the vsr bean. Please check it out.

-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
e.org] On Behalf Of Vijaya S
Sent: Thursday, September 29, 2005 3:43 AM
To: taglibs-user@jakarta.apache.org
Subject: JSTL Error

Hello,

I am struggling with the JSTL error for the past two days. Can someone help
me in this?

In my JSP, I have the following code to populate bean array properties.

c:forEach var=vsr items=${vsroute}
c:catch var=coercionError
   tr
tdc:out value=${vsr.fromcity} //td
tdc:out value=${vsr.tocity} //td
tdc:out value=${vsr.dbcities} //td
tdc:out value=${vsr.duom} //td
/tr
/c:catch
c:if test=${not empty coercionError}
trtdRoute Disp Err :/td
  tdbrfont color=#FFc:out
value=${coercionError}//font/td
/tr
/c:if
 /c:forEach

The bean 'vsroute' is correctly built from the action.

I get the following error from the JSP
javax.servlet.jsp.JspException: An error occurred while evaluating custom
action attribute value with value ${vsr.fromcity}: Unable to find a
value for fromcity in object of class DBObjs.subscriber.vo.VSRouteVO
using operator . (null)

I did a google search on this and there was a suggestion that the older jsp
may be cached in tomcat work folder and I did remove that. Even then I get
this error.

I have around four rows in the bean array and I get four times the above
error as I am catching the error within the forEach loop.

Thanks in advance for the help.

Vijaya



-
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, struts and pagination

2005-09-07 Thread Lorenzo Siclia
On Wednesday 31 August 2005 21:50, Luca Passani wrote:
 people, what's the elegant way to do pagination with JSTL?
 I am using struts, my Action generates a LinkedList which a JSP page
 is supposed to visualize:

   c:forEach var=item  items=${content_list}
  c:out value=${item.name}/br /
   /c:forEach


 I'd like the JSP to recognize long lists and split it in pages, possibly
 with backward and forward navigation. I would really like to avoid
 scriptlets. BTW is pagination part of the view or is it part of the
 business logic according to struts?

You can try this tag:
http://displaytag.sourceforge.net/

regards Lorenzo

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



Re: JSTL TLD confusion

2005-09-07 Thread TroyGeek
I believe you can only use JSTL 1.1 if you're using Servlet Spec 2.4 (like 
Tomcat 5) or something like that.
 thanks!
 ~ T r o y ~

 On 9/7/05, Woodchuck [EMAIL PROTECTED] wrote: 
 
 hihi all,
 
 in the Struts (1.2.7) distribution it includes what i thought was
 everything you would need to use JSTL. namely, the standard.jar and
 jstl.jar (found under the struts/contrib/struts-el/lib folder).
 
 however, these jars are missing functions.tld file.
 
 then i discovered that the Jakarta Standard 1.1 Taglib distribution
 also comes with it's own versions of standard.jar and jstl.jar, and it
 has a fn.tld which contains the JSTL functions i want to use.
 
 also, i noticed the Struts JSTL tlds have URIs like this:
 urihttp://java.sun.com/jstl/core/uri
 
 while the Jakarta Standard 1.1 Taglib JSTL have slightly different URIs
 like this:
 urihttp://java.sun.com/jsp/jstl/core/uri
 
 which is the 'official' version we should be using? why are there such
 differences between these versions?
 
 woodchuck
 
 
 
 
 __
 Click here to donate to the Hurricane Katrina relief effort.
 http://store.yahoo.com/redcross-donate3/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: JSTL TLD confusion

2005-09-07 Thread Martin Cooper
On 9/7/05, Woodchuck [EMAIL PROTECTED] wrote:
 
 hihi all,
 
 in the Struts (1.2.7) distribution it includes what i thought was
 everything you would need to use JSTL. namely, the standard.jar and
 jstl.jar (found under the struts/contrib/struts-el/lib folder).
 
 however, these jars are missing functions.tld file.
 
 then i discovered that the Jakarta Standard 1.1 Taglib distribution
 also comes with it's own versions of standard.jar and jstl.jar, and it
 has a fn.tld which contains the JSTL functions i want to use.



Struts 1.2.x ships with JSTL 1.0.2, which is why it's missing the functions 
taglib. That was only added in JSTL 1.1. 

also, i noticed the Struts JSTL tlds have URIs like this:
 urihttp://java.sun.com/jstl/core/uri
 
 while the Jakarta Standard 1.1 Taglib JSTL have slightly different URIs
 like this:
 urihttp://java.sun.com/jsp/jstl/core/uri
 
 which is the 'official' version we should be using? why are there such
 differences between these versions?


Because the JSTL spec defines different URLs for JSTL 1.0 and JSTL 1.1. ;-)

--
Martin Cooper


woodchuck
 
 
 
 
 __
 Click here to donate to the Hurricane Katrina relief effort.
 http://store.yahoo.com/redcross-donate3/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: JSTL and Java Constants

2005-09-07 Thread Rahul Akolkar
On 8/31/05, Martin Cooper [EMAIL PROTECTED] wrote:
 On 8/30/05, Rahul Akolkar [EMAIL PROTECTED] wrote:
snip/
 2) Another approach that some choose is to provide a Constants bean
  that supplies getters for the constants, which is what we ended up
  doing for the RDC taglib.
 
 
 Isn't that effectively the same thing, once all is said and done? Wouldn't
 accessing a Constants bean be identical to accessing the constants from a
 map provided by this tag?
snip/

Was enumerating all the options, the tag is a convenient option, no doubt.

-Rahul

 
 --
 Martin Cooper

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



Re: JSTL TLD confusion

2005-09-07 Thread Rahul Akolkar
On 9/7/05, Martin Cooper [EMAIL PROTECTED] wrote:
 On 9/7/05, Woodchuck [EMAIL PROTECTED] wrote:
snip/
 
  which is the 'official' version we should be using? why are there such
  differences between these versions?
 
 
 Because the JSTL spec defines different URLs for JSTL 1.0 and JSTL 1.1. ;-)
snap/

And for the answer to why the spec defines different URLs, follow the
second FAQ entry here [
http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions ]

-Rahul

 
 --
 Martin Cooper
 
 
 woodchuck

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



Re: JSTL, struts and pagination

2005-09-01 Thread Chandramohan Mani
pagination is not a part of view... 


 On 9/1/05, Luca Passani [EMAIL PROTECTED] wrote: 
 
 people, what's the elegant way to do pagination with JSTL?
 I am using struts, my Action generates a LinkedList which a JSP page
 is supposed to visualize:
 
 c:forEach var=item items=${content_list}
 c:out value=${item.name http://item.name}/br /
 /c:forEach
 
 
 I'd like the JSP to recognize long lists and split it in pages, possibly
 with backward and forward navigation. I would really like to avoid 
 scriptlets.
 BTW is pagination part of the view or is it part of the business logic
 according to struts?
 
 Thanks
 
 Luca
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Chandramohan Mani
vMoksha Technologies.,
[EMAIL PROTECTED]
+91 (80) 25053500 ext 364

Many of life's failure are people 
who did not realize how close
they were to success when they 
gave up - Thomas Edison


Re: JSTL, struts and pagination

2005-09-01 Thread Martin Cooper
On 8/31/05, Chandramohan Mani [EMAIL PROTECTED] wrote:
 
 pagination is not a part of view...


I beg to differ. If you're going to divide the world up into M, V and C, it 
is certainly part of the view, since it has to do with which part of the 
model is being presented to the user, and how to navigate within a portion 
of model data.

This, and the first link from the comments, is an interesting discussion of 
Web MVC:

http://osteele.com/archives/2004/08/web-mvc

--
Martin Cooper


On 9/1/05, Luca Passani [EMAIL PROTECTED] wrote:
 
  people, what's the elegant way to do pagination with JSTL?
  I am using struts, my Action generates a LinkedList which a JSP page
  is supposed to visualize:
 
  c:forEach var=item items=${content_list}
  c:out value=${item.name http://item.name http://item.name}/br 
 /
  /c:forEach
 
 
  I'd like the JSP to recognize long lists and split it in pages, possibly
  with backward and forward navigation. I would really like to avoid
  scriptlets.
  BTW is pagination part of the view or is it part of the business logic
  according to struts?
 
  Thanks
 
  Luca
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 Chandramohan Mani
 vMoksha Technologies.,
 [EMAIL PROTECTED]
 +91 (80) 25053500 ext 364
 
 Many of life's failure are people
 who did not realize how close
 they were to success when they
 gave up - Thomas Edison
 



Re: JSTL and Java Constants

2005-08-31 Thread Martin Cooper
On 8/31/05, Luca Passani [EMAIL PROTECTED] wrote:
 
 Martin Cooper wrote:
 
 
 Done. I think. At least, everything seems to have worked out, so it 
 should
 be available in the next nightly build of Unstandard.
 
 
 will I need to wait tomorrow to download? great. I am eager to try it.


Urk. I just checked, and it looks like Unstandard is not included in the 
nighly builds. Glenn, if you're reading this, could you add it please?

In the meantime, I've put my local build up here:

http://people.apache.org/~martinc/taglibs/unstandard/ 

One little doubt:
 
 |un:useConstants var=const className=java.lang.Integer /
 
 The constants are defined in an interface (not a class).
 ||
 public interface ContentType {
 
 public static final int FOLDER = 1;||
 public static final int URL = 2;
 :
 }
 
 
 ||Will the tag work the same?


Yes, it will work the same.

--
Martin Cooper


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



Re: JSTL and Java Constants

2005-08-31 Thread Luca Passani

Martin Cooper wrote:



Yes, it will work the same.

 


It works like a charm. You rock. Thanks

Luca


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



Re: JSTL and Java Constants

2005-08-31 Thread Erik Beijnoff
I would like to do something like: 

a) c:when test=${item.type == ContentType.URL} 
  
  This won't work. I could hack it around with a scriptlet and an import 
at the top of my JSP, but that seems to me like 
violating  the separation between View and Control 


You may want to see this - 

http://forums.java.sun.com/thread.jspa?threadID=508847messageID=2543490


One big tradeoff with that approach is that you have to specify your
constants in one Constant class where they may not naturally belong. Another
one would be that you would have to import all external constants into that
class, thereby creating double maintenance work. And a third would be that
you'd need to import the constant class at the top of each page. 

My workaround for the fact that you directly can't reach a static variable
in a java class is to make invoke a static method through the EL which in
turns does some reflective parsing to find the constant. It would look like
this:
c:when test=${item.type == fn:const('URL')}

You could create several different extractor methods to have different level
of generality in the method so that you can reach constants in a predefined
class, in a package, or with the full class name:

c:when test=${item.type == fn:const('ActionHandler.URL')} or

c:when test=${item.type == fn:const('java.lang.Integer.MAX_VALUE')}

With this approach you are guaranteed to not have any hard coded magic
values in your jsp. I do not have the code that does the extraction here at
my work, but if you are interested, I can send it over or post it here.

Regards, 
Erik Beijnoff
 




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



Re: JSTL and Java Constants

2005-08-31 Thread jmazzella

Erik, 

Please posting the code , I am also interested.

Thanks
John

Erik Beijnoff [EMAIL PROTECTED]










Erik Beijnoff [EMAIL PROTECTED]
08/31/2005 02:59 PM
Please respond to Tag Libraries Users List




	
	To:	taglibs-user@jakarta.apache.org
	cc:	
	Subject:	Re: JSTL and Java Constants




I would like to do something like: 

a) c:when test=${item.type == ContentType.URL} 
  
  This won't work. I could hack it around with a scriptlet and an import 
at the top of my JSP, but that seems to me like 
violating  the separation between View and Control 


You may want to see this - 

http://forums.java.sun.com/thread.jspa?threadID=508847messageID=2543490


One big tradeoff with that approach is that you have to specify your
constants in one Constant class where they may not naturally belong. Another
one would be that you would have to import all external constants into that
class, thereby creating double maintenance work. And a third would be that
you'd need to import the constant class at the top of each page. 

My workaround for the fact that you directly can't reach a static variable
in a java class is to make invoke a static method through the EL which in
turns does some reflective parsing to find the constant. It would look like
this:
c:when test=${item.type == fn:const('URL')}

You could create several different extractor methods to have different level
of generality in the method so that you can reach constants in a predefined
class, in a package, or with the full class name:

c:when test=${item.type == fn:const('ActionHandler.URL')} or

c:when test=${item.type == fn:const('java.lang.Integer.MAX_VALUE')}

With this approach you are guaranteed to not have any hard coded magic
values in your jsp. I do not have the code that does the extraction here at
my work, but if you are interested, I can send it over or post it here.

Regards, 
Erik Beijnoff
 




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





The information contained in this message may be CONFIDENTIAL and is for the intended addressee only.  Any unauthorized use, dissemination of the information, or copying of this message is prohibited.  If you are not the intended addressee, please notify the sender immediately and delete this message.



RE: JSTL and Java Constants

2005-08-31 Thread Erik Beijnoff
Please posting the code , I am also interested.

Thanks
John

The big tradeoff is of course the extra fn:xxx('...') that needs to be
written in the code. But a big plus is that once direct retrieval of
constants from java classes is integrated into the EL, a conversion is
simple a matter of search and replace.

I've extracted the relevant classes into a package attached to this message,
although I'm not sure if this list accepts attachments. The classes have
been extracted from a larger context and converted from Java 5 and may
therefore be erraneous, although they have been tested.

Second, the implementation could have been simpler, but it was built with a
field cache to make sure repeated retrieval of fields is efficient, so I
included that cache too.

If you have any questions about the code, please feel free to ask. 

Regards Erik Beijnoff


Anyway, first out is the EL static function mapping file and it's associated
.tld:

---

import java.math.BigInteger;

import fieldreflector.FieldReflector;
import fieldreflector.ReflectionException;

/**
 * These classes are static helper functions used by JSP pages. These are
for
 * example helper methods to find fields in classes.
 */
public class ELFunctions{
//Cached reference to the math package prefix
private static final String mathPackagePrefix;
private static final String bigIntClassPrefix;
static{
mathPackagePrefix= BigInteger.class.getPackage().getName() +
.;
bigIntClassPrefix= BigInteger.class.getName() + .;
}

/* Private constructor */
private ELFunctions(){
//Do nothing
}

/**
 * Retrieves a public static field from a class, and returns the
field value.
 * 
 * @param fullName the full class name followed by the variable name
with
 *dot notation: java.lang.Integer.MAX_VALUE
 */
public static Object getConstant(final String fullName) throws
ReflectionException{
return FieldReflector.getFieldValue(fullName);
}

/**
 * Retrieves a public field from a class in the java.math package, 
 * and returns the  field value br/br/
 * 
 * @param name the action class name followed by the variable name
with
 *dot notation: BigInteger.ONE
 * @return the extracted variable value
 */
public static Object getMathConstant(final String name) throws
ReflectionException{
return getConstant(mathPackagePrefix + name);
}

/**
 * Retrieves a public field from a class in the java.math.BigInteger
class, 
 * and returns the  field value. br/br/
 * 
 * @param name the action class name followed by the variable name
with
 *dot notation: ONE
 * @return the extracted variable value
 */
public static Object getBigIntConstant(final String name) throws
ReflectionException{
return getConstant(bigIntClassPrefix + name);
}
}




?xml version=1.0 encoding=ISO-8859-1?
taglib 
version=2.0
xmlns=http://java.sun.com/xml/ns/j2ee; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance 

tlib-version2.0/tlib-version
short-namecommons/short-name

urihttp://com.commons.tag/uri


function
nameconst/name
function-classELFunctions/function-class
function-signature
java.lang.String
getConstant(
java.lang.String)
/function-signature
/function 

function 
namemathConst/name
function-classELFunctions/function-class
function-signature
java.lang.String
getMathConstant(
java.lang.String)
/function-signature
/function 

function 
namebigIntConst/name
function-classELFunctions/function-class
function-signature
java.lang.String
getBigIntConstant
java.lang.String)
/function-signature
/function 
/taglib


---


A few example ways to extract the constants are included, with the java.math
package as example. Every invokation of a field is stored in a field cache,
since reflection may be a bit slow. This cache is listed in the three
following files. But as mentioned, they are really not needed if you want to
make the implementation simpler. Then the reflection code can be
incorporated 

Re: JSTL and Java Constants

2005-08-30 Thread Sudhaker Raj
You may want to see this - 

http://forums.java.sun.com/thread.jspa?threadID=508847messageID=2543490

Cheers,
Sudhaker Raj
http://thej2ee.com

On 8/30/05, Luca Passani [EMAIL PROTECTED] wrote:
 
 
 Hi there, here is my big problem today. I am using JSTL in some JSPs.
 SInce this is a struts project, I would
 like to keep my views totally separated from the Java APIs. For this
 reason, I need your advice about the
 most elegant to compare a given object type (an int constant) with the
 possible values using the COSTANT name,
 instead of the corresponding int.
 The API defines the types of my object as:
 
 public interface ContentType {
 
 public static final int FOLDER = 1;
 public static final int URL = 2;
 }
 
 in my JSP I have (loop over collection of items with getType() returning
 the type int)
 
 c:forEach var=item items=${content_list}
 c:choose
 c:when test=${item.type == 2}
 a href=${item.value}c:out value=${item.name http://item.name
 }//a
 /c:when
 :
 
 I would like to do something like:
 
 a) c:when test=${item.type == ContentType.URL}
 
 This won't work. I could hack it around with a scriptlet and an import
 at the top of my JSP, but that seems to me like
 violating the separation between View and Control
 
 b) I could do something like this in my action:
 
 String type_url = 5;
 request.setAttribute(url, type_url);
 
 and then c:when test=${item.type == url}
 
 but makes me wonder if having this code in the action really makes sense.
 
 Any ideas?
 
 Thanks
 
 Luca
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Cheers,
Sudhaker Raj
http://thej2ee.com


Re: JSTL and Java Constants

2005-08-30 Thread Sudhaker Raj
And If you can't extend from that class then you can write adapter for that 
class. Something like this

Using in a JSP page:
[code]

%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
jsp:useBean id=Constants class=com.utils.JSTLMyConstants/
c:out value=${Constants.name http://Constants.name}/br
c:out value=${Constants.age}/
c:forEach var=day items=${Constants.daysOfTheWeek}
c:out value=${day}/
/c:forEach
[/code]

Where adapter class is

[code]

package com.utils;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;

/**
* Class to reveal java constants to JSTL Expression Language
* Uses reflection to scan the declared fields of a Constants class
* Adds these fields to the Map.
* Map is unmodifiable after initialization.
*/
public class JSTLMyConstants extends HashMap {

private boolean initialised = false;

private static final Class adaptee = MyConstant.class;

public JSTLMyConstants() {
Class c = adaptee;
Field[] fields = c.getDeclaredFields();
for (int i = 0; i  fields.length; i++) {

Field field = fields[i];
int modifier = field.getModifiers();
if (Modifier.isFinal(modifier)  !Modifier.isPrivate(modifier))
try {
this.put(field.getName(), field.get(this));
}
catch (IllegalAccessException e) {}
}
initialised = true;
}

public void clear() {
if (!initialised)
super.clear();
else
throw new UnsupportedOperationException(Cannot modify this map);
}

public Object put(Object key, Object value) {
if (!initialised)
return super.put(key, value);
else
throw new UnsupportedOperationException(Cannot modify this map);
}

public void putAll(Map m) {
if (!initialised)
super.putAll(m);
else
throw new UnsupportedOperationException(Cannot modify this map);
}

public Object remove(Object key) {
if (!initialised)
return super.remove(key);
else
throw new UnsupportedOperationException(Cannot modify this map);
}
}

[/code]

// Main constant class

[code]

package com.utils;

public interface MyConstant {

public static final int age = 30;
public static final String name = Sudhaker Raj;
public static final String programmingSkill = Awesome;

public static final String[] daysOfTheWeek = { Sun, Mon, Tue, Wed, 
Thu, Fri, Sat, Sun };

}

[/code]

Hope this helps.


On 8/30/05, Luca Passani [EMAIL PROTECTED] wrote:
 
 Sudhaker Raj wrote:
 
 You may want to see this -
 
 http://forums.java.sun.com/thread.jspa?threadID=508847messageID=2543490
 
 
 very smart. A bit overkill for my problem, but very smart...
 
 Thanks
 
 Luca
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Cheers,
Sudhaker Raj
http://thej2ee.com


Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag library. 
See:

http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind

I have a useConstants tag that I've been meaning to donate that exposes all 
of the constants in a class, but I haven't got around to that yet.

--
Martin Cooper


On 8/30/05, Luca Passani [EMAIL PROTECTED] wrote:
 
 
 Hi there, here is my big problem today. I am using JSTL in some JSPs.
 SInce this is a struts project, I would
 like to keep my views totally separated from the Java APIs. For this
 reason, I need your advice about the
 most elegant to compare a given object type (an int constant) with the
 possible values using the COSTANT name,
 instead of the corresponding int.
 The API defines the types of my object as:
 
 public interface ContentType {
 
 public static final int FOLDER = 1;
 public static final int URL = 2;
 }
 
 in my JSP I have (loop over collection of items with getType() returning
 the type int)
 
 c:forEach var=item items=${content_list}
 c:choose
 c:when test=${item.type == 2}
 a href=${item.value}c:out value=${item.name http://item.name
 }//a
 /c:when
 :
 
 I would like to do something like:
 
 a) c:when test=${item.type == ContentType.URL}
 
 This won't work. I could hack it around with a scriptlet and an import
 at the top of my JSP, but that seems to me like
 violating the separation between View and Control
 
 b) I could do something like this in my action:
 
 String type_url = 5;
 request.setAttribute(url, type_url);
 
 and then c:when test=${item.type == url}
 
 but makes me wonder if having this code in the action really makes sense.
 
 Any ideas?
 
 Thanks
 
 Luca
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: JSTL and Java Constants

2005-08-30 Thread Luca Passani

Martin Cooper wrote:

Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag library. 
See:


http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind

 


interesting. Do you have an example of how that should be used?

Thanks

Luca



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



Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Luca Passani [EMAIL PROTECTED] wrote:
 
 Martin Cooper wrote:
 
 Take a look at the 'bind' tag in the Jakarta Taglibs Unstandard tag 
 library.
 See:
 
 
 http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind
 
 
 
 interesting. Do you have an example of how that should be used?


I believe it's something like:

un:bind var=TheConstant type=com.yourco.ContentType field=URL /

and then you can use 'TheConstant' when you want the value.

My useConstants tag works like this:

un:useConstants var=TheConstants className=com.yourco.ContentType /

and then 'TheConstants' contains a map of all constants in the class, so you 
can use, for example:

${TheConstants.URL}

--
Martin Cooper


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



Re: JSTL and Java Constants

2005-08-30 Thread Luca Passani

Martin Cooper wrote:



and then 'TheConstants' contains a map of all constants in the class, so you 
can use, for example:


${TheConstants.URL}

 

bang on. That would be cool. I have worked my problem around in my 
application, but your solution would be better, since it would decouple 
my action from the underlying API. Should I hold my breath?


Thanks

Luca


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



Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Luca Passani [EMAIL PROTECTED] wrote:
 
 Martin Cooper wrote:
 
 
 and then 'TheConstants' contains a map of all constants in the class, so 
 you
 can use, for example:
 
 ${TheConstants.URL}
 
 
 
 bang on. That would be cool. I have worked my problem around in my
 application, but your solution would be better, since it would decouple
 my action from the underlying API. Should I hold my breath?


Well, I might have a go at adding it tonight, if I have time. It's been a 
*long* time since I've tried to build Taglibs, though, so if I have trouble 
with that, it might not happen, since I don't want to break the nightly 
builds.

--
Martin Cooper


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



Re: JSTL and Java Constants

2005-08-30 Thread Martin Cooper
On 8/30/05, Martin Cooper [EMAIL PROTECTED] wrote:
 
 
 
 On 8/30/05, Luca Passani [EMAIL PROTECTED] wrote:
  
  Martin Cooper wrote:
  
  
  and then 'TheConstants' contains a map of all constants in the class, 
  so you
  can use, for example:
  
  ${TheConstants.URL}
  
  
  
  bang on. That would be cool. I have worked my problem around in my 
  application, but your solution would be better, since it would decouple
  my action from the underlying API. Should I hold my breath?
 
 
 Well, I might have a go at adding it tonight, if I have time. It's been a 
 *long* time since I've tried to build Taglibs, though, so if I have trouble 
 with that, it might not happen, since I don't want to break the nightly 
 builds.
 

Done. I think. At least, everything seems to have worked out, so it should 
be available in the next nightly build of Unstandard.

--
Martin Cooper


--
 Martin Cooper
 
 
 Thanks
  
  Luca
  
  
  - 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  



RE: JSTL 1.0 problem with Bayern Ch 11 example...

2005-08-04 Thread Givler, Eric
I'd have to agree with you on that one.

I downloaded Tomcat 5.0.28 from the site, http://jakarta.apache.org/tomcat , 
then dropped the pages into the ROOT folder, along with my JSTL 1.0 libs (from 
jdev 10.1.2).  Once I tweaked the jsp page (for parsing) to use a different URI 
for the TLD - as noted in another site), the page worked as you said.  [NOTE 
that it appears I'm not really comparing apples to apples here as I'm using a 
NEWER container (servlet 2.4/jsp 2.0) and an old JSTL version to compare 
against OC4J 10.1.2, which I think is Servlet 2.3/jsp 1.2, but still, it works.

Thanks for the quick response yesterday!!


-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 03, 2005 2:29 PM
To: Tag Libraries Users List
Subject: Re: JSTL 1.0 problem with Bayern Ch 11 example...


On 8/3/05, Givler, Eric [EMAIL PROTECTED] wrote:
 I'm having a heck of a time trying to get the Bayern example from chapter 11 
 working, and I'm really not sure why
 

It looks like there's a bug in your container. I just tried out your
code on Resin 3.0.14, and everything works as expected.

--
Martin Cooper


 I created an enterNumber.jsp page:
 
 %@ page contentType=text/html;charset=windows-1252%
 html
   head
 meta http-equiv=Content-Type content=text/html; charset=windows-1252
 titleuntitled/title
   /head
   body
   form action=parseNumberCarefully.jsp method=post
   Enter your favorite number input type=text name=favorite/
   br/input type=submit name=submit value=Submit/
   /form
   /body
 /html
 
 
 I created an parseNumberCarefully.jsp page:
 
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core%
 %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt%
 
 html
   head
 titleparseNumberCarefully.jsp/title
   /head
   body
 pYou entered c:out value=${param.favorite}//p
 c:catch var=parsingError
   fmt:parseNumber var=fav value=${param.favorite}/
   pAs far as I can tell, this corresponds to the number
 c:out value=${fav}/.
   /p
   pIf you multiply this number by 2 and add 1, you get
 c:out value=${fav * 2 + 1}/. I like that number better.
   /p
 /c:catch
 c:if test=${not empty parsingError}
Sorry, this doesnrsquo;t look like a number to me. Perhaps 
 yoursquo;re in the wrong country?
 /c:if
   /body
 /html
 
 
 If I run the first page, enter a valid#, then click [submit], I get correct 
 results.
 If I run the first page, enter an invalid # (i.e. abcd), then click [submit], 
 I get correct results.
 However, if I enter an invalid#, click [back], then enter a valid number, I 
 keep getting parse errors.  It's as if the catch keeps RECREATING the 
 parsingError exception on subsequent requests even though the data has 
 changed and is valid.
 
 The reason I tried to do this simple example was that I was creating a 
 multi-record entry form, and trying to validate with JSTL.  When I did this, 
 as soon as the form would detect bad data, every record after it would be 
 considered invalid data.  In these cases, I'd end up either clearing the 
 rest of the data, or it would retain the first good data and ovewrite all 
 subsequent records, or I'd get a stack trace.  I thought all of the code that 
 I was writing was syntactically correct, but it did not produce the results 
 that I wanted.
 
 If parseNumberCarefully.jsp has an errorPage attribute defined, and you 
 remove the c:catch tag, and enter an invalid value, an error page is 
 displayed. Now, if you hit [back] to goto the entry page, and enter a valid 
 value, it works fine.
 
 What am I missing?
 
 I'd appreciate any assistance on this.
 
 I'm running this against Oc4J (oracle jdeveloper's embedded server) for 
 Jdeveloper 10g, version 10.1.2, on a Windows 2000 box.
 
 
 -
 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 1.0 problem with Bayern Ch 11 example...

2005-08-03 Thread Martin Cooper
On 8/3/05, Givler, Eric [EMAIL PROTECTED] wrote:
 I'm having a heck of a time trying to get the Bayern example from chapter 11 
 working, and I'm really not sure why
 

It looks like there's a bug in your container. I just tried out your
code on Resin 3.0.14, and everything works as expected.

--
Martin Cooper


 I created an enterNumber.jsp page:
 
 %@ page contentType=text/html;charset=windows-1252%
 html
   head
 meta http-equiv=Content-Type content=text/html; charset=windows-1252
 titleuntitled/title
   /head
   body
   form action=parseNumberCarefully.jsp method=post
   Enter your favorite number input type=text name=favorite/
   br/input type=submit name=submit value=Submit/
   /form
   /body
 /html
 
 
 I created an parseNumberCarefully.jsp page:
 
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core%
 %@ taglib prefix=fmt uri=http://java.sun.com/jstl/fmt%
 
 html
   head
 titleparseNumberCarefully.jsp/title
   /head
   body
 pYou entered c:out value=${param.favorite}//p
 c:catch var=parsingError
   fmt:parseNumber var=fav value=${param.favorite}/
   pAs far as I can tell, this corresponds to the number
 c:out value=${fav}/.
   /p
   pIf you multiply this number by 2 and add 1, you get
 c:out value=${fav * 2 + 1}/. I like that number better.
   /p
 /c:catch
 c:if test=${not empty parsingError}
Sorry, this doesnrsquo;t look like a number to me. Perhaps 
 yoursquo;re in the wrong country?
 /c:if
   /body
 /html
 
 
 If I run the first page, enter a valid#, then click [submit], I get correct 
 results.
 If I run the first page, enter an invalid # (i.e. abcd), then click [submit], 
 I get correct results.
 However, if I enter an invalid#, click [back], then enter a valid number, I 
 keep getting parse errors.  It's as if the catch keeps RECREATING the 
 parsingError exception on subsequent requests even though the data has 
 changed and is valid.
 
 The reason I tried to do this simple example was that I was creating a 
 multi-record entry form, and trying to validate with JSTL.  When I did this, 
 as soon as the form would detect bad data, every record after it would be 
 considered invalid data.  In these cases, I'd end up either clearing the 
 rest of the data, or it would retain the first good data and ovewrite all 
 subsequent records, or I'd get a stack trace.  I thought all of the code that 
 I was writing was syntactically correct, but it did not produce the results 
 that I wanted.
 
 If parseNumberCarefully.jsp has an errorPage attribute defined, and you 
 remove the c:catch tag, and enter an invalid value, an error page is 
 displayed. Now, if you hit [back] to goto the entry page, and enter a valid 
 value, it works fine.
 
 What am I missing?
 
 I'd appreciate any assistance on this.
 
 I'm running this against Oc4J (oracle jdeveloper's embedded server) for 
 Jdeveloper 10g, version 10.1.2, on a Windows 2000 box.
 
 
 -
 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 and splitting carriage returns

2005-05-26 Thread Ohring, Peter
I had the same problem last week. For whatever reason (The JSP policy on
whitespace) I couldn't set a variable to \n but I could create one
using the following hack:

c:set var=temp value=one
two/
c:set var=newline value=${fn:substring(temp,4,5)}/

(Note that on my windows computer temp=one\r\ntwo so that the 5th
character is the newline character)

Then you should be able to split the string using this new variable,
e.g.

c:forEach items='${fn:split(feed, newline)}' var=row
c:out value=${row}/
/c:forEach

Peter

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Digby
Sent: Thursday, May 26, 2005 5:24 AM
To: taglibs-user@jakarta.apache.org
Subject: jstl and splitting carriage returns

Hi again,

Anyone know if it's possible to do an fn:split on carriage returns (\n).

I just get invalid expression error messages with:

 c:forEach items='${fn:split(feed, \n)}' var=row
 c:out value=${row}/
 /c:forEach

TIA


-
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 and splitting carriage returns

2005-05-26 Thread Digby

Cool. Will give it a try. Thx.

Ohring, Peter wrote:

I had the same problem last week. For whatever reason (The JSP policy on
whitespace) I couldn't set a variable to \n but I could create one
using the following hack:

c:set var=temp value=one
two/
c:set var=newline value=${fn:substring(temp,4,5)}/

(Note that on my windows computer temp=one\r\ntwo so that the 5th
character is the newline character)

Then you should be able to split the string using this new variable,
e.g.

c:forEach items='${fn:split(feed, newline)}' var=row
c:out value=${row}/
/c:forEach

Peter

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Digby
Sent: Thursday, May 26, 2005 5:24 AM
To: taglibs-user@jakarta.apache.org
Subject: jstl and splitting carriage returns

Hi again,

Anyone know if it's possible to do an fn:split on carriage returns (\n).

I just get invalid expression error messages with:

 c:forEach items='${fn:split(feed, \n)}' var=row
 c:out value=${row}/
 /c:forEach

TIA


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

2005-05-26 Thread ::SammyRulez::
make a tld with a tag like this

function
  nameceil/name
  function-classjava.lang.Math/function-class
  function-signaturedouble ceil( double)/function-signature
/function

and in your jsp (assuming you have mapped the tld as /functions)

%@ taglib uri=/functions prefix=f % 
...
${f:ceil(your_number_var)}


 


On 5/26/05, Dominguez Valle Carolina [EMAIL PROTECTED] wrote:
 Hi, Is there a way to call the Math function ceil with the EL on a JSP??
 
 regards.
 
 Carolina
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
::SammyRulez::
http://sammyprojectz.blogspot.com

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



RE: JSTL Recursion possible??

2005-05-06 Thread Gros, Martin
 is there a possibility to determine in which level this b node appears?



-Original Message-
From: Rahul P Akolkar
To: Tag Libraries Users List
Sent: 03.05.2005 03:56
Subject: RE: JSTL Recursion possible??

Given that the c:import is yielding the XML that you sketched out in
your 
previous email, you can parse it (using x:parse) and iterate over the 
b nodes using x:forEach, and using the // XPath operator, like so:

x:forEach select=$doc//b var=b_node

  %-- do something with every b node, lets say send ids to JspWriter
--%
  x:out select=$b_node/@id /

/x:forEach

-Rahul


On 5/3/05, Gros, Martin [EMAIL PROTECTED] wrote:
 
 I want to build a tree, do something with every node b, and if node b 
has b
 nodes as children, do the same to these b nodes, and if these b nodes 
has b
 nodes as children, do the same to these, and if...
 
 I tried to capsule the jstl fragment to handle nodes into an own jsp 
file
 and call this jsp with a c:import. The problem i had was to remember
the
 node and to give the current node into a variable. My function was 
called
 infinite...
 
 Martin
 
 
 -Original Message-
 From: Rahul P Akolkar [mailto:[EMAIL PROTECTED]
 Sent: Dienstag, 3. Mai 2005 03:51
 To: Tag Libraries Users List
 Subject: Re: JSTL Recursion possible??
 
 I, for one, did not understand the question (or what the nesting you 
show
 has to do with JSTL recursion). Can you please try again?
 
 Thanks,
 -Rahul
 
 On 5/2/05, Gros, Martin [EMAIL PROTECTED] wrote:
  JSTL and recursion, is this possible?
 
  e.g. walk an xml tree with same element names on different levels?
 
  a
 b/
 b/
 c
 b/
 /c
 c
 b
 b/
 /b
 /c
 b
  /a
 
  i want an output like
 
  b
  b
  --b
  --b
  b
  b
 
  is this possible? if yes, could you provide a short example?
 
  thanks
 
  Martin
 
 
 
 

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



Re: JSTL Recursion possible??

2005-05-02 Thread Rahul P Akolkar
I, for one, did not understand the question (or what the nesting you show 
has to do with JSTL recursion). Can you please try again?

Thanks,
-Rahul

On 5/2/05, Gros, Martin [EMAIL PROTECTED] wrote:
 JSTL and recursion, is this possible?
 
 e.g. walk an xml tree with same element names on different levels?
 
 a
b/
b/
c
b/
/c
c
b
b/
/b
/c
b
 /a
 
 i want an output like
 
 b
 b
 --b
 --b
 b
 b
 
 is this possible? if yes, could you provide a short example?
 
 thanks
 
 Martin
 
 


RE: JSTL Question

2005-04-11 Thread Karr, David
It's a little hard to tell exactly what you're trying to do here, but it
might be helpful to know that '${restaurant.cuisine}' is the same as
'${restaurant[param.field]}' if param.field is equal to cuisine.
With this, you would need only the single case.  This strategy is only
useful if you really can guarantee that you know all the possible values
of param.field.  If you can't be certain, then this could produce
unexpected problems down the road.

 -Original Message-
 From: Jack Lauman [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, April 10, 2005 1:37 PM
 To: Tag Libraries Users List
 Subject: JSTL Question
 
 
 I have the following 'working' code to produce a table.  The value of 
 ${param.field} determines which field will be displayed in column 3. 
 Can I move this out of the c:forEach loop and assign a temp 
 variable to 
 it using c:if/c:set so that I only need to evaluate the value of 
 ${param.field} once and not on every line?  ${param.field} 
 will always 
 equal city, cuisine or name.
 
 Thanks,
 
 Jack
 
 c:forEach items=${restaurantInfo.restaurants}
var=restaurant
 
 c:set target=${restaurant}
property=filterField value=${param.field} /
 c:if
test=${fn:containsIgnoreCase(restaurant.filterValue, 
 param.value)}
 
 ..
 c:choose
c:when
  test=${param.field eq 'city'}
 
  td width=79
  div align=leftfont size=1
face=Verdana, Arial, Helvetica, sans-serif
  c:out value=${restaurant.cuisine} / /font/div
  /td
/c:when
 
c:otherwise
  td width=79
  div align=leftfont size=1
face=Verdana, Arial, Helvetica, sans-serif
  c:out value=${restaurant.city} / /font/div
  /td
/c:otherwise
 /c:choose
 
 
 
 -
 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

2005-04-11 Thread Jack Lauman
David:
The 'field'(s) are defined in RestaurantBean.java if they're not there 
nothing happens.  cuisine and city field's are exact matches.  The name 
field is user input and is case insensitive and will any partial part of 
a matching name.

What I want to do is to have param.field or ${restaurant[param.field]} 
evaluated only once at the beginning of the table.  param.field only 
needs to be evaluated once as it becomes the name of the table.

Thanks,
Jack
Karr, David wrote:
It's a little hard to tell exactly what you're trying to do here, but it
might be helpful to know that '${restaurant.cuisine}' is the same as
'${restaurant[param.field]}' if param.field is equal to cuisine.
With this, you would need only the single case.  This strategy is only
useful if you really can guarantee that you know all the possible values
of param.field.  If you can't be certain, then this could produce
unexpected problems down the road.

-Original Message-
From: Jack Lauman [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 10, 2005 1:37 PM
To: Tag Libraries Users List
Subject: JSTL Question

I have the following 'working' code to produce a table.  The value of 
${param.field} determines which field will be displayed in column 3. 
Can I move this out of the c:forEach loop and assign a temp 
variable to 
it using c:if/c:set so that I only need to evaluate the value of 
${param.field} once and not on every line?  ${param.field} 
will always 
equal city, cuisine or name.

Thanks,
Jack
c:forEach items=${restaurantInfo.restaurants}
  var=restaurant
c:set target=${restaurant}
  property=filterField value=${param.field} /
c:if
  test=${fn:containsIgnoreCase(restaurant.filterValue, 
param.value)}

..
c:choose
  c:when
test=${param.field eq 'city'}
td width=79
div align=leftfont size=1
  face=Verdana, Arial, Helvetica, sans-serif
c:out value=${restaurant.cuisine} / /font/div
/td
  /c:when
  c:otherwise
td width=79
div align=leftfont size=1
  face=Verdana, Arial, Helvetica, sans-serif
c:out value=${restaurant.city} / /font/div
/td
  /c:otherwise
/c:choose

-
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

2005-04-11 Thread Karr, David
If you want to save the result of an evaluation into another variable,
then just use c:set to set a variable from a value.

 -Original Message-
 From: Jack Lauman [mailto:[EMAIL PROTECTED] 
 Sent: Monday, April 11, 2005 9:32 AM
 To: Tag Libraries Users List
 Subject: Re: JSTL Question
 
 
 David:
 
 The 'field'(s) are defined in RestaurantBean.java if they're 
 not there 
 nothing happens.  cuisine and city field's are exact matches. 
  The name 
 field is user input and is case insensitive and will any 
 partial part of 
 a matching name.
 
 What I want to do is to have param.field or 
 ${restaurant[param.field]} 
 evaluated only once at the beginning of the table.  param.field only 
 needs to be evaluated once as it becomes the name of the table.
 
 Thanks,
 
 Jack
 
 Karr, David wrote:
 
  It's a little hard to tell exactly what you're trying to do 
 here, but 
  it might be helpful to know that '${restaurant.cuisine}' is 
 the same 
  as '${restaurant[param.field]}' if param.field is equal to 
  cuisine. With this, you would need only the single case.  This 
  strategy is only useful if you really can guarantee that 
 you know all 
  the possible values of param.field.  If you can't be 
 certain, then 
  this could produce unexpected problems down the road.
  
  
 -Original Message-
 From: Jack Lauman [mailto:[EMAIL PROTECTED]
 Sent: Sunday, April 10, 2005 1:37 PM
 To: Tag Libraries Users List
 Subject: JSTL Question
 
 
 I have the following 'working' code to produce a table.  
 The value of
 ${param.field} determines which field will be displayed in 
 column 3. 
 Can I move this out of the c:forEach loop and assign a temp 
 variable to 
 it using c:if/c:set so that I only need to evaluate the value of 
 ${param.field} once and not on every line?  ${param.field} 
 will always 
 equal city, cuisine or name.
 
 Thanks,
 
 Jack
 
 c:forEach items=${restaurantInfo.restaurants}
var=restaurant
 
 c:set target=${restaurant}
property=filterField value=${param.field} /
 c:if
test=${fn:containsIgnoreCase(restaurant.filterValue,
 param.value)}
 
 ..
 c:choose
c:when
  test=${param.field eq 'city'}
 
  td width=79
  div align=leftfont size=1
face=Verdana, Arial, Helvetica, sans-serif
  c:out value=${restaurant.cuisine} / /font/div
  /td
/c:when
 
c:otherwise
  td width=79
  div align=leftfont size=1
face=Verdana, Arial, Helvetica, sans-serif
  c:out value=${restaurant.city} / /font/div
  /td
/c:otherwise
 /c:choose
 
 
 
 
 -
 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]
 
 

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



Re: JSTL - c:if test Question

2005-01-11 Thread Jack Lauman
David:
Thanks for your prompt reply.  Your sugestion was a good idea, but I 
found that the following actually worked the way I wanted it to:

c:if test=${fn:containsIgnoreCase(restaurant.filterValue, param.value)}
Thanks,
Jack
David Schwartz wrote:
Try...
Add this to your jsp...
%@ taglib prefix = fn uri = http://java.sun.com/jsp/jstl/functions; %
Then...
c:if test = '${fn:toUpperCase(restaurant.filterValue) eq
fn:toUpperCase(param.value) }'
Quoting Jack Lauman [EMAIL PROTECTED]:

I am using the following line of code to test strings for equailty.
In most cases I'm just trying to compare a city name in an array to
user input for the name of a city i.e. Seattle.
c:if test=${restaurant.filterValue eq param.value}
If the user enters seattle instead of Seattle I don't get a response.
Is there a way to alter this statement to make it case insensitive?
Is there a way to alter it to respond like a SQL %LIKE% query?
Thanks,
Jack
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


David Schwartz
-
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 1.0 URI vs. JSTL 1.1 URI

2004-11-30 Thread Pierre Delisle
Jason,

Make sure your deployment descriptor (web.xml) is servlet 2.4 based,
as follows:

?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

  !-- web-app specific content --

/web-app

For an explanation of why this should solve your problem, please
see Appendix A of the JSTL spec (Compatibility and Migration).

-- Pierre

Jason Pincin wrote:
 Greetings,
 
 I'm fairly new to JSP and the java paradigm in general, and am trying to get 
 my feet wet with some simple pages.  I'm starting with tomcat-5.0.27 and 
 jakarta-taglibs-standard-1.1.2.  I've followed the documentation at 
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/processes.html on 
 putting together an initial application tree, I've put one page (index.jsp) 
 in ./web, I've put together build.xml, web.xml, and I've placed standard.jar 
 and jstl.jar from the taglibs package in my WEB-INF/lib dir.  
 
 I'm pretty certain I've got the basic structure down, but could be wrong.  
 The problem I'm having is this:
 
From what I've read, Tomcat 5.x utilizes JSP 2.0  JSTL 1.1.  It's my 
 understanding that with JSTL 1.1, the taglib uri for JSTL Core change from 
 http://java.sun.com/jstl/core to http://java.sun.com/jsp/jstl/core.
 
 Here is my index.jsp:
 
 %@ page contentType=text/html %
 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
 html
   head
 titleFirst JSP Page Ever/title
   /head
   body style=background-color: white; color: black;
 c:set var=test value=hello /
 
 Following number uSHOULD/u be six: 
 c:out value=${1 + 2 + 3} /
 br/
 
 Following uSHOULD/u be 'hello': 
 c:out value=${test} /
   /body 
 /html
 
 I don't think you can get much simpler.  However, with that page as it is, 
 the out put looks like this:
 
 Following number SHOULD be six: ${1 + 2 + 3}
 Following SHOULD be 'hello': ${test}
 
 Now... If I change the taglib uri from http://java.sun.com/jsp/jstl/core to 
 http://java.sun.com/jstl/core, the output looks like this:
 
 Following number SHOULD be six: 6
 Following SHOULD be 'hello': hello
 
 This has me perplexed.  Was wondering if anyone out there could shed some 
 light on this behavior for me?  Thanks in advance for your time and 
 thoughts.
 
 Jason Pincin
 
 
 -
 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 converts ' to '

2004-10-30 Thread ogjunk-taglib
Ah, thanks - I thought false was the default.

Otis

--- Kris Schneider [EMAIL PROTECTED] wrote:

 script
   alert(c:out value='${foo}' escapeXml='false'/);
 script
 
 Quoting [EMAIL PROTECTED]:
 
  Hello,
  
  I'm having some JSTL difficulties that I haven't encountered
 before.
  I have a string with a single quote in it:
  
c:set var=foo value=Foo's Moos/
  
  If I just print that out (c:out), JSTL converts the single quote to
  ' and my browser recognizes that and renders it as a single
 quote.
  Good.
  
  However, if I try using this variable in, say, this piece of
  Javascript:
  script
alert(c:out value='${foo}'/);
  script
  
  then this will not work - the problem is that JSTL does ' --
 '
  conversion, and Javascript doesn't like something in '.  Most
  likely it's the semi-column that bothers it.
  
  So, I've been trying to figure out how to stop this taglib from
 doing '
  -- ' conversion and I just cannot find a way to do this.
  
  Is this at all possible?
  
  If anyone has any other ideas for working around this problem,
 please
  let me know.
  
  Thanks,
  Otis
  
  
 
 -
  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: JSTL converts ' to #039;

2004-10-29 Thread Kris Schneider
script
  alert(c:out value='${foo}' escapeXml='false'/);
script

Quoting [EMAIL PROTECTED]:

 Hello,
 
 I'm having some JSTL difficulties that I haven't encountered before.
 I have a string with a single quote in it:
 
   c:set var=foo value=Foo's Moos/
 
 If I just print that out (c:out), JSTL converts the single quote to
 #039; and my browser recognizes that and renders it as a single quote.
 Good.
 
 However, if I try using this variable in, say, this piece of
 Javascript:
 script
   alert(c:out value='${foo}'/);
 script
 
 then this will not work - the problem is that JSTL does ' -- #039;
 conversion, and Javascript doesn't like something in #039;.  Most
 likely it's the semi-column that bothers it.
 
 So, I've been trying to figure out how to stop this taglib from doing '
 -- #039; conversion and I just cannot find a way to do this.
 
 Is this at all possible?
 
 If anyone has any other ideas for working around this problem, please
 let me know.
 
 Thanks,
 Otis
 
 
 -
 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: JSTL converts ' to #039;

2004-10-29 Thread Rahul P Akolkar
Don't escape XML in the JavaScript bit.

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
c:set var=foobar value=Foo's Moos /
html
headscript language=JavaScriptalert(c:out value='${foobar}' 
escapeXml='false' /);/script/head
body bgcolor=white
c:out value=${foobar} /
/body
/html

-Rahul


RE: [JSTL] Retrieving the key from a LinkedMap for a known value?

2004-10-12 Thread Kris Schneider
Right, that's just not gonna happen with JSTL's EL. Well, I suppose you could
keep a shadow map that mapped values to keys, but that seems like a
management headache as well as a bit of session bloat. With JSP 2.0, you could
create an EL function to do it, but you're out of luck with JSP 1.2/JSTL 1.0.
Even programmatically, there's no straightforward method for getting the key of
a mapped value. You basically have to iterate through the entries looking for a
mapping that contains a value equal to one you're holding. You may want to
investigate writing a custom taglib for this if you really need this
functionality in a JSP. Other options are to use a Filter or Servlet (or a
controller component if you're using an MVC framework) to search for the key
and then set it as a request attribute for the JSP to use.

Quoting Adrian Beech [EMAIL PROTECTED]:

 G'day,
 
 Umm, this returns the value associated with the key... I need to do the
 opposite whereby I have the value and I need it's key.
 
 Thanks.
 AB
 
 -Original Message-
 From: Tim Troy [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, 9 October 2004 10:33 PM
 To: [EMAIL PROTECTED]
 Subject: FW: [JSTL] Retrieving the key from a LinkedMap for a known value?
 
 
 I have a bean with a HashMap named errorCodes.  To access a key using jstl,
 I do the following:
 
 c:out value=${bean.errorCodes['categoryId']}/c:out
 
 -Original Message-
 From: Adrian Beech [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, October 09, 2004 1:59 AM
 To: 'Tag Libraries Users List'
 Subject: [JSTL] Retrieving the key from a LinkedMap for a known value?
 
 
 G'day all,
 
 Is it possible to retrieve the key from a LinkedMap for a known value using
 the expression language syntax under JSTL 1.0?
 
 For example, I have a LinkedMap object which is being used to generate a
 drop down with the input:select .../ tag from the Input taglib.  Apart
 from needing the value selected by the user from the drop down I need to
 pull the corresponding key for display purposes on the next page along in
 the food chain.  As I've already got the key/value pairs in a LinkedMap
 within the session context I was hoping to merely say well here is the
 value from the drop down now give me the key which was used as the display
 text for that drop down.  
 
 Does this sort of make sense?
 
 AB

-- 
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] Retrieving the key from a LinkedMap for a known value?

2004-10-12 Thread Helios Alonso
Can't you change the whole thing to work always with the key, and only do 
the key-value mapping?  Or maybe you can have a bean with both mappings:

UsersBean
+ idByUserName: Map
+ userNameById: Map
if you really need it (it is, in case both key and value are valid codes 
and not only final results).

At 04:33 10/10/2004 +1000, you wrote:
G'day,
Umm, this returns the value associated with the key... I need to do the
opposite whereby I have the value and I need it's key.
Thanks.
AB
-Original Message-
From: Tim Troy [mailto:[EMAIL PROTECTED]
Sent: Saturday, 9 October 2004 10:33 PM
To: [EMAIL PROTECTED]
Subject: FW: [JSTL] Retrieving the key from a LinkedMap for a known value?
I have a bean with a HashMap named errorCodes.  To access a key using jstl,
I do the following:
c:out value=${bean.errorCodes['categoryId']}/c:out
-Original Message-
From: Adrian Beech [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 09, 2004 1:59 AM
To: 'Tag Libraries Users List'
Subject: [JSTL] Retrieving the key from a LinkedMap for a known value?
G'day all,
Is it possible to retrieve the key from a LinkedMap for a known value using
the expression language syntax under JSTL 1.0?
For example, I have a LinkedMap object which is being used to generate a
drop down with the input:select .../ tag from the Input taglib.  Apart
from needing the value selected by the user from the drop down I need to
pull the corresponding key for display purposes on the next page along in
the food chain.  As I've already got the key/value pairs in a LinkedMap
within the session context I was hoping to merely say well here is the
value from the drop down now give me the key which was used as the display
text for that drop down.
Does this sort of make sense?
AB
-
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]
__ NOD32 1.889 (20041008) Information __
This message was checked by NOD32 antivirus system. http://www.nod32.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: [JSTL] Retrieving the key from a LinkedMap for a known value?

2004-10-12 Thread Kris Schneider
How about adding some JavaScript to update the value of a hidden input to
contain the key? That way you get both the key and the value submitted as
request params.

Quoting Helios Alonso [EMAIL PROTECTED]:

 Can't you change the whole thing to work always with the key, and only do 
 the key-value mapping?  Or maybe you can have a bean with both mappings:
 
 UsersBean
 + idByUserName: Map
 + userNameById: Map
 
 if you really need it (it is, in case both key and value are valid codes 
 and not only final results).
 
 At 04:33 10/10/2004 +1000, you wrote:
 G'day,
 
 Umm, this returns the value associated with the key... I need to do the
 opposite whereby I have the value and I need it's key.
 
 Thanks.
 AB
 
 -Original Message-
 From: Tim Troy [mailto:[EMAIL PROTECTED]
 Sent: Saturday, 9 October 2004 10:33 PM
 To: [EMAIL PROTECTED]
 Subject: FW: [JSTL] Retrieving the key from a LinkedMap for a known value?
 
 
 I have a bean with a HashMap named errorCodes.  To access a key using jstl,
 I do the following:
 
 c:out value=${bean.errorCodes['categoryId']}/c:out
 
 -Original Message-
 From: Adrian Beech [mailto:[EMAIL PROTECTED]
 Sent: Saturday, October 09, 2004 1:59 AM
 To: 'Tag Libraries Users List'
 Subject: [JSTL] Retrieving the key from a LinkedMap for a known value?
 
 
 G'day all,
 
 Is it possible to retrieve the key from a LinkedMap for a known value using
 the expression language syntax under JSTL 1.0?
 
 For example, I have a LinkedMap object which is being used to generate a
 drop down with the input:select .../ tag from the Input taglib.  Apart
 from needing the value selected by the user from the drop down I need to
 pull the corresponding key for display purposes on the next page along in
 the food chain.  As I've already got the key/value pairs in a LinkedMap
 within the session context I was hoping to merely say well here is the
 value from the drop down now give me the key which was used as the display
 text for that drop down.
 
 Does this sort of make sense?
 
 AB

-- 
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] Retrieving the key from a LinkedMap for a known value?

2004-10-09 Thread Adrian Beech
G'day,

Umm, this returns the value associated with the key... I need to do the
opposite whereby I have the value and I need it's key.

Thanks.
AB

-Original Message-
From: Tim Troy [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 9 October 2004 10:33 PM
To: [EMAIL PROTECTED]
Subject: FW: [JSTL] Retrieving the key from a LinkedMap for a known value?


I have a bean with a HashMap named errorCodes.  To access a key using jstl,
I do the following:

c:out value=${bean.errorCodes['categoryId']}/c:out

-Original Message-
From: Adrian Beech [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 09, 2004 1:59 AM
To: 'Tag Libraries Users List'
Subject: [JSTL] Retrieving the key from a LinkedMap for a known value?


G'day all,

Is it possible to retrieve the key from a LinkedMap for a known value using
the expression language syntax under JSTL 1.0?

For example, I have a LinkedMap object which is being used to generate a
drop down with the input:select .../ tag from the Input taglib.  Apart
from needing the value selected by the user from the drop down I need to
pull the corresponding key for display purposes on the next page along in
the food chain.  As I've already got the key/value pairs in a LinkedMap
within the session context I was hoping to merely say well here is the
value from the drop down now give me the key which was used as the display
text for that drop down.  

Does this sort of make sense?

AB


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


__ NOD32 1.889 (20041008) Information __

This message was checked by NOD32 antivirus system. http://www.nod32.com



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



RE: JSTL 1.1: diffs between c and c-1_0

2004-10-06 Thread Ross, Douglas
Dirk,

Would you let me know which spec you refered to in this thread? I am trying to 
understand a JSTL core taglib issue that we are having.

Our issue was resolved with the workaround: changing the URI attribute of our JSP 
[EMAIL PROTECTED] directives from /jstl-core to http://java.sun.com/jstl/core; in 
the pages where we used the setFormat tag. 

Note /jstl-core was defined in our web.xml as
  taglib
taglib-uri/jstl-core/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location
  /taglib

However, our specific issue (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15703) 
was supposedly fixed in JSTL 1.0.5. Release notes: 
http://jakarta.apache.org/taglibs/doc/standard-1.0-doc/ReleaseNotes.html.

Presumably this fix would not require the above workaround. I would have thought JSTL 
1.1 would not have this seemingly similar kind of issue. It seems counter intuitive to 
me that the URI should be a fixed value. Maybe I am missing something.

I have read how-to pages which say to do this, but I have not seen any specification. 
Any light you can shed would be greatly appreciated.

Thanks in advance for any help, 

Douglas Ross
Developer, HTML UI Framework
Kronos
E-mail: [EMAIL PROTECTED]
Voice: (978) 947-4305
Fax: (978) 256-2474
www.kronos.com
Smaller, Faster, Sharper, Easier(tm)

-Original Message-
From: Dirk Manske (Mailing list) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 06, 2004 6:01 AM
To: 'Tag Libraries Users List'
Subject: AW: JSTL 1.1: diffs between c and c-1_0

I am using the jstl 1.1.1 version with the following web.xml declaration:

?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
version=2.4

  servlet
servlet-namespringapp/servlet-name
 
servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-cl
ass
load-on-startup1/load-on-startup
  /servlet

  servlet-mapping
servlet-namespringapp/servlet-name
url-pattern*.htm/url-pattern
  /servlet-mapping

  welcome-file-list
welcome-file
  index.jsp
/welcome-file
  /welcome-file-list
  
  taglib
taglib-urijstl/c/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location
  /taglib
   taglib
taglib-urijstl/fmt/taglib-uri
taglib-location/WEB-INF/tld/fmt.tld/taglib-location
  /taglib

/web-app


I am still facing the problem, that variables are not evaluated when using
the c taglib. But it works when using c-1_0...
Tomcat version is 5.0.28. Any help appreciated.

Dirk
 

-Ursprüngliche Nachricht-
Von: Felipe Leme [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 6. Oktober 2004 02:18
An: Tag Libraries Users List
Betreff: Re: JSTL 1.1: diffs between c and c-1_0

On Tue, 2004-10-05 at 20:03, Dirk Manske (Mailing list) wrote:

 I upgraded to JSTL 1.1 because we are now using Tomcat 5. At first I 
 tried the c.tld taglib. But this did not work. For example the result 
 of c:out value=${aVariable} / for aVariable set to 100 was simply 
 ${aVariable} instead of 100.

Did you use the proper jars? You *must* use JSTL 1.1 on Tomcat 5, as it is a
JSP 2.0 container.

Note also that on JSP 2.0, the EL evaluation is done by the container (not
the tag handlers) but your application must be set with the proper web.xml
header (i.e., the one that uses the servlet 2.4 XML schema, and not the
servlet 2.3 DTD).

-- Felipe



-
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 1.1: diffs between c and c-1_0

2004-10-05 Thread Felipe Leme
On Tue, 2004-10-05 at 20:03, Dirk Manske (Mailing list) wrote:

 I upgraded to JSTL 1.1 because we are now using Tomcat 5. At first I tried
 the c.tld taglib. But this did not work. For example the result of c:out
 value=${aVariable} / for aVariable set to 100 was simply ${aVariable}
 instead of 100. 

Did you use the proper jars? You *must* use JSTL 1.1 on Tomcat 5, as it
is a JSP 2.0 container.

Note also that on JSP 2.0, the EL evaluation is done by the container
(not the tag handlers) but your application must be set with the proper
web.xml header (i.e., the one that uses the servlet 2.4 XML schema, and
not the servlet 2.3 DTD).

-- Felipe



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



RE: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-17 Thread Adrian Beech
Hi,

Is initParam[...] JSTL 1.1 specific?  I can get TITLEc:out
value='${initParam[applicationName]}'//TITLE to work under Tomcat 5.0
with JSTL 1.1 but not under Tomcat 4.1.24 with JSTL 1.0.

AB


-Original Message-
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Monday, 13 September 2004 1:16 AM
To: Tag Libraries Users List
Subject: Re: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP


Adrian Beech wrote:

 TITLEc:out value='${initParams[applicationName]}'//TITLE

... it's initParam -- singular --

c:out value='${initParam[applicationName]}'/
or
c:out value='${initParam.applicationName}'/

HTH,
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

   dream.  code.



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


__ NOD32 1.868 (20040910) Information __

This message was checked by NOD32 antivirus system. http://www.nod32.com



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



Re: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-17 Thread Hassan Schroeder
Adrian Beech wrote:
Is initParam[...] JSTL 1.1 specific?  I can get TITLEc:out
value='${initParam[applicationName]}'//TITLE to work under Tomcat 5.0
with JSTL 1.1 but not under Tomcat 4.1.24 with JSTL 1.0.
Nope, both of the below work fine on my 4.1.30 systems.
c:out value='${initParam[applicationName]}'/
or
c:out value='${initParam.applicationName}'/
Make sure you're using the appropriate web.xml for each version...
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

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


Re: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-12 Thread Dima Gutzeit
The following will work on 1.1:
c:out value='%=
config.getServletContext().getInitParameter(applicationName) %'/


I know that it is not that elegant, but it works :-)


- Original Message - 
From: Adrian Beech [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, September 12, 2004 12:32
Subject: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP


G'day all,

I have a context parameter defined in the web.xml file and was wondering how
to get it into the JSP?  For example, I have
CONTEXT-PARAMPARAM-NAMEapplicationName/PARAM-NAMEPARAM-VALUERASCAL
- Development/PARAM-VALUE/CONTEXT-PARAM in the web.xml and
TITLEc:out value='${initParams[applicationName]}'//TITLE in the
JSP.  The resulting HTML yields TITLE/TITLE.

Have I misinterpreted something here?  I have tried both standard 1.0 and
1.1 under Tomcat 4.1.24 and 5.0.28 with the same results.

I would greatly appreciate it someone could steer me in the right direction.

AB



-
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 and SOAP?

2004-08-25 Thread fatih marmara
Every document that has the XML syntax can be parsed
by using x:parse

check if your SOAP message has an accurate format

--- Johnson, Chris [EMAIL PROTECTED] wrote:

 Is x:parse not able to parse a SOAP message?
  
 Chris
 


__
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: JSTL 1.0 and the function library

2004-08-20 Thread Kris Schneider
Obvioiusly, tomcat-user will probably be a more helpful place to post, but have
you read through the info here:

http://jakarta.apache.org/tomcat/connectors-doc/jk2/index.html

and, specifically for IIS:

http://jakarta.apache.org/tomcat/connectors-doc/jk2/jk/iishowto.html

Quoting Nick Rapagnani [EMAIL PROTECTED]:

 Thanks for everyone's help.  I'm using too much JSTL 1.1, so I'll have to
 figure out how to get Tomcat 5.0 and IIS working.

-- 
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 not working when i use a web.xml file

2004-08-19 Thread Helios Alonso
The web.xml has info about your application like the taglibs to use.  So, 
if you put an empty web.xml file the tags you used for your iteration 
aren't converted to java code and compiled.  :-)

Maybe if you don't put a web.xml tomcat includes a default one, I don't 
know (or the IDE you are using).

For recompiling all pages... hmm... maybe there is a polite thing but what 
I know is deleting the cached compiled pages.  There are at 
tomcat/work/host/app.  I don't think it works for reloading the 
web.xml.  Any way, you wouldn't have to worry about recompiling jsps.

IDEs for Java (I use JBuilder 6) offers running and debugging with their 
own tomcat servers.  There are initiated every time you want to run or 
debug.  It's very comfortable to use it, you don't worry about reloading 
and all that stuff.

Hope it helps!
At 15:58 19/08/2004 -0500, you wrote:
Hello!
1st of all, b gentle w/ me...i'm just getting into this stuff. i'm
trying to use jstl stuff in a webapp on jakarta 5.0.27. i created my
directory in webapps and placed the two .jar files in the WEB-INF/lib
directory. from there, i just copied the SimpleRange.jsp file from the
examples into my webapps directory. i then stop and restart jakarta
and run the page. it works great! i get this returned:
Simple Range Iteration
1 to 10
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 •
however, if i create any sort of web.xml file inside WEB-INF for my
webapp (at least the variations i tried), the page does not work
properly. i created a very simple empty web.xml file like this:
web-app
/web-app

anyway, with a web.xml file present, i get the following when trying
to run the page (after starting and stopping):
Simple Range Iteration
1 to 10
${i} • ${i} • ${i} • ${i} • ${i} • ${i} • ${i} • ${i} • 
${i} • ${i} •

what in the world am i doing wrong? also (unrelated) how do i force a
recompile of my pages?
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 not working when i use a web.xml file

2004-08-19 Thread Simon Benzekri
Hello Jeff,  

Try this as the top line  in  web.xml file.

 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
version=2.4

all other declaraqtions
/web-app

Simon

-Original Message-
From: Jeff Ousley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 19, 2004 4:59 PM
To: [EMAIL PROTECTED]
Subject: jstl not working when i use a web.xml file

Hello!

1st of all, b gentle w/ me...i'm just getting into this stuff. i'm
trying to use jstl stuff in a webapp on jakarta 5.0.27. i created my
directory in webapps and placed the two .jar files in the WEB-INF/lib
directory. from there, i just copied the SimpleRange.jsp file from the
examples into my webapps directory. i then stop and restart jakarta
and run the page. it works great! i get this returned:


Simple Range Iteration
1 to 10
1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 


however, if i create any sort of web.xml file inside WEB-INF for my
webapp (at least the variations i tried), the page does not work
properly. i created a very simple empty web.xml file like this:

web-app

/web-app



anyway, with a web.xml file present, i get the following when trying
to run the page (after starting and stopping):


Simple Range Iteration
1 to 10
${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * 


what in the world am i doing wrong? also (unrelated) how do i force a
recompile of my pages?


thanks!

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

NOTICE: This email contains privileged and confidential information and is intended 
only for the individual to whom it is addressed. If you are not the named addressee, 
you should not disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this transmission by mistake and delete 
this communication from your system. E-mail transmission cannot be guaranteed to be 
secured or error-free as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. 

AVIS: Le présent courriel contient des renseignements de nature privilégiée et 
confidentielle et n’est destiné qu'à la personne à qui il est adressé. Si vous n’êtes 
pas le destinataire prévu, vous êtes par les présentes avisés que toute diffusion, 
distribution ou reproduction de cette communication est strictement interdite.  Si 
vous avez reçu ce courriel par erreur, veuillez en aviser immédiatement l’expéditeur 
et le supprimer de votre système. Notez que la transmission de courriel ne peut en 
aucun cas être considéré comme inviolable ou exempt d’erreur puisque les informations 
qu’il contient pourraient être interceptés, corrompues, perdues, détruites, arrivées 
en retard ou incomplètes ou contenir un virus.  

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



RE: jstl not working when i use a web.xml file

2004-08-19 Thread Mark Page
or stick %@ page isELIgnored =false % in your jsp.

On Thu, 2004-08-19 at 22:30, Simon Benzekri wrote:
 Hello Jeff,  
 
 Try this as the top line  in  web.xml file.
 
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
 version=2.4
 
   all other declaraqtions
 /web-app
 
 Simon
 
 -Original Message-
 From: Jeff Ousley [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, August 19, 2004 4:59 PM
 To: [EMAIL PROTECTED]
 Subject: jstl not working when i use a web.xml file
 
 Hello!
 
 1st of all, b gentle w/ me...i'm just getting into this stuff. i'm
 trying to use jstl stuff in a webapp on jakarta 5.0.27. i created my
 directory in webapps and placed the two .jar files in the WEB-INF/lib
 directory. from there, i just copied the SimpleRange.jsp file from the
 examples into my webapps directory. i then stop and restart jakarta
 and run the page. it works great! i get this returned:
 
 
 Simple Range Iteration
 1 to 10
 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 
 
 
 however, if i create any sort of web.xml file inside WEB-INF for my
 webapp (at least the variations i tried), the page does not work
 properly. i created a very simple empty web.xml file like this:
 
 web-app
 
 /web-app
 
 
 
 anyway, with a web.xml file present, i get the following when trying
 to run the page (after starting and stopping):
 
 
 Simple Range Iteration
 1 to 10
 ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * 
 
 
 what in the world am i doing wrong? also (unrelated) how do i force a
 recompile of my pages?
 
 
 thanks!
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 NOTICE: This email contains privileged and confidential information and is intended 
 only for the individual to whom it is addressed. If you are not the named addressee, 
 you should not disseminate, distribute or copy this e-mail. Please notify the sender 
 immediately by e-mail if you have received this transmission by mistake and delete 
 this communication from your system. E-mail transmission cannot be guaranteed to be 
 secured or error-free as information could be intercepted, corrupted, lost, 
 destroyed, arrive late or incomplete, or contain viruses. 
 
 AVIS: Le prsent courriel contient des renseignements de nature privilgie et 
 confidentielle et nest destin qu' la personne  qui il est adress. Si vous ntes pas 
 le destinataire prvu, vous tes par les prsentes aviss que toute diffusion, 
 distribution ou reproduction de cette communication est strictement interdite. Si 
 vous avez reu ce courriel par erreur, veuillez en aviser immdiatement lexpditeur et 
 le supprimer de votre systme. Notez que la transmission de courriel ne peut en aucun 
 cas tre considr comme inviolable ou exempt derreur puisque les informations quil 
 contient pourraient tre intercepts, corrompues, perdues, dtruites, arrives en retard 
 ou incompltes ou contenir un virus. 
 
 -
 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 not working when i use a web.xml file

2004-08-19 Thread Jeff Ousley
very cool! that worked...but why? none of other suggestions did. any
sort of web.xml seemed to cause the page not to work. but placing this
line in allowed it to work. i'm assuming this turns off expression
language?

On Thu, 19 Aug 2004 23:18:06 +0100, Mark Page [EMAIL PROTECTED] wrote:
 or stick %@ page isELIgnored =false % in your jsp.
 
 On Thu, 2004-08-19 at 22:30, Simon Benzekri wrote:
  Hello Jeff,
 
  Try this as the top line  in  web.xml file.
 
   web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
  version=2.4
 
all other declaraqtions
  /web-app
 
  Simon
 
  -Original Message-
  From: Jeff Ousley [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 19, 2004 4:59 PM
  To: [EMAIL PROTECTED]
  Subject: jstl not working when i use a web.xml file
 
  Hello!
 
  1st of all, b gentle w/ me...i'm just getting into this stuff. i'm
  trying to use jstl stuff in a webapp on jakarta 5.0.27. i created my
  directory in webapps and placed the two .jar files in the WEB-INF/lib
  directory. from there, i just copied the SimpleRange.jsp file from the
  examples into my webapps directory. i then stop and restart jakarta
  and run the page. it works great! i get this returned:
 
 
  Simple Range Iteration
  1 to 10
  1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 *
 
 
  however, if i create any sort of web.xml file inside WEB-INF for my
  webapp (at least the variations i tried), the page does not work
  properly. i created a very simple empty web.xml file like this:
 
  web-app
 
  /web-app
 
 
 
  anyway, with a web.xml file present, i get the following when trying
  to run the page (after starting and stopping):
 
 
  Simple Range Iteration
  1 to 10
  ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} *
 
 
  what in the world am i doing wrong? also (unrelated) how do i force a
  recompile of my pages?
 
 
  thanks!
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  NOTICE: This email contains privileged and confidential information and is 
  intended only for the individual to whom it is addressed. If you are not the named 
  addressee, you should not disseminate, distribute or copy this e-mail. Please 
  notify the sender immediately by e-mail if you have received this transmission by 
  mistake and delete this communication from your system. E-mail transmission cannot 
  be guaranteed to be secured or error-free as information could be intercepted, 
  corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
  
  AVIS: Le prsent courriel contient des renseignements de nature privilgie et 
  confidentielle et nest destin qu' la personne  qui il est adress. Si vous ntes pas 
  le destinataire prvu, vous tes par les prsentes aviss que toute diffusion, 
  distribution ou reproduction de cette communication est strictement interdite. Si 
  vous avez reu ce courriel par erreur, veuillez en aviser immdiatement lexpditeur 
  et le supprimer de votre systme. Notez que la transmission de courriel ne peut en 
  aucun cas tre considr comme inviolable ou exempt derreur puisque les informations 
  quil contient pourraient tre intercepts, corrompues, perdues, dtruites, arrives en 
  retard ou incompltes ou contenir un virus.
 
 
 
  -
  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 not working when i use a web.xml file

2004-08-19 Thread Jeff Ousley
ok...i think i'm clearer now. this thread helped:

http://forum.java.sun.com/thread.jsp?forum=45thread=506444

thanks all!

On Thu, 19 Aug 2004 17:25:12 -0500, Jeff Ousley [EMAIL PROTECTED] wrote:
 very cool! that worked...but why? none of other suggestions did. any
 sort of web.xml seemed to cause the page not to work. but placing this
 line in allowed it to work. i'm assuming this turns off expression
 language?
 
 
 
 On Thu, 19 Aug 2004 23:18:06 +0100, Mark Page [EMAIL PROTECTED] wrote:
  or stick %@ page isELIgnored =false % in your jsp.
 
  On Thu, 2004-08-19 at 22:30, Simon Benzekri wrote:
   Hello Jeff,
  
   Try this as the top line  in  web.xml file.
  
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd
   version=2.4
  
 all other declaraqtions
   /web-app
  
   Simon
  
   -Original Message-
   From: Jeff Ousley [mailto:[EMAIL PROTECTED]
   Sent: Thursday, August 19, 2004 4:59 PM
   To: [EMAIL PROTECTED]
   Subject: jstl not working when i use a web.xml file
  
   Hello!
  
   1st of all, b gentle w/ me...i'm just getting into this stuff. i'm
   trying to use jstl stuff in a webapp on jakarta 5.0.27. i created my
   directory in webapps and placed the two .jar files in the WEB-INF/lib
   directory. from there, i just copied the SimpleRange.jsp file from the
   examples into my webapps directory. i then stop and restart jakarta
   and run the page. it works great! i get this returned:
  
  
   Simple Range Iteration
   1 to 10
   1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 *
  
  
   however, if i create any sort of web.xml file inside WEB-INF for my
   webapp (at least the variations i tried), the page does not work
   properly. i created a very simple empty web.xml file like this:
  
   web-app
  
   /web-app
  
  
  
   anyway, with a web.xml file present, i get the following when trying
   to run the page (after starting and stopping):
  
  
   Simple Range Iteration
   1 to 10
   ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} * ${i} *
  
  
   what in the world am i doing wrong? also (unrelated) how do i force a
   recompile of my pages?
  
  
   thanks!
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
   NOTICE: This email contains privileged and confidential information and is 
   intended only for the individual to whom it is addressed. If you are not the 
   named addressee, you should not disseminate, distribute or copy this e-mail. 
   Please notify the sender immediately by e-mail if you have received this 
   transmission by mistake and delete this communication from your system. E-mail 
   transmission cannot be guaranteed to be secured or error-free as information 
   could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or 
   contain viruses.
  
   AVIS: Le prsent courriel contient des renseignements de nature privilgie et 
   confidentielle et nest destin qu' la personne  qui il est adress. Si vous ntes 
   pas le destinataire prvu, vous tes par les prsentes aviss que toute diffusion, 
   distribution ou reproduction de cette communication est strictement interdite. 
   Si vous avez reu ce courriel par erreur, veuillez en aviser immdiatement 
   lexpditeur et le supprimer de votre systme. Notez que la transmission de 
   courriel ne peut en aucun cas tre considr comme inviolable ou exempt derreur 
   puisque les informations quil contient pourraient tre intercepts, corrompues, 
   perdues, dtruites, arrives en retard ou incompltes ou contenir un virus.
 
 
  
   -
   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 1.0 and the function library

2004-08-17 Thread Makoto Nagata
Hi Nick,
You might find MicroNova YUZU 
(http://sourceforge.net/projects/micronova-yuzu) useful.  It doesn't 
have indexOf either, though, so you may have to use regular-expression 
functions (codecs) such as String:match or String:split instead. 
Hope this helps.

Best Regards,  Makoto Nagata
Nick Rapagnani wrote:
Because of the difficulty I had integrating Tomcat 5.X with IIS 6, I had to use Tomcat 4.X instead.  This means no JSP 2.0 and no JSTL 1.1.
 
I had been using the function library for some things, namely trim, replace, indexOf, and substring.  I am looking for a replacement library.  The string library from Jakarta can do everything except indexOf.  Does anyone know of a good function library that I can use?


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


Re: JSTL 1.0 and the function library

2004-08-17 Thread Þorgils Völundarson
Hi,
have you checked the coldtags suit? www.servletsuit.com/jsp
Best regards,
At 18:08 16.8.2004, you wrote:
Because of the difficulty I had integrating Tomcat 5.X with IIS 6, I had 
to use Tomcat 4.X instead.  This means no JSP 2.0 and no JSTL 1.1.

I had been using the function library for some things, namely trim, 
replace, indexOf, and substring.  I am looking for a replacement 
library.  The string library from Jakarta can do everything except 
indexOf.  Does anyone know of a good function library that I can use?

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


  1   2   3   4   5   6   >