Re: java.lang.ClassCastException @ org.apache.taglibs.standard.tag.common.fmt.BundleSupport
What version of the Standard taglib are you using? What's a PRO? Are you saying that the same code works in one environment and not another? Does your application make use of: Config.set(..., Config.FMT_LOCALIZATION_CONTEXT, ...) On Tue, Dec 16, 2008 at 4:57 AM, konkere empe...@inbox.ru wrote: yesterday i got this fancy exception: java.lang.ClassCastException: javax.servlet.jsp.jstl.fmt.LocalizationContext at org.apache.taglibs.standard.tag.common.fmt.BundleSupport.getLocalizationContext(Ljavax.servlet.jsp.PageContext;)Ljavax.servlet.jsp.jstl.fmt.LocalizationContext;(BundleSupport.java:127) at org.apache.taglibs.standard.tag.common.fmt.MessageSupport.doEndTag()I(MessageSupport.java:152) at jsp_servlet._web_45_inf._jsp._templates.__template._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(__template.java:235) what can cause it? i presume my JSPs to be correct (as they are deployed to our PRO and i haven't changed a single character in them). -- View this message in context: http://www.nabble.com/java.lang.ClassCastException-%40-org.apache.taglibs.standard.tag.common.fmt.BundleSupport-tp21030184p21030184.html Sent from the Taglibs - User mailing list archive at Nabble.com. -- Kris Schneider mailto:k...@directthought.com directThought http://www.directThought.com/ - To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org
Re: A bizarre question about XML Parsing with JSP : XPATH - XALAN error
Sorry, I don't have time to look at this in detail at the moment, but it reminds me of an issue I had with OC4J (it looks like that's what you're using). See this Oracle forum post I made a while back: http://forums.oracle.com/forums/thread.jspa?threadID=594677 It looks like you're running into an issue with a header whereas I was running into an issue with request attributes, but perhaps it's a similar bug. On Fri, Nov 21, 2008 at 12:19 PM, Ali Riza Saral [EMAIL PROTECTED] wrote: Hi Ms/Mr, I am getting 500 Internal Server Error javax.servlet.jsp.JspTagException: org.apache.taglibs.standard.tag.common.xml.UnresolvableException: $header:ACCEPT-ENCODİNG at org.apache.taglibs.standard.tag.common.xml.XPathUtil.fillVarStack(XPathUtil.java:784) at org.apache.taglibs.standard.tag.common.xml.XPathUtil.selectNodes(XPathUtil.java:522) at org.apache.taglibs.standard.tag.common.xml.ForEachTag.prepare(ForEachTag.java:50) at javax.servlet.jsp.jstl.core.LoopTagSupport.doStartTag(LoopTagSupport.java:227) at _books._jspService(_books.java:87) [/books.jsp] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) from::: ?xml version=1.0 encoding = 'UTF-8'? !DOCTYPE books [ !ELEMENT books (book) !ELEMENT book (title,author,year,price) !ELEMENT title (#PCDATA) !ELEMENT author (#PCDATA) ] books book titlecobol/title authorroy/author /book book titlejava/title authorherbert/author /book book titlec++/title authorrobert/author /book book titlecoldfusion/title authorallaire/author /book book titlexml unleashed/title authormorrison/author /book book titlejrun/title authorallaire/author /book /books with: %@ page contentType=text/html; charset=UTF-8 % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % html meta http-equiv=Content-Type content=text/html; charset=UTF-8 body x:parse var=doc c:import url=books.xml / % System.out.print(importt\n);% /x:parse ---br x:forEach var=n select=$doc/books/book % System.out.print(foreach\n);% x:out select=$n/title / br x:out select=$n/author / br br /x:forEach /body /html I have done everything within my mental health but I can not get rid of this error. Could you please help me in regards to this matter. Kind regards. Ali R+ SARAL Tel : 0090-216-474 88 18 Addr: Barbaros Mah. Sedef Sk. Onur Sit. 13/13 Üsküdar / ISTANBUL TURKEY Blog: Large Systems and ATC (English Turkish) http://largesystems-atc.blogspot.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/
Re: ClassCastException when changing from HashMap to TreeMap
It looks like it might be a difference in the way HashMap.containsKey and TreeMap.containsKey are implemented. If you look at the API docs, TreeMap will throw ClassCastException but HashMap will not. When you were using HashMap, did you actually get values returned or null? On Fri, Oct 17, 2008 at 10:48 AM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Hi, I was accessing a MapInteger, MyClass implemented with a HashMapInteger, MyClass from JSTL (v.1.1.2) using the following expression: ${map[param.myid].name} and it worked well. However, when I changed the implementation to a TreeMapInteger, MyClass the expression stop working because it throws ClassCastException saying that can't compare Strings with Integers. I know that ${param.myid} should resolve to a String, but I wanted to clarify if this is a normal behaviour or it is a bug, since it seems to be converting to Integer for HashMap but not for TreeMap. Best regards, Gabriel -- View this message in context: http://www.nabble.com/ClassCastException-when-changing-from-HashMap-to-TreeMap-tp20034818p20034818.html Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassCastException when changing from HashMap to TreeMap
HashMap will essentially just use the hashCode value of the key to do the lookup. So, when using 3, the hashCode value is 51. But for both Integer(3) and Long(3), the hashCode value is 3. If the conversion is actually to BigDecimal, then the hashCode value of BigDecimal(3) is 93 and that might explain the miss even when using a numeric literal. On Fri, Oct 17, 2008 at 12:04 PM, Gabriel Belingueres [EMAIL PROTECTED] wrote: I now I realize that it is returning nothing on ${map[param.myid]} with HashMap. But surprisingly even though I know for sure that map[3] exists, then ${map[3]} (with the literal 3) returns nothing too...I remember previously having an issue with this because IIRC JSTL converts the 3 to a Long, not to Integers. Kris Schneider wrote: It looks like it might be a difference in the way HashMap.containsKey and TreeMap.containsKey are implemented. If you look at the API docs, TreeMap will throw ClassCastException but HashMap will not. When you were using HashMap, did you actually get values returned or null? On Fri, Oct 17, 2008 at 10:48 AM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Hi, I was accessing a MapInteger, MyClass implemented with a HashMapInteger, MyClass from JSTL (v.1.1.2) using the following expression: ${map[param.myid].name} and it worked well. However, when I changed the implementation to a TreeMapInteger, MyClass the expression stop working because it throws ClassCastException saying that can't compare Strings with Integers. I know that ${param.myid} should resolve to a String, but I wanted to clarify if this is a normal behaviour or it is a bug, since it seems to be converting to Integer for HashMap but not for TreeMap. Best regards, Gabriel -- View this message in context: http://www.nabble.com/ClassCastException-when-changing-from-HashMap-to-TreeMap-tp20034818p20034818.html Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/ClassCastException-when-changing-from-HashMap-to-TreeMap-tp20034818p20036227.html Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassCastException when changing from HashMap to TreeMap
Just ran a couple quick tests, and it looks like integer literals are converted to Long. I completely blocked on the fact that HashMap will also attempt to do aLong.equals(anInteger), which will fail. On Fri, Oct 17, 2008 at 12:20 PM, Kris Schneider [EMAIL PROTECTED] wrote: HashMap will essentially just use the hashCode value of the key to do the lookup. So, when using 3, the hashCode value is 51. But for both Integer(3) and Long(3), the hashCode value is 3. If the conversion is actually to BigDecimal, then the hashCode value of BigDecimal(3) is 93 and that might explain the miss even when using a numeric literal. On Fri, Oct 17, 2008 at 12:04 PM, Gabriel Belingueres [EMAIL PROTECTED] wrote: I now I realize that it is returning nothing on ${map[param.myid]} with HashMap. But surprisingly even though I know for sure that map[3] exists, then ${map[3]} (with the literal 3) returns nothing too...I remember previously having an issue with this because IIRC JSTL converts the 3 to a Long, not to Integers. Kris Schneider wrote: It looks like it might be a difference in the way HashMap.containsKey and TreeMap.containsKey are implemented. If you look at the API docs, TreeMap will throw ClassCastException but HashMap will not. When you were using HashMap, did you actually get values returned or null? On Fri, Oct 17, 2008 at 10:48 AM, Gabriel Belingueres [EMAIL PROTECTED] wrote: Hi, I was accessing a MapInteger, MyClass implemented with a HashMapInteger, MyClass from JSTL (v.1.1.2) using the following expression: ${map[param.myid].name} and it worked well. However, when I changed the implementation to a TreeMapInteger, MyClass the expression stop working because it throws ClassCastException saying that can't compare Strings with Integers. I know that ${param.myid} should resolve to a String, but I wanted to clarify if this is a normal behaviour or it is a bug, since it seems to be converting to Integer for HashMap but not for TreeMap. Best regards, Gabriel -- View this message in context: http://www.nabble.com/ClassCastException-when-changing-from-HashMap-to-TreeMap-tp20034818p20034818.html Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/ClassCastException-when-changing-from-HashMap-to-TreeMap-tp20034818p20036227.html Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: useConstants tag in unstandard taglib
You can try here: http://people.apache.org/builds/jakarta-taglibs-sandbox/nightly/projects/unstandard/ But the builds are a few years old. The other possibility is to build from source. On Wed, Sep 24, 2008 at 10:40 AM, DM [EMAIL PROTECTED] wrote: Hi, I'm looking for the ability to use Java constants withint a JSP (without using scriptlet code). This seems to be possible with the useConstants tag available from the unstandard taglib: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#useConstants However, I cannot seem to find any way to download this taglib. If it has been deprecated, has the useConstants tag been moved into another library? Cheers, Don - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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
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
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
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: Taglibs
On Mon, Jun 30, 2008 at 2:26 PM, Hassan Schroeder [EMAIL PROTECTED] wrote: On Mon, Jun 30, 2008 at 11:01 AM, Andrés M. Luna [EMAIL PROTECTED] wrote: Hi. I looking for URL to download Mailer2. Please can send me the URL for download Taglib Mailer 2. mmm -- looking just now, it no longer seems to be available, even as source. That's a bummer. This should be the Subversion location: http://svn.apache.org/repos/asf/jakarta/taglibs/deprecated-sandbox/mailer2/ Haven't recalled where to find a build yet... You should try to contact a jakarta maintainer, I suppose, and see if they can fix that. Alternatively, use the Mailer taglib, which /is/ still available. HTH, -- Hassan Schroeder [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I18n and formatting numbers
Which version of the Standard taglib are you using? On Thu, Apr 17, 2008 at 7:38 AM, majid kalkatechi [EMAIL PROTECTED] wrote: hi, I wanted to format parameters of message. I did as follow in my jsp I wrote: fmt:message key=something fmt:param value=${123456} / /fmt:message and in the properties file : ... something= hi {0,number,integer} ... Then I get IllegalArgumentException. I think fmt:param tag sends my parameter as String to DecimalFormat.format() and had not tried to cast it to integer before passing it to DecimalFormat.format() method. The exception stack trace in tomcat5.5 : 2008-04-17 10:34:37,292 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jspui].[jsp] @ Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: Cannot format given Object as a Number at java.text.DecimalFormat.format(DecimalFormat.java:480) at java.text.Format.format(Format.java:133) at java.text.MessageFormat.subformat(MessageFormat.java:1279) at java.text.MessageFormat.format(MessageFormat.java:828) at java.text.Format.format(Format.java:133) at org.apache.taglibs.standard.tag.common.fmt.MessageSupport.doEndTag(MessageSupport.java:200) at org.apache.jsp.browse.full_jsp._jspService(full_jsp.java:917) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.dspace.app.webui.util.JSPManager.showJSP(JSPManager.java:91) at org.dspace.app.webui.servlet.BrowserServlet.showFullPage(BrowserServlet.java:174) at org.dspace.app.webui.servlet.AbstractBrowserServlet.processBrowse(AbstractBrowserServlet.java:368) at org.dspace.app.webui.servlet.BrowserServlet.doDSGet(BrowserServlet.java:96) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:151) at org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:99) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta request taglib
) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Got encoding: ISO-8859-1 realWrite(b, 0, 1530) [EMAIL PROTECTED] ... Has anyone encountered this problem or have any idea why there is a problem? -Matt -- View this message in context: http://www.nabble.com/Jakarta-request-taglib-tp15205595p15205595.html Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where can I get a recent nightly build?
On Jan 7, 2008 12:22 PM, [EMAIL PROTECTED] wrote: Hi there, We're currently trying to resolve an issue in our code which appears to be solved by the following bug patch: http://issues.apache.org/bugzilla/show_bug.cgi?id=31789 It appears this has been incorporated into the latest snapshots in the source repository, but there don't appear to be any nightly builds from 2007 on the Taglibs website. Is there anywhere I can get a nightly build, or do I have to point to SVN and build it myself? This is supposed to be the place: http://people.apache.org/builds/jakarta-taglibs/nightly/projects/standard/ But you can see it's a bit outdated. Not sure what needs to happen to remedy the situation, but your best bet is probably the source at this point. Thanks, Jonathan Whitall Application Architect Health Care Service Corporation (312) 653-4478 -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:url and context path completion
On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: I was sure that I had read somewhere that c:url value=/images/pluslittle.gif/ usage would automatically cause the context path to be entered into the output of c:url. Is that not correct? Because it's not working! From the JSTL 1.1 Spec for c:url: As a consequence, an implementation must prepend the context path to a URL that starts with a slash (e.g. /page2.jsp) so that such URLs can be properly interpreted by a client browser. So, yes, the context should be prepended. What output are you actually seeing? -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:url and context path completion
On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: Kris Schneider wrote: On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: I was sure that I had read somewhere that c:url value=/images/pluslittle.gif/ usage would automatically cause the context path to be entered into the output of c:url. Is that not correct? Because it's not working! From the JSTL 1.1 Spec for c:url: As a consequence, an implementation must prepend the context path to a URL that starts with a slash (e.g. /page2.jsp) so that such URLs can be properly interpreted by a client browser. So, yes, the context should be prepended. What output are you actually seeing? I'm seeing it produce /images/pluslittle.gif, and it completely ignores the context path. I'm using tomcat 6 and java 1.5 This wouldn't happen to be a JSP sitting in webapps/ROOT, would it? Just checking... -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:url and context path completion
On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: Kris Schneider wrote: On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: Kris Schneider wrote: On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: I was sure that I had read somewhere that c:url value=/images/pluslittle.gif/ usage would automatically cause the context path to be entered into the output of c:url. Is that not correct? Because it's not working! From the JSTL 1.1 Spec for c:url: As a consequence, an implementation must prepend the context path to a URL that starts with a slash (e.g. /page2.jsp) so that such URLs can be properly interpreted by a client browser. So, yes, the context should be prepended. What output are you actually seeing? I'm seeing it produce /images/pluslittle.gif, and it completely ignores the context path. I'm using tomcat 6 and java 1.5 This wouldn't happen to be a JSP sitting in webapps/ROOT, would it? Just checking... No, it's sitting in webapps/appname/WEB-INF/jsp/otherdir/somejsp.jsp Oh well, worth a shot. I don't have TC 6 installed to test, but maybe I'll do that later tonight. Does TC 6 come with an implementation of JSTL 1.2 or are you using JSTL 1.1? Does your app use a Servlet 2.5 or 2.4 web.xml? -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:url and context path completion
On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: Kris Schneider wrote: On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: Kris Schneider wrote: On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: Kris Schneider wrote: On 11/28/07, Trenton Adams [EMAIL PROTECTED] wrote: I was sure that I had read somewhere that c:url value=/images/pluslittle.gif/ usage would automatically cause the context path to be entered into the output of c:url. Is that not correct? Because it's not working! From the JSTL 1.1 Spec for c:url: As a consequence, an implementation must prepend the context path to a URL that starts with a slash (e.g. /page2.jsp) so that such URLs can be properly interpreted by a client browser. So, yes, the context should be prepended. What output are you actually seeing? I'm seeing it produce /images/pluslittle.gif, and it completely ignores the context path. I'm using tomcat 6 and java 1.5 This wouldn't happen to be a JSP sitting in webapps/ROOT, would it? Just checking... No, it's sitting in webapps/appname/WEB-INF/jsp/otherdir/somejsp.jsp Oh well, worth a shot. I don't have TC 6 installed to test, but maybe I'll do that later tonight. Does TC 6 come with an implementation of JSTL 1.2 or are you using JSTL 1.1? Does your app use a Servlet 2.5 or 2.4 web.xml? I tried 5.5 just now, and it has the same problem. Tomcat 6 does not come with JSTL. web.xml is using 2.3 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; I am using JSTL 1.1.2 For starters, try this: web-app xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 ... /web-app No DOCTYPE. Unless your app really needs to be 2.3-based... -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JNDI tags and accessing LDAP with Security Principal and Authentication
On 11/14/07, Hashir, Mehedi [EMAIL PROTECTED] wrote: Hi Folks , Using JNDI Tags and accessing LDAP directory. How do I supply the Security, prinicpal and credential attributes , needed to complete this call successfully. ? Is there something else I need to configure ? Is this possible with the current version of JNDI tags ? This is the code written up to now, and below is the result jsp:useBean id=exampleMap class=java.util.Hashtable/ c:set target=${exampleMap} property=Context.SECURITY_AUTHENTICATION value=simple / c:set target=${exampleMap} property=Context.SECURITY_PRINCIPAL value=cn=bacd / c:set target=${exampleMap} property=Context.SECURITY_CREDENTIALS value=xyz / Try: c:set target=${exampleMap} property=java.naming.security.authentication value=simple / c:set target=${exampleMap} property=java.naming.security.principal value=cn=bacd / c:set target=${exampleMap} property=java.naming.security.credentials value=xyz / jndi:useDirContext id=test scope=page initialFactory=com.sun.jndi.ldap.LdapCtxFactory providerUrl=ldap://ldaptest01:389; env=${exampleMap} / javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials] Thanks Mehedi -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: connection MDB DataBase
On 10/29/07, Sapp [EMAIL PROTECTED] wrote: How to connect Database (MDB) on the netbean. If you have a Netbeans question, you should probably go here: http://www.netbeans.org/community/lists/ This is a mail list for taglib questions. Thank you. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fmt:formatDate and fmt:setLocale problem
On 10/30/07, Jdev123 [EMAIL PROTECTED] wrote: Hi , Even i am facing the problem with the locale setting. I tried what ever you mentioned but all in vain if you have found any solution please help. Can you try running the test I previously posted and include your results? Create a JSP with *only* this code in it: %@ page contentType=text/plain import=javax.servlet.jsp.jstl.core.Config % %@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; % fmt:setLocale value=pl_PL/ Config locale: %= Config.find(pageContext, Config.FMT_LOCALE) % Response locale: ${pageContext.response.locale} jsp:useBean id=date class=java.util.Date/ Date: fmt:formatDate value=${date} type=date dateStyle=medium/ kschneid wrote: Per the spec, make sure fmt:setLocale is placed at the beginning of the page, or at least before any other i18n-capable formatting actions. Can you try the following: %@ page contentType=text/plain import=javax.servlet.jsp.jstl.core.Config % %@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; % fmt:setLocale value=pl_PL/ Config locale: %= Config.find(pageContext, Config.FMT_LOCALE) % Response locale: ${pageContext.response.locale} jsp:useBean id=date class=java.util.Date/ Date: fmt:formatDate value=${date} type=date dateStyle=medium/ I get: Config locale: pl_PL Response locale: pl_PL Date: 2007-06-28 If I remove fmt:setLocale, I get: Config locale: null Response locale: en_US Date: Jun 28, 2007 So it seems to be working... Quoting Java Programmer [EMAIL PROTECTED]: Hi, I have problem with using fmt:formatDate and fmt:setLocale - I use: fmt:setLocale value=pl_PL / fmt:formatDate value=${loggeduser.createDate} type=date dateStyle=MEDIUM / But my browser sends en_EN locale as prefered, so I cannot get date formated in pl_PL they are always formated with browser's en_EN one - is there any way to change this behaviour eg. NOT to take browser prefered locales and use application ones? Best regards, Adr -- 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] :-(:-(:-(:-(:-( -- View this message in context: http://www.nabble.com/fmt%3AformatDate-and-fmt%3AsetLocale-problem-tf3994397.html#a13491375 Sent from the Taglibs - User mailing list archive at Nabble.com. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fmt:formatDate and fmt:setLocale problem
On 10/30/07, Jdev123 [EMAIL PROTECTED] wrote: Hi, Thanks for the Quick response. I tried making an new page and the locale was proper as shown below.. Config locale: en_GB Response locale: en_GB Date: 30/10/2007 But when i tried implementing that in the actual page where i need , it failed to change the locale for the response although the config locale was changed as shown. Config locale: en_GB Response locale: es_UY Date: 30/10/2007 Today is Tue, 30 Oct 2007 Interesting. That seems to indicate that something else is setting the response's locale after fmt:setLocale does it. Do you use any filters in your app? Are there other tags used on the page that might set the response's locale? Kris Schneider wrote: On 10/30/07, Jdev123 [EMAIL PROTECTED] wrote: Hi , Even i am facing the problem with the locale setting. I tried what ever you mentioned but all in vain if you have found any solution please help. Can you try running the test I previously posted and include your results? Create a JSP with *only* this code in it: %@ page contentType=text/plain import=javax.servlet.jsp.jstl.core.Config % %@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; % fmt:setLocale value=pl_PL/ Config locale: %= Config.find(pageContext, Config.FMT_LOCALE) % Response locale: ${pageContext.response.locale} jsp:useBean id=date class=java.util.Date/ Date: fmt:formatDate value=${date} type=date dateStyle=medium/ kschneid wrote: Per the spec, make sure fmt:setLocale is placed at the beginning of the page, or at least before any other i18n-capable formatting actions. Can you try the following: %@ page contentType=text/plain import=javax.servlet.jsp.jstl.core.Config % %@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; % fmt:setLocale value=pl_PL/ Config locale: %= Config.find(pageContext, Config.FMT_LOCALE) % Response locale: ${pageContext.response.locale} jsp:useBean id=date class=java.util.Date/ Date: fmt:formatDate value=${date} type=date dateStyle=medium/ I get: Config locale: pl_PL Response locale: pl_PL Date: 2007-06-28 If I remove fmt:setLocale, I get: Config locale: null Response locale: en_US Date: Jun 28, 2007 So it seems to be working... Quoting Java Programmer [EMAIL PROTECTED]: Hi, I have problem with using fmt:formatDate and fmt:setLocale - I use: fmt:setLocale value=pl_PL / fmt:formatDate value=${loggeduser.createDate} type=date dateStyle=MEDIUM / But my browser sends en_EN locale as prefered, so I cannot get date formated in pl_PL they are always formated with browser's en_EN one - is there any way to change this behaviour eg. NOT to take browser prefered locales and use application ones? Best regards, Adr -- 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] :-(:-(:-(:-(:-( -- View this message in context: http://www.nabble.com/fmt%3AformatDate-and-fmt%3AsetLocale-problem-tf3994397.html#a13491375 Sent from the Taglibs - User mailing list archive at Nabble.com. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/fmt%3AformatDate-and-fmt%3AsetLocale-problem-tf3994397.html#a13492997 Sent from the Taglibs - User mailing list archive at Nabble.com. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Virtual hosting and listener servlets
On 10/24/07, T. Lamine Ba [EMAIL PROTECTED] wrote: Here it is. I use Tomcat 5.0.28. I also use the tomcat connector and apache to listen on port 80 to domain names of my websites. Each website has a virtual host configured in httpd.conf (apache) and server.xml (tomcat). The configuration works great except for one thing. The tomcat container is not able to execute my ResourceManagerListener servlet, which is a class where I initialize all my application variables. The class is referenced in the my webapp web.xml file as follows: listener listener-class servlets.ResourceManagerListener /listener-class /listener ResourceManagerListener is located under the directory webapp/WEB-INF/classes/servlets. When I do not use any virtual hosting and I reference the website from the base directory, such as http://www.mytomcatbase.com/mywebappfolder instead of http://www.mywebapp.com , then every thing works. Please advise how I can specify a listener class in web.xml after a virtual hosting configuration moves the container context. For clarification, which listener interface does ResourceManagerListener implement. I assume it would be ServletContextListener. When you say, not able to execute, what does that mean? Were exceptions thrown? Did the listener appear not to be loaded? Have you tried running on TC 5.5.x? Thx, Lamine. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Virtual hosting and listener servlets
On 10/24/07, T. Lamine Ba [EMAIL PROTECTED] wrote: -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 24, 2007 10:03 AM To: Tag Libraries Users List Subject: Re: Virtual hosting and listener servlets On 10/24/07, T. Lamine Ba [EMAIL PROTECTED] wrote: Here it is. I use Tomcat 5.0.28. I also use the tomcat connector and apache to listen on port 80 to domain names of my websites. Each website has a virtual host configured in httpd.conf (apache) and server.xml (tomcat). The configuration works great except for one thing. The tomcat container is not able to execute my ResourceManagerListener servlet, which is a class where I initialize all my application variables. The class is referenced in the my webapp web.xml file as follows: listener listener-class servlets.ResourceManagerListener /listener-class /listener ResourceManagerListener is located under the directory webapp/WEB-INF/classes/servlets. When I do not use any virtual hosting and I reference the website from the base directory, such as http://www.mytomcatbase.com/mywebappfolder instead of http://www.mywebapp.com , then every thing works. Please advise how I can specify a listener class in web.xml after a virtual hosting configuration moves the container context. For clarification, which listener interface does ResourceManagerListener implement. I assume it would be ServletContextListener. *** indeed it implements ServletContextListener When you say, not able to execute, what does that mean? Were exceptions thrown? Did the listener appear not to be loaded? *** Logs read Error ListenerStart + Context startup failed Can you provide a stack trace? Have you tried running on TC 5.5.x? *** I do not have this flexibility. I use what my hosting company provides. Thx, Lamine. As Hassan noted, your issue isn't taglib related and is more appropriate for the [EMAIL PROTECTED] list. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: overlay images retrieved from a Database
Hang on, I've got an idea that might work. I'll post back in a little bit - gotta grab some lunch! On 10/22/07, mikemjt [EMAIL PROTECTED] wrote: So is my next step dropping apache image taglib and use the classic JAVA 2d api mikemjt wrote: Hi there, I have a image of a map and want to overlay a set of images with x y coords from a database. This is my code which does not work! img:image src=/images/map_01.gif dir=generated name=map_rendered.jpg attributes=alt='A sample image' refresh=true quality=1.0 img:resize scale=100% / !--load all points to map -- c:forEach var=poimaps items=${requestScope.poimaps} img:overlay x=${poimaps.x_id} y=${poimpas.y_id} color=0xff tolerance=35 img:image src=/images/${poimaps.imageName}.gif /img:image /img:overlay /c:forEach /img:image This is the error message! javax.servlet.ServletException: Overlay must be a nested tag of Image Tag! Help would be appreciated Mike greece... -- View this message in context: http://www.nabble.com/overlay-images-retrieved-from-a-Database-tf4666946.html#a13343246 Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: overlay images retrieved from a Database
Here's an untested idea. What if you use a proxy tag to satisfy overlay's parenting constraints? You'd do something like: img:image src=/images/map_01.gif dir=generated name=map_rendered.jpg attributes=alt='A sample image' refresh=true quality=1.0 img:resize scale=100% / !--load all points to map -- c:forEach var=poimaps items=${requestScope.poimaps} imgHelper:proxy img:overlay x=${poimaps.x_id} y=${poimpas.y_id} color=0xff tolerance=35 img:image src=/images/${poimaps.imageName}.gif/ /img:overlay imgHelper:proxy /c:forEach /img:image Here's the code for the proxy tag: package com.directthought.taglibs.image; import com.mullassery.imaging.Imaging; import java.awt.image.BufferedImage; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; import javax.servlet.jsp.tagext.TryCatchFinally; import org.apache.taglibs.image.ImageHolder; public class ProxyTag extends BodyTagSupport implements TryCatchFinally, ImageHolder { private ImageHolder ancestor; public ProxyTag() { super(); } public int doStartTag() throws JspException { this.ancestor = (ImageHolder)findAncestorWithClass(this, ImageHolder.class); if (this.ancestor == null) { throw new JspException(ProxyTag could not find an ImageHolder ancestor); } return EVAL_BODY_BUFFERED; } public void doCatch(Throwable t) { // no-op } public void doFinally() { this.ancestor = null; } public BufferedImage getImage() { return this.ancestor.getImage(); } public void setImage(BufferedImage image) { this.ancestor.setImage(image); } public Imaging getImaging() { return this.ancestor.getImaging(); } } On 10/22/07, Kris Schneider [EMAIL PROTECTED] wrote: Hang on, I've got an idea that might work. I'll post back in a little bit - gotta grab some lunch! On 10/22/07, mikemjt [EMAIL PROTECTED] wrote: So is my next step dropping apache image taglib and use the classic JAVA 2d api mikemjt wrote: Hi there, I have a image of a map and want to overlay a set of images with x y coords from a database. This is my code which does not work! img:image src=/images/map_01.gif dir=generated name=map_rendered.jpg attributes=alt='A sample image' refresh=true quality=1.0 img:resize scale=100% / !--load all points to map -- c:forEach var=poimaps items=${requestScope.poimaps} img:overlay x=${poimaps.x_id} y=${poimpas.y_id} color=0xff tolerance=35 img:image src=/images/${poimaps.imageName}.gif /img:image /img:overlay /c:forEach /img:image This is the error message! javax.servlet.ServletException: Overlay must be a nested tag of Image Tag! Help would be appreciated Mike greece... -- View this message in context: http://www.nabble.com/overlay-images-retrieved-from-a-Database-tf4666946.html#a13343246 Sent from the Taglibs - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: overlay images retrieved from a Database
For better or worse, img:overlay appears to require that it's parent tag (not just an ancestor) be an instance of org.apache.taglibs.image.ImageHolder. In your case, c:forEach is the parent tag so the exception gets thrown. On 10/21/07, mikemjt [EMAIL PROTECTED] wrote: Hi there, I have a image of a map and want to overlay a set of images with x y coords from a database. This is my code which does not work! img:image src=/images/map_01.gif dir=generated name=map_rendered.jpg attributes=alt='A sample image' refresh=true quality=1.0 img:resize scale=100% / !--load all points to map -- c:forEach var=poimaps items=${requestScope.poimaps} img:overlay x=${poimaps.x_id} y=${poimpas.y_id} color=0xff tolerance=35 img:image src=/images/${poimaps.imageName}.gif /img:image /img:overlay /c:forEach /img:image This is the error message! javax.servlet.ServletException: Overlay must be a nested tag of Image Tag! Help would be appreciated Mike greece... -- View this message in context: http://www.nabble.com/overlay-images-retrieved-from-a-Database-tf4666946.html#a13331683 Sent from the Taglibs - User mailing list archive at Nabble.com. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: taglibs build error on OS X using DarwinPorts
It looks like you're referencing an older version of JspTagException. The constructor that takes a String and a Throwable was added in JSP 2.0 (J2EE 1.4). On 10/19/07, Don Oh [EMAIL PROTECTED] wrote: Hi, I'm new to this list... googling didn't help me so far. Just hoping someone on this list might be able to provide me quick help. Compiling tomcat5 on Mac OS 10.4.11, Intel Mackbook Pro using Darwin(Mac)Ports, I am getting the following error: Any ideas? ( All the tomcat dependencies including servlet23-api and servlet24-api were built successfully up to this point. JAVA_HOME env. variable was set to Mac OS JavaVM.framework path) thanks, --- --- Building jakarta-taglibs-standard-11 with target dist Error: Target org.macports.build returned: shell command cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard ant dist -Dbuild.dir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/build -Ddist.dir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/dist -Djunit.jar=/opt/local/share/java/junit.jar -Dservlet24.jar=/opt/local/share/java/servlet24-api.jar -Djsp20.jar=/opt/local/share/java/jsp2-api.jar -Dxalan.jar=/opt/local/share/java/xalan.jar returned error 1 Command output: [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/src/org/apache/taglibs/standard/tag/common/xml/XPathUtil.java:552: cannot find symbol [javac] symbol : constructor JspTagException(java.lang.String,javax.xml.transform.TransformerException) [javac] location: class javax.servlet.jsp.JspTagException [javac] throw new JspTagException(te.toString(), te); [javac] ^ [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/src/org/apache/taglibs/standard/tag/common/xml/XPathUtil.java:784: cannot find symbol [javac] symbol : constructor JspTagException(java.lang.String,javax.xml.transform.TransformerException) [javac] location: class javax.servlet.jsp.JspTagException [javac] throw new JspTagException(te.toString(), te); [javac] ^ [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/src/org/apache/taglibs/standard/tag/el/core/IfTag.java:65: cannot find symbol [javac] symbol : constructor JspTagException(java.lang.String,javax.servlet.jsp.JspException) [javac] location: class javax.servlet.jsp.JspTagException [javac] throw new JspTagException(ex.toString(), ex); [javac] ^ [javac] /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/src/org/apache/taglibs/standard/tag/el/core/WhenTag.java:63: cannot find symbol [javac] symbol : constructor JspTagException(java.lang.String,javax.servlet.jsp.JspException) [javac] location: class javax.servlet.jsp.JspTagException [javac] throw new JspTagException(ex.toString(), ex); [javac] ^ [javac] Note: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 33 errors BUILD FAILED /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_jakarta-taglibs-standard-11/work/jakarta-taglibs-standard-1.1.2-src/standard/build.xml:178: Compile failed; see the compiler error output for details. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateful form components?
On 10/12/07, lightbulb432 [EMAIL PROTECTED] wrote: What set of taglibs can I download to be able to use stateful form components (e.g. checkboxes that know whether they should be checked or not based on existing values in the domain objects, or based on the previous attempt at submitting the form)? The input library at http://jakarta.apache.org/taglibs/index.html is listed as deprecated, so I'd like to avoid it. Has this project been rolled up into another listed at this URL, or is there no way to get the use of stateful form components short of creating them yourself or using some web framework? Outside of leveraging a framework like Struts, I don't really have a suggestion, sorry. One option would be to do the binding on the client side via something like dojo or YUI... Thanks. -- View this message in context: http://www.nabble.com/Stateful-form-components--tf4611737.html#a13170007 Sent from the Taglibs - User mailing list archive at Nabble.com. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image tag lib doesn't work on Windows 2003 server?
Can you be more specific about what you mean by doesn't work? Do you get an exception? Have you tried running the JVM with -Djava.awt.headless=true? Are you using the same JDK and app server versions on both XP and Server 2003? On 9/23/07, zhou peng [EMAIL PROTECTED] wrote: Hi, We use taglibs-image, put all jar into web-inf\lib, and show image correctly on Windows XP, but when we deploy it to our Windows 2003 Server, it doesn't work, but also the example of taglibs-image example.war . Anyone can give me some advice? Thanx. Rick Zhou, 2007-9-24 -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Image tag lib doesn't work on Windows 2003 server?
If you can't change the env so that the app can create and write to that directory, I think you can try this (some of the info can be found in the docs: http://jakarta.apache.org/taglibs/sandbox/doc/image-doc/index.html). Add the following to web.xml: context-param param-nameImageServletMapping/param-name param-value/gen-image/param-value /context-param servlet servlet-nameImageServlet/servlet-name servlet-classorg.apache.taglibs.image.ImageServlet/servlet-class /servlet servlet-mapping servlet-nameImageServlet/servlet-name url-pattern/gen-image/*/url-pattern /servlet-mapping Then remove the dir attribute from the image tags. For example, if you had this: img:image src=/images/splash.jpg dir=generated name=splash-new.jpg attributes=alt='A sample image' refresh=false quality=0.8 /img:image Use this instead: img:image src=/images/splash.jpg name=splash-new.jpg attributes=alt='A sample image' refresh=false quality=0.8 /img:image This should store images in a temp dir instead of the one specified by dir. Hopefully, the app will be able to write to that dir... On 9/24/07, zhou peng [EMAIL PROTECTED] wrote: Thanx for Kirs' advice. I have checked again, we use the same JDK and app server versions, there's no exceptions in tomcat log, and images can show in localhost and lan env, but just can't show in wan. I compared the directory between localhost, lan and wan connection, and found that in wan couldn't create the generated directory, I think it because of different rights between these env? Any more advices? Rick Zhou, 2007-9-25 2007/9/24, Kris Schneider [EMAIL PROTECTED]: Can you be more specific about what you mean by doesn't work? Do you get an exception? Have you tried running the JVM with -Djava.awt.headless=true? Are you using the same JDK and app server versions on both XP and Server 2003? On 9/23/07, zhou peng [EMAIL PROTECTED] wrote: Hi, We use taglibs-image, put all jar into web-inf\lib, and show image correctly on Windows XP, but when we deploy it to our Windows 2003 Server, it doesn't work, but also the example of taglibs-image example.war . Anyone can give me some advice? Thanx. Rick Zhou, 2007-9-24 -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where to download Input libraries?
On 8/28/07, lightbulb432 [EMAIL PROTECTED] wrote: At the following link, there is no link to download the Input taglibs. Why is that? http://jakarta.apache.org/site/downloads/downloads_taglibs.html As you guess below, I'm pretty sure that taglib has never had an official release. At the following link, there are nightly builds of the Input taglibs, but only for a week... And I also see no official releases. Am I missing the actual location of the download, or is this just a sketchy and less-used taglib subproject than the other ones nicely available at the link above? http://people.apache.org/builds/jakarta-taglibs/nightly/projects/input/ Nightly builds have apparently been busted for around a year, and not just for Input. I haven't really used Input (outside of investigating the odd question for someone), so I can't comment on whether it's sketchy or less-used. Depending on what you want to do, it's possible that something more official, like Standard (JSTL), might fit your needs. You can see from the Taglibs main page that Input has been deprecated. Thanks. -- View this message in context: http://www.nabble.com/Where-to-download-Input-libraries--tf4339648.html#a12361847 Sent from the Taglibs - User mailing list archive at Nabble.com. -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error with taglib parseDate
On 8/6/07, T. Lamine Ba [EMAIL PROTECTED] wrote: Hi all, I use parseDate in webapp www.buildtrees.com as follows: *** fmt:parseDate var=birthdate value=${param.birthdate} pattern=MMM-dd- / *** It works great when I visit the site with my computers. On the other hand, some of my web visitors produce the error below: *** Exception: javax.servlet.jsp.JspException: In parseDate, value attribute can not be parsed: OCT-02-2002 Error message: In parseDate, value attribute can not be parsed: OCT-02-2002 *** I suspect the problem is browser related. Does anyone has a solution for this? I searched the internet, but I could not find anything that could help, primarily because I have not been able to reproduce the error with my computers. I had to wait for a web surfer with the wrong configuration to access the site. Browser-based locale setting could certainly cause this to fail. If you want to force the app to always use English, you should probably include the following in web.xml: context-param param-namejavax.servlet.jsp.jstl.fmt.locale/param-name param-valueen_US/param-value /context-param If you just want to change that specific tag, try the parseLocale attribute: fmt:parseDate var=birthdate value=${param.birthdate} pattern=MMM-dd- parseLocale=en_US/ All help appreciated. Lamine -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What to use as replacement for deprecated Cache-Lib?
On 8/6/07, Christian Nolte [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! I just wanted to implement a decent caching-solution and stumpled upon jakarta-chache. This seems like a very good solution but I did also see that this lib is deprecated. What should I use instead? Or do I have to implement such thing by myself? I've never used it so I can't claim it's decent, but OSCache includes a taglib: http://www.opensymphony.com/oscache/wiki/JSP%20Tags.html Best regards! Christian - -- For more than 4 generations the IT Professionals were the guardians of quality and stability in software. Before the dark times. Before Microsoft... -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFGtw+NCNjA0nfhW7wRApsZAKDVZMJM2ym/8ExpO4e46SRa0x5/cQCgxhdz COxD0mfjUoQkINkdnFBZhs8= =W0HA -END PGP SIGNATURE- -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What to use as replacement for deprecated Cache-Lib?
On 8/6/07, Christian Nolte [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kris Schneider schrieb: On 8/6/07, Christian Nolte [EMAIL PROTECTED] wrote: Hi! I just wanted to implement a decent caching-solution and stumpled upon jakarta-chache. This seems like a very good solution but I did also see that this lib is deprecated. What should I use instead? Or do I have to implement such thing by myself? I've never used it so I can't claim it's decent, but OSCache includes a taglib: Thank you very much for this information! I will look into it. Is there a specific reason why jakarta cache is deprecated? IIRC, it was never officially released. A while back, I was working on some bug fixes for some concurrency issues, but I never got them put back. Other than that, I don't believe anyone's been working on it. - -- For more than 4 generations the IT Professionals were the guardians of quality and stability in software. Before the dark times. Before Microsoft... -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFGtyAWCNjA0nfhW7wRAgOEAKCS8JbeRi+O0fPHpXhartJ8lf7doACg5WzW FQ4jYw0+oc4jsHWYSV2PGk4= =GTZR -END PGP SIGNATURE- -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jndi-taglib and scripting variables
On 7/26/07, Iikku Mattila [EMAIL PROTECTED] wrote: Hi all, I have a portal with a jsp channel in which I use the jndi-taglib. I'm trying to do a ldap-search with the portal user's userid. I get the id from elsewhere and both jx:expr value=$userid / and %=userid% print it out just nice. However, when I try jndi:search id=searchResult contextRef=ldapContext filter=uid=%=userid% searchScope=subtree /jndi:search or filter=uid=jx:expr value=$userid / things don't work the way they should. With jx:expr it says com.sun.portal.providers.jsp.jasper3.jasper.compiler.ParseException: /etc/opt/SUNWps/desktop/*/*/content.jsp(31,91) Attribute $userid has no value and with %=userid% I just get an empty searchResult. It surely must be possible to give the id as a parameter to the filter somehow? Any ideas? Try: filter='%= uid= + userid %' In other words, the scriptlet expression must appear by itself. Iikku -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI-taglib search tag returns null
On 7/24/07, Iikku Mattila [EMAIL PROTECTED] wrote: I have problems with the search tag from the JNDI-taglib. The following bit works: jndi:useDirContext id=test url=java:comp/env/ldap/portal / jndi:lookup id=foo contextRef=test name=uid=quux, ou=Staff / jndi:forEachAttribute ref=foo id=bar %=bar% br/ /jndi:forEachAttribute I neatly get all the stored information. However, when I try for example jndi:search id=baz contextRef=test filter=uid=quux searchScope=subtree/ baz ends up being null. I've tried adding values to 'attributes', different searchScopes, looking up different contexts for use, etc. What am I missing? Seems like it might be a filter thing. Try filter=(uid=quux). Iikku -- Kris Schneider mailto:[EMAIL PROTECTED] directThought http://www.directThought.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Random tag library - dynamic range
Looking at the docs (http://jakarta.apache.org/taglibs/doc/random-doc/index.html), it doesn't appear that the taglib really supports request-time attr values. Strange. Personally, I'd grab the TLD and change this: tag namenumber/name ... attribute namerange/name requiredno/required rtexprvalueno/rtexprvalue /attribute ... to this: tag namenumber/name ... attribute namerange/name requiredno/required rtexprvalueyes/rtexprvalue /attribute ... and see what happens... Quoting Eran Kalmanson [EMAIL PROTECTED]: Howdy, I've been having difficulties with the random taglib. I'm interested in getting a random number using a dynamic range. However I can't find a way to do that. I've tried c:set var=top value=43 / rand:number id=randNumber range=1-${top} / Didn't work. Syntax error. I've also tried c:set var=range value=1-43 / rand:number id=randNumber range=${range} / Didn't work either. Couldn't find anything relevant on the web. Would love some help with that. Thanks, Eran Kalmanson -- 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: XTAGS Problems with node names that begin with a leading underscore
What app server and JDK are you using? I don't have XTags installed, but I'll grab it and see what I get with Tomcat 5.5.23 and JDK 1.5.0_06. Quoting dean allen [EMAIL PROTECTED]: Hi, i have a problem with node names that begin with a leading underscore. Given the following XML : Test _page hello /_page /Test when i use follows tags into jsp page xtags:variable id=pag select=//_page / %=pag% or xtags:valueOf select=//_page / the result page don't show the relative value. Can you help me? Thank, protone -- 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: XTAGS Problems with node names that begin with a leading underscore
Seems to work for me. Here's my test: %@ page contentType=text/plain % %@ taglib prefix=xtags uri=http://jakarta.apache.org/taglibs/xtags-1.0; % xtags:parse Test _page hello /_page /Test /xtags:parse xtags:valueOf select=//_page / And the result is: hello I used xtags-20060829 (most recent build available), dom4j-1.6.1 and jaxen-1.1-beta-6 (included with dom4j). Quoting Kris Schneider [EMAIL PROTECTED]: What app server and JDK are you using? I don't have XTags installed, but I'll grab it and see what I get with Tomcat 5.5.23 and JDK 1.5.0_06. Quoting dean allen [EMAIL PROTECTED]: Hi, i have a problem with node names that begin with a leading underscore. Given the following XML : Test _page hello /_page /Test when i use follows tags into jsp page xtags:variable id=pag select=//_page / %=pag% or xtags:valueOf select=//_page / the result page don't show the relative value. Can you help me? Thank, protone -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- 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: XTAGS Problems with node names that begin with a leading underscore
That's odd. Are you also using jaxen-1.1-beta-6 (it comes with the dom4j dist)? Quoting dean allen [EMAIL PROTECTED]: Hi Kris , i'm using jdk1.5 and Tomcat 5.5.17. I have used xtags-20060829 , dom4j-1.6.1, but don't work. This is the error log: 10-lug-2007 22.16.43 org.apache.catalina.core.StandardWrapperValve invoke GRAVE: Servlet.service() for servlet jsp threw exception org.dom4j.InvalidXPathException: Invalid XPath expression: '//_page'. Caused by: org.jaxen.dom4j.DocumentNavigator.getInstance()Lorg/jaxen/Navigator; at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:362) at org.dom4j.xpath.DefaultXPath.init(DefaultXPath.java:59) ... I have resolved the problem stripping out every occurence of _tagname from xml output. Dean Allen - Messaggio originale - Da: Kris Schneider [EMAIL PROTECTED] A: Tag Libraries Users List taglibs-user@jakarta.apache.org Inviato: Martedì 10 luglio 2007, 15:27:32 Oggetto: Re: XTAGS Problems with node names that begin with a leading underscore Seems to work for me. Here's my test: %@ page contentType=text/plain % %@ taglib prefix=xtags uri=http://jakarta.apache.org/taglibs/xtags-1.0;; % xtags:parse Test _page hello /_page /Test /xtags:parse xtags:valueOf select=//_page / And the result is: hello I used xtags-20060829 (most recent build available), dom4j-1.6.1 and jaxen-1.1-beta-6 (included with dom4j). Quoting Kris Schneider [EMAIL PROTECTED]: What app server and JDK are you using? I don't have XTags installed, but I'll grab it and see what I get with Tomcat 5.5.23 and JDK 1.5.0_06. Quoting dean allen [EMAIL PROTECTED]: Hi, i have a problem with node names that begin with a leading underscore. Given the following XML : Test _page hello /_page /Test when i use follows tags into jsp page xtags:variable id=pag select=//_page / %=pag% or xtags:valueOf select=//_page / the result page don't show the relative value. Can you help me? Thank, protone -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- 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] ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html -- 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: Nested tag in attribute value
Quoting Eric Haszlakiewicz [EMAIL PROTECTED]: On Tue, Jul 03, 2007 at 09:59:59AM -0400, Kris Schneider wrote: As you've discovered, embedding one tag in the attribute value of another tag is illegal - even if you had gotten the quotes right ;-). You would need to do something like: bean:define id=categoryId name=category property=id/ mt:clink url='%= /categoryEvent.do?event=editid= + id %'Edit/mt:clink I think. It's been awhile since I've been down that road... In a more general sense, you can capture the output of anything with the c:set tag: c:set var=somevarlalalamy:tag/ other:tag/ etc... /c:set And then just use ${somevar} whereever you need the value. (no need for scriptlets either) The original post states JSP 1.1. Even JSTL 1.0 requires JSP 1.2. eric -- 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: fmt:formatDate and fmt:setLocale problem
Per the spec, make sure fmt:setLocale is placed at the beginning of the page, or at least before any other i18n-capable formatting actions. Can you try the following: %@ page contentType=text/plain import=javax.servlet.jsp.jstl.core.Config % %@ taglib prefix=fmt uri=http://java.sun.com/jsp/jstl/fmt; % fmt:setLocale value=pl_PL/ Config locale: %= Config.find(pageContext, Config.FMT_LOCALE) % Response locale: ${pageContext.response.locale} jsp:useBean id=date class=java.util.Date/ Date: fmt:formatDate value=${date} type=date dateStyle=medium/ I get: Config locale: pl_PL Response locale: pl_PL Date: 2007-06-28 If I remove fmt:setLocale, I get: Config locale: null Response locale: en_US Date: Jun 28, 2007 So it seems to be working... Quoting Java Programmer [EMAIL PROTECTED]: Hi, I have problem with using fmt:formatDate and fmt:setLocale - I use: fmt:setLocale value=pl_PL / fmt:formatDate value=${loggeduser.createDate} type=date dateStyle=MEDIUM / But my browser sends en_EN locale as prefered, so I cannot get date formated in pl_PL they are always formated with browser's en_EN one - is there any way to change this behaviour eg. NOT to take browser prefered locales and use application ones? Best regards, Adr -- 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: Resource Bundle Problem (sometimes)
Quoting Marius Botha [EMAIL PROTECTED]: Hi there, I have my own tag (extending BodyTagSupport) in which I do the following: code ResourceBundle resources = ResourceBundle.getBundle(application); out.print(resources.getString(key)); /code This works great ... most of the time. However, the moment I put this tag into another tag that I wrote (a Data Table Tag - extending LoopTagSupport) I get the following exception(below). For some reason it seems to find the application.properties resource file when my tag is on its own somewhere on the JSP, but when I try to use it in another tag, it doesn't work. Any ideas? Much appreciated. Marius Botha Exception: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key java.util.ResourceBundle.getObject(ResourceBundle.java:326) java.util.ResourceBundle.getString(ResourceBundle.java:286) com.workpool.struts.component.html.MessageTag.doEndTag(MessageTag.java:32) The stack trace seems to indicate that the property file is located just fine, but that the file does not contain a key called key. If the property file could not be located, ResourceBundle.getBundle() should be throwning the exception, not ResourceBundle.getString(). -- 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: Resource Bundle Problem (sometimes)
Quoting Marius Botha [EMAIL PROTECTED]: Thanks for the quick response. It seems like it could actually be the setter method that is the culprit rather than the resources.getString(key));. If I do System.outs on key (see below) I get the correct value every time I use the tag on its own in a JSP (i.e. both key1 and key2 has a value), but the moment I use it in my other tag the second value is null/empty. I think it's got something to do with scope maybe ... but unsure what else to do as my other tags work fine it is just this one... public void setKey(String key) throws JspException { System.out.println(key1=+key); this.key = (String)ExpressionEvaluatorManager.evaluate(key, key, String.class, this, super.pageContext); System.out.println(key2=+this.key); } Why are you passing super.pageContext instead of just pageContext? Thanks again, much appreciated. -Original Message- Kris Schneider [EMAIL PROTECTED] wrote: The stack trace seems to indicate that the property file is located just fine, but that the file does not contain a key called key. If the property file could not be located, ResourceBundle.getBundle() should be throwning the exception, not ResourceBundle.getString(). -Original Message- From: Marius Botha [*mailto:[EMAIL PROTECTED][EMAIL PROTECTED]] Sent: 26 June 2007 03:40 To: taglibs-user@jakarta.apache.org Subject: Resource Bundle Problem (sometimes) Hi there, I have my own tag (extending BodyTagSupport) in which I do the following: code ResourceBundle resources = ResourceBundle.getBundle(application); out.print(resources.getString(key)); /code This works great ... most of the time. However, the moment I put this tag into another tag that I wrote (a Data Table Tag - extending LoopTagSupport) I get the following exception(below). For some reason it seems to find the application.properties resource file when my tag is on its own somewhere on the JSP, but when I try to use it in another tag, it doesn't work. Any ideas? Much appreciated. Marius Botha Exception: java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key java.util.ResourceBundle.getObject(ResourceBundle.java:326) java.util.ResourceBundle.getString(ResourceBundle.java:286) com.workpool.struts.component.html.MessageTag.doEndTag(MessageTag.java:32) -- 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: Is there a recent release of taglibs standard?
Quoting Klotz, Leigh [EMAIL PROTECTED]: In trackng down a problem that turned out to be bugs 30068 and 41481, I have become confused. I cannot find Taglibs jstl.jar and standard.jar or releases that contain the fix, which shows as fixed in December 2006. So, now I'm trying to track down where the current release of Apache Jakarta taglibs is kept, and indeed whether the project is still being maintained. Details: - In http://issues.apache.org/bugzilla/show_bug.cgi?id=30068 there is a one-line fix to a bug involving $ variables inside x:forEach. The downloads off http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html lead eventually to http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi and finally to http://apache.cs.utah.edu/jakarta/taglibs/standard/binaries/jakarta-tagl ibs-standard-1.1.2.tar.gz which do not contain this fix. In http://issues.apache.org/bugzilla/show_bug.cgi?id=41481 (marked as dup of 30068) there is a hyerlink to http://people.apache.org/~bayard/standard-1.1/ with jar files containing the fix from 30068, along with a comment that http://people.apache.org/builds/jakarta-taglibs/nightly/projects/ nightly builds have been broken since August 29, 2006 (which still seems the case), and since this predates the 12/2006 fix date, the nightly doesn't include the fix, either. Confused Questions: Is Jakarta Taglibs Standard still being developed? Yes, but there hasn't been much activity lately. Is there a release planned that incorporates the existing bug fixes? You might be interested in this page: http://wiki.apache.org/jakarta-taglibs/Standard_1%2e1%2e3 We (taglibs-dev) have talked on and off about pulling things together for a new release, but there isn't a firm schedule in place. Am I looking in the wrong spot for downloads? It certainly looks like the nightly builds are busted, and apparently have been for quite some time. It also looks like the page for released builds has issues: http://jakarta.apache.org/site/downloads/index.html#Release%20Builds You can always try: http://www.apache.org/dist/jakarta/taglibs/standard/ but that doesn't make use of the mirrors. Are people using Taglibs 1.1.2 (or a later version) in production software, and if so, are they building from source? I'm using (and have used) Standard 1.1.2 in production. I'm using the distributed JAR files. If so, which source and where is the definitive location? Thank you, Leigh. -- 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: Alternatives to req:isUserInRole
Quoting Antonio Petrelli [EMAIL PROTECTED]: 2007/6/8, Kris Schneider [EMAIL PROTECTED]: I'm not aware of one. However, it would be pretty easy to create an EL function to take its place. What version of JSP do you need to use? If you don't know that, which app server and version do you need to use? JSP 2.0, Servlet 2.4, why? Um, all the better to help you, why else? ;-) As of JSP 2.0, you can create EL functions that map to public static Java methods. If you'd been using an older version of JSP, this option wouldn't be available. If you're not familiar with how to get that set up, post back and I'll provide more details. Antonio -- 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: Alternatives to req:isUserInRole
Quoting Antonio Petrelli [EMAIL PROTECTED]: 2007/6/8, Kris Schneider [EMAIL PROTECTED]: JSP 2.0, Servlet 2.4, why? Um, all the better to help you, why else? ;-) Yes, that's obvious, thanks :-) As of JSP 2.0, you can create EL functions that map to public static Java methods. If you'd been using an older version of JSP, this option wouldn't be available. If you're not familiar with how to get that set up, post back and I'll provide more details. But HttpServletRequest.isUserInRole is not static... True, but I don't think I implied that it was. You would write your own utility method that would be exposed as an EL function: public class Functions { public static boolean isUserInRole(HttpServletRequest req, String role) { return req.isUserInRole(role); } } Antonio -- 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: listeners and virtual hosts
Quoting T. Lamine Ba [EMAIL PROTECTED]: Hi Kris, Indeed, I am referring to the class stored under folder WEB-INF/classes. web.xml refers to the class in question through the tag listener. I am not able to retrieve the attributes defined in that class when I setup a virtual host. On the other hand, it works fine when I use the Tomcat default host. Are any exceptions being thrown? Lamine. -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 06, 2007 1:56 PM To: Tag Libraries Users List Subject: Re: listeners and virtual hosts Quoting T. Lamine Ba [EMAIL PROTECTED]: Hi all, I have Apache connected to Tomcat 5.0.28 on a linux server. I have setup virtual hosts in my tomcat server.xml config file specifying a domain name for each webapp that I host. Problem: The tomcat container cannot find the listener classes, such as ResourceManagerListerner where I specify all my application parameters. By listener classes, do you mean classes you've specified in listener elements within web.xml? Normally, those would appear either in WEB-INF/classes or in JAR files in WEB-INF/lib, just like any other classes needed by your app. If that's not what you mean, then please provide more info about your problem. What, exactly, is the error you're seeing? Can someone give me a configuration tip to solve this problem. Thx, Lamine. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- 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: listeners and virtual hosts
Quoting T. Lamine Ba [EMAIL PROTECTED]: Hi all, I have Apache connected to Tomcat 5.0.28 on a linux server. I have setup virtual hosts in my tomcat server.xml config file specifying a domain name for each webapp that I host. Problem: The tomcat container cannot find the listener classes, such as ResourceManagerListerner where I specify all my application parameters. By listener classes, do you mean classes you've specified in listener elements within web.xml? Normally, those would appear either in WEB-INF/classes or in JAR files in WEB-INF/lib, just like any other classes needed by your app. If that's not what you mean, then please provide more info about your problem. What, exactly, is the error you're seeing? Can someone give me a configuration tip to solve this problem. Thx, Lamine. -- 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: jakarta input taglib libraries
Stephen Ince wrote: I am trying to download 1.2 taglib-input but I only see 1.0 on the jakarata site. I am missing something? Does taglib-input 1.2 support EL expression? e.g. can I do the following. input:radio name=durationType[${counter}]} value=count default=${durationType} / Any taglib attribute that's an rtexpr will work with EL expressions in a JSP 2.0 (or later) container - like Tomcat 5.5. This is due to the fact that EL evaluation was moved into the container as of JSP 2.0. I'm pretty sure the Input taglib falls into that category, but it should be really easy to test ;-). BTW, I don't think that the Input taglib has ever been officially released, so I'm not sure what 1.2 taglib-input but I only see 1.0 means. This is where the nightly builds live: http://people.apache.org/builds/jakarta-taglibs/nightly/projects/input/ Steve -- 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: jakarta input taglib libraries
Stephen Ince wrote: Kris, Thanx for your response. The online documentation (http://jakarta.apache.org/taglibs/doc/input-doc/index.html) taglib input referes to 1.2 and downloadadble version is only 1.0. Is it possible to download 1.2 from cvs? I am using Tomcat 4.1.31. I guest this wont work but I do use the El expression stuff in struts 1.3. If you're using TC 4.1 (JSP 1.2), then you cannot use the EL with rtexpr attributes. For JSP 1.2, EL evaluation has to be handled explicitly by the taglib. This is what the Struts EL taglib does (as well as Standard 1.0). I see what you mean WRT to the docs stating Version: 1.2, but AFAIK you can only download one of the nightly builds from the link I provided. I see that the tlibversion element in the TLD is set to 1.0, so I think that's as recent as you can get: http://svn.apache.org/viewvc/jakarta/taglibs/proper/input/trunk/conf/input.tld?view=markup Steve - Original Message - From: Kris Schneider [EMAIL PROTECTED] To: Tag Libraries Users List taglibs-user@jakarta.apache.org Sent: Wednesday, June 06, 2007 7:27 PM Subject: Re: jakarta input taglib libraries Stephen Ince wrote: I am trying to download 1.2 taglib-input but I only see 1.0 on the jakarata site. I am missing something? Does taglib-input 1.2 support EL expression? e.g. can I do the following. input:radio name=durationType[${counter}]} value=count default=${durationType} / Any taglib attribute that's an rtexpr will work with EL expressions in a JSP 2.0 (or later) container - like Tomcat 5.5. This is due to the fact that EL evaluation was moved into the container as of JSP 2.0. I'm pretty sure the Input taglib falls into that category, but it should be really easy to test ;-). BTW, I don't think that the Input taglib has ever been officially released, so I'm not sure what 1.2 taglib-input but I only see 1.0 means. This is where the nightly builds live: http://people.apache.org/builds/jakarta-taglibs/nightly/projects/input/ Steve -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- 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: I'm trying to write a Tag Library Descriptor for Jakarta Session Tag library
The Session taglib (http://jakarta.apache.org/taglibs/doc/session-doc/intro.html) comes with its own TLD. BCEL (http://jakarta.apache.org/bcel/index.html) is something completely different. Quoting hk [EMAIL PROTECTED]: I failed and got a message saying unable to Initialize TldLocationCache. 1. I had put the Session Tag Library, which is called bcel-5.2.jar, in the /WEB-INF/lib. 2. added the taglib to the web.xml. taglib taglib-urihttp://jakarta.apache.org/taglibs/session-1.0/taglib-uri taglib-location/WEB-INF/session.tld/taglib-location /taglib 3. had written a session.tld file like below. !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc. //DTD JSP Tag Library 1.1//EN web-jsptaglib_1_1.dtd taglib tlib-version1.0/tlib-version jsp-version1.1/jsp-version short-nameSession Tag Library/short-name urihttp://jakarta.apache.org/taglibs/session-1.0/uri description This tag library contains session tags. /description tag namesession/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag nameisNew/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag nameinvalidate/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag namemaxInactiveInterval/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag nameattribute/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag nameattributes/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag nameequalsAttribute/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag nameexistsAttribute/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag nameremoveAttribute/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag namesetAttribute/name tag-class/WEB-INF/lib/bcel-5.2.jar/tag-class /tag tag /taglib -- View this message in context: http://www.nabble.com/I%27m-trying-to-write-a-Tag-Library-Descriptor-for-Jakarta-Session-Tag-library-tf3800205.html#a10751684 Sent from the Taglibs - User mailing list archive at Nabble.com. - 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 x:parse outputs data
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
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
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
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: Read image from database
Zilberstein Yuval wrote: Hello, Can anyone tell me how do I read an image from a Blob field in the database? Not sure how this applies to taglibs, but you could look at: http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/ImageIO.html#read(java.io.InputStream) TX YuvalZ -- 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: Read image from database
Don Albertson wrote: Zilberstein Yuval wrote: Hello, Can anyone tell me how do I read an image from a Blob field in the database? TX YuvalZ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I haven't put any of this into tags but My experience is limited to our Oracle system. I created two classes: One wraps the Oracle implementation code and avoids the need to import oracle.sql.BLOB; import oracle.jdbc.OracleResultSet; in places that are isolated from driver implementation details Another converts the BLOB's to and from Image and byte[] so I can display them. For the web side, I adapted a servlet to display the image using this fragment: byte[] imageData = image.getImageBytes(); if ( imageData != null imageData.length 0){ response.setContentType(image/jpeg); ServletOutputStream sos = response.getOutputStream(); sos.write(imageData); } I only save a thumbnail in the database as a BLOB so the thumbnail is the only image being returned in the response stream. If you're just serving the images out the database then there's certainly no need to create an intermediate Image (like my first reply) - just grab the byte[] and serve it with the proper content type. If the images are unlikely to change, I'd recommend also setting response headers so that the client knows it's OK to cache the images and can avoid making additional requests for them. -- 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: Read image from database
Don Albertson wrote: Kris Schneider wrote: Don Albertson wrote: Zilberstein Yuval wrote: Hello, Can anyone tell me how do I read an image from a Blob field in the database? TX YuvalZ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I haven't put any of this into tags but My experience is limited to our Oracle system. I created two classes: One wraps the Oracle implementation code and avoids the need to import oracle.sql.BLOB; import oracle.jdbc.OracleResultSet; in places that are isolated from driver implementation details Another converts the BLOB's to and from Image and byte[] so I can display them. For the web side, I adapted a servlet to display the image using this fragment: byte[] imageData = image.getImageBytes(); if ( imageData != null imageData.length 0){ response.setContentType(image/jpeg); ServletOutputStream sos = response.getOutputStream(); sos.write(imageData); } I only save a thumbnail in the database as a BLOB so the thumbnail is the only image being returned in the response stream. If you're just serving the images out the database then there's certainly no need to create an intermediate Image (like my first reply) - just grab the byte[] and serve it with the proper content type. If the images are unlikely to change, I'd recommend also setting response headers so that the client knows it's OK to cache the images and can avoid making additional requests for them. The variable image isn't an Image, it's an instance of a class that uses a BLOB and return it either as an Image or byte[]. In this case, no Image is ever created. To the servlet, image is an interface. I got that. My first response in this thread included an example of creating a BufferedImage, which is what I was referring to. -- 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: Read image from database
Vikram Reddy wrote: I think this should work : InputStream input = null; BufferedInputStream stream = null; BLOB blob = null; PrintWriter output = response.getWriter(); if (res.next()) { blob = ( (OracleResultSet) rs).getBLOB(COLUMN_NAME); input = blob.getBinaryStream(); stream = new BufferedInputStream(input); int length = -1; while ((length = stream.read()) != -1) { output.write(length); } } /* flush the contents to the output */ output.flush(); That's pretty close to the approach that Don posted earlier. Couple of comments about the code: The standard ResultSet supports both getBlob(int i) and getBlob(String colName). The standard Blob supports getBinaryStream(), as well as getBytes(long pos, int length). I don't see a need to use Oracle-specific APIs. Not to be picky, but why would you assign the result of BufferedInputStream.read() to a var called length? It's just the next byte of data. Just noticed that you're also reading from an InputStream and writing to a Writer. I'd recommend using ServletResponse.getOutputStream() instead. On 4/11/07, Zilberstein Yuval [EMAIL PROTECTED] wrote: Hello, Can anyone tell me how do I read an image from a Blob field in the database? TX YuvalZ -- 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: doubt in installing tag libraries
annamalai muthiah wrote: hi, i need to clarify the thing that how to and where to install tag libraries in my system...could anybody help me? The basics start with placing any required JAR files into the WEB-INF/lib directory of your web app. Is there a specific area where you're having problems? -- 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: dumping XML document
Kralidis,Tom [Burlington] wrote: -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: 03 January, 2007 10:40 AM To: Tag Libraries Users List Subject: Re: dumping XML document Kralidis,Tom [Burlington] wrote: Hi, Using tomcat 6.0.0, I am using the following fragment to fetch a remote XML document: c:catch var=caught c:import url=${param.url} varReader=xmlSource x:parse var=doc xml=${xmlSource} scope=page / /c:import /c:catch Using x:out select=$doc/./ allows for fetching of values of elements / attributes as expected. I have encountered a situation where I would like to fetch and store the entire document in a database. Trying x:out select$doc/ outputs the entire XML document without the element names, etc. (i.e. only the content within the elements / attributes). Any idea on what's the best way to achieve this? Some questions: Do you always want to store the entire doc or only under certain conditions? The page is built to respond to a certain operation, so always. It seems like the simplest thing to do would be (ignoring exception handling): c:import url=${param.url} var=doc/ %-- store ${doc} in database --% x:parse doc=${doc} var=parsedDoc/ How do you want to store the doc? For example, as a CLOB or something else? Quite simply as a text string (i.e. PostgreSQL text type). For storing ${doc} in the database, you could use the JSTL SQL actions, but it might be better to just create your own tag to handle it. -- 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: dumping XML document
Kralidis,Tom [Burlington] wrote: Hi, Using tomcat 6.0.0, I am using the following fragment to fetch a remote XML document: c:catch var=caught c:import url=${param.url} varReader=xmlSource x:parse var=doc xml=${xmlSource} scope=page / /c:import /c:catch Using x:out select=$doc/./ allows for fetching of values of elements / attributes as expected. I have encountered a situation where I would like to fetch and store the entire document in a database. Trying x:out select$doc/ outputs the entire XML document without the element names, etc. (i.e. only the content within the elements / attributes). Any idea on what's the best way to achieve this? Some questions: Do you always want to store the entire doc or only under certain conditions? How do you want to store the doc? For example, as a CLOB or something else? Thanks ..Tom = Tom Kralidis Senior Systems Scientist Environment Canada Tel: +01-905-336-4409 http://www.ec.gc.ca/ -- 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: Netbeans Release 3.6
T. Lamine Ba wrote: Hi all, I need to re-install an old webapp running on netbeans 3.6 The release (netbeans 3.6) is not available on netbeans website anymore. Can anyone point me to a site that has it? http://www.netbeans.info/downloads/dev.php Thanks, Lamine. -- 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: Usin JSTL from jakarta with tomcat and the new web.xml descriptors
Alexander Shopov wrote: Hi guys, I am trying to use the jakarta JSTL implementation for a project that employs tomcat and the new web.xml descriptors. After reading the documentation, FAQ, searching google ant the mail list I still do not get is, so I am asking for some help. Now onto the real config: I am using tomcat: Apache Tomcat/5.5.20 I have downloaded Standard Taglib version 1.1.2 from here: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Then I read the documentation provided here: http://jakarta.apache.org/taglibs/binarydist.html And realized that after copying the *tld and *jar files in their corresponding places - I have no way to describe them in web.xml for its scheme is here: http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd and there is no way to add a taglib declaration. You don't need to do anything to web.xml and you don't need the TLD files, they're already contained in standard.jar. Just dump the JAR files in WEB-INF/lib. I saw that for example struts tags are repackaged in *jar files that have a special META-INF directory with a tld subdirectory. I have read Appendix A of JavaServer Pages™ Standard Tag Library specification from Sun but still do not get it - after copying *tlds and *jars - what is the next step to use the tags in XML JSP pages. (This one came from here: http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions) There are a couple ways to use taglibs in JSP document (XML syntax). Here's one using jsp:root: jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; xmlns:c=http://java.sun.com/jsp/jstl/core; version=2.0 ... /jsp:root Can someone help me - I am stuck. Kind regards: al_shopov -- 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 problem
) at java.lang.Thread.run(Thread.java:595) Can you say me What's happen? Thanks in advance. -- 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: List manipulation
Mohsen Saboorian wrote: I wonder if there is any support for List manipulation in JSTL. I want to initialize an ArrayList with something like c:set var=${myList[2]} value=123445 /, but this gives me error (suppose that myList is already put into pageContext). Unfortunately, that sort of thing isn't possible with JSTL. If you look at the definition of the c:set tag, you'll see that the var attribute cannot use a request-time value. In other words, it can only use a string literal. Probably the best thing to do would be to create an EL function for this sort of thing. See the JSP 2.0 spec section JSP.2.6 Functions. Thanks. -- 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: EL expressions not being evaluated..
maya wrote: oh brother.. this means I would have to upgrade to sdk 1.5 from 1.4 (Tomcat 5.5 requires 1.5.. it might not be a bad idea, though, b/c I also want to start playing with NetBeans.. but have been reluctant to upgrade everything...:) TC 5.5 should work just fine with JDK 1.4. Make sure to download the apache-tomcat-[version]-compat.zip file and install it after the base distro. ok, many thanks to everyone for your help.. Rashmi Rubdi wrote: Set up a fresh install of the latest Tomcat on the side with the correct web.xml entry, and put a test jsp page in it with a simple EL expression and see if it evaluates. I have apache-tomcat-5.5.12 and a different set of jar files under apache-tomcat-5.5.12\common\lib : commons-el.jar jasper-compiler-jdt.jar jasper-compiler.jar jasper-runtime.jar jsp-api.jar jstl.jar naming-factory-dbcp.jar naming-factory.jar naming-resources.jar serializer.jar servlet-api.jar standard.jar xalan.jar maya [EMAIL PROTECTED] wrote: Kris Schneider wrote: maya wrote: again, thank you all very much.. as mentioned, I have Tomcat 5.0.27, which comes with the following (as specified in release-notes.txt that comes with it): * commons-collections*.jar (Commons Collections 2.1 or later) * commons-dbcp.jar (Commons DBCP 1.1 or later) * commons-el.jar (Commons Expression Language 1.0) * commons-logging-api.jar (Commons Logging API 1.0.3 or later) * commons-pool.jar (Commons Pool 1.1 or later) * jasper-compiler.jar (Jasper 2 Compiler) * jasper-runtime.jar (Jasper 2 Runtime) * jsp-api.jar (JSP 2.0 API) * commons-el.jar (JSP 2.0 Expression Language) * naming-common.jar (JNDI Context implementation) * naming-factory.jar (JNDI object factories for J2EE ENC support) * naming-resources.jar (JNDI DirContext implementations) * servlet-api.jar (Servlet 2.4 API) this means my EL expressions should evaluate, right? Don't worry about that stuff, focus on your app. The first thing to do is to make sure you're using a Servlet 2.4 web.xml. It should look something like this: 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 ... If you're using a Servlet 2.3 web.xml, then EL will be ignored by default. thank you very much.. I put what you posted in my web.xml (in lieu of what I had there previously (and what I have in all web.xml's in Tomcat), namely PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; I put the code you posted in both the web.xml for the particular webapp and in conf/web.xml.. but EL expressions are still not evaluating.. this is how a JSP with EL prints in the browser (IE FF..) Request Method: ${pageContext.request.method} Request Protocol: ${pageContext.request.protocol} Context Path: ${pageContext.request.contextPath} Remote Host: ${pageContext.request.remoteHost} Secure: ${pageContext.request.secure} Cookies: ${c.name}: ${c.value} Headers: ${h.key}: ${value} thanks again -- 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: EL expressions not being evaluated..
maya wrote: again, thank you all very much.. as mentioned, I have Tomcat 5.0.27, which comes with the following (as specified in release-notes.txt that comes with it): * commons-collections*.jar (Commons Collections 2.1 or later) * commons-dbcp.jar (Commons DBCP 1.1 or later) * commons-el.jar (Commons Expression Language 1.0) * commons-logging-api.jar (Commons Logging API 1.0.3 or later) * commons-pool.jar (Commons Pool 1.1 or later) * jasper-compiler.jar (Jasper 2 Compiler) * jasper-runtime.jar (Jasper 2 Runtime) * jsp-api.jar (JSP 2.0 API) * commons-el.jar (JSP 2.0 Expression Language) * naming-common.jar (JNDI Context implementation) * naming-factory.jar (JNDI object factories for J2EE ENC support) * naming-resources.jar (JNDI DirContext implementations) * servlet-api.jar (Servlet 2.4 API) this means my EL expressions should evaluate, right? Don't worry about that stuff, focus on your app. The first thing to do is to make sure you're using a Servlet 2.4 web.xml. It should look something like this: ?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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 ... /web-app If you're using a Servlet 2.3 web.xml, then EL will be ignored by default. thank you again.. Andrés Florit wrote: With JSP 2.0 you can use EL in all the page because it is part of the specification. Whit JSP 1.2 you can only use it with JSTL tags and customs tags (this last one I'm not very sure). EL is evaluated before the JSP is converted to a servlet, so I don't think you can use it in a servlet. Here's a good link about the differences between JSP 1.2 and 2.0. http://www.onjava.com/pub/a/onjava/2003/11/05/jsp.html Andrés On 9/12/06, maya [EMAIL PROTECTED] wrote: thank you all very much for your responses.. will have to check everything you guys say tonight at home (off the top of my head, I know I have Tomcat 5.0.27 and, as far as I know, JSP 2.0; Servlet 2.4 specif (this I know for sure, I looked it up when downloaded JSTL..) one of the respondents seemed to be implying you can only use EL with JSTL, I don't suppose I understood right, since I assume it can also be used with custom tags and beans.. again, thank you very much.. -m Rashmi Rubdi wrote: Behind the scenes JSPs are Servlets . I had the same problem as maya is facing and after following the instructions here: http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions , and making sure that there was no version mismatch between the .tld files and the URIs and getting the correct versions of the JAR files solved the problem. -Rashmi Andrés Florit [EMAIL PROTECTED] wrote: Expression Language (EL) is part of the JSP 2.0 specification. If I'm not wrong it has anything to do with servlets. If you use JSP 1.2 you have to import the JSTL libraries. I think that Tomcat 5 implemnts JSP 2.0. Sorry my english. Andrés On 9/12/06, Rahul Akolkar wrote: On 9/11/06, maya wrote: I can't get my EL expressions to evaluate to what they're supposed to... they print verbatim, in both IE and FF, like for example: Server Name: ${pageContext.request.serverName} Server Port: ${pageContext.request.serverPort} Remote Address: ${pageContext.request.remoteAddr} Remote Host: ${pageContext.request.remoteHost} or this in a bean: Name retrieved from JavaBean has the value of: ${param.name}. anything else I've tried to do w/EL it always prints like this in browser.. why is this.. (running on Tomcat 5, everything pretty standard..) thank you.. http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions -Rahul -- 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: uri question..
maya wrote: hi, I have been studying taglibs and beans for days now, and am still confused about some things, but for now a simple question (I hope..) re uri: let's take JSTL.. the jstl.jar for my app is here.. /WEB-INF/lib yet the uri for it in taglib directive in JSP (and in uri tag in tld) is http://java.sun.com/jsp/jstl/core how does the container find the classes in /WEB-INF/lib/jstl.jar when the uri points to an outside url? (and the classes are not at this url either..;) hope this question makes sense.. in oreilly (JSP, 3rd ed, ch7) it says the 'uri' attr in taglib directive in JSP is there to find the class or tag file for each custom action. Then in the very next sentence it says, the attribute contains a string the container uses to locate the TLD for the library.. but it points to a uri for the classes, right? (or tag files..) not the tld.. (and come to think of it, why is this necessary at all, since the tag element in the tld always has a reference to the class (like the web.xml for servlets always contains a ref to the servlet class..) and if using tag files like this: tag-file ... path/WEB-INF/tags/mytags/copyright.tag/path /tag-file so, what exactly is the point of the uri and what DOES it point to really? thank you.. -m The JSP 2.0 spec describes the uri attribute like this: Either an absolute URI or a relative URI specification that uniquely identifies the tag library descriptor associated with this prefix. There are a couple of things to take from that: 1) it's an identifier (not a location); 2) it identifies a TLD (not classes - all classes should reside in WEB-INF/classes or in JAR files in WEB-INF/lib). Although it's common to use a URL for the value of the uri attribute, it's really nothing more than an identifier. Think of it as a key in a map where the map values are TLDs. -- 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: Is it possible to count number of XML nodes in a node-set with JSTL XML tags?
Rashmi Rubdi wrote: I searched for a solution for this but couldn't find an answer. I'm trying to count the number of book nodes from the xml below: ?xml version=1.0 encoding=UTF-8? books book isbn=212112Book Title 1/book book isbn=212313Book Title 2/book book isbn=343444Book Title 3/book book isbn=343424Book Title 4/book book isbn=656433Book Title 5/book /books I tried using XPath's count function, inside the JSP page, but it gives 0 instead of 5 - (the number of book nodes) c:import url=books.xml var=xml charEncoding=UTF-8 / x:parse doc=${xml} var=xml_doc / x:out select=count($xml_doc/books/book)/ Is it possible to obtain the count of a node set inside a JSP or do I have to first transform the source XML into another XML which obtains the count and then read the count from the second XML file? Hm, this works though (Standard 1.1.2): c:import url=books.xml var=xml charEncoding=UTF-8 / x:parse doc=${xml} var=xml_doc / x:set var=book select=$xml_doc/books/book / x:out select=count($book)/ -Rashmi -- 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: Is it possible to count number of XML nodes in a node-set with JSTL XML tags?
Rashmi Rubdi wrote: Thank you for the solution I never thought of that. I think I could use what you have suggested in cases where I transform the xml with jstl and just need the count of certain node sets. I tried XTags, and it has a rich set of XPath capabilities, I was able to do something more complex like this xtags:valueOf select=substring(/Books/Book[${item_position}]/BookTitle, 0, 50) / inside the JSP I wonder if one (JSTL XML Tags) is better than the other(XTags) performance wise, but may be they are just different tools with their own purpose. I'm not sure that XTags was ever officially released. I assume you're using one of the nightly builds. The Standard taglib is an implementation of JSTL which has been officially released for both JSTL 1.0 and JSTL 1.1. Your original code actually appears to work with Standard 1.0.6 (JSTL 1.0). To support XPath, Standard 1.0 uses Jaxen/SAXPath while Standard 1.1 uses Xalan. It's likely there's a bug in how Standard 1.1 is using Xalan to do its XPath evaluation. I believe XTags uses dom4j. Kris Schneider [EMAIL PROTECTED] wrote: Rashmi Rubdi wrote: I searched for a solution for this but couldn't find an answer. I'm trying to count the number of book nodes from the xml below: Book Title 1 Book Title 2 Book Title 3 Book Title 4 Book Title 5 I tried using XPath's count function, inside the JSP page, but it gives 0 instead of 5 - (the number of book nodes) Is it possible to obtain the count of a node set inside a JSP or do I have to first transform the source XML into another XML which obtains the count and then read the count from the second XML file? Hm, this works though (Standard 1.1.2): -Rashmi -- 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: Is it possible to count number of XML nodes in a node-set with JSTL XML tags?
Rashmi Rubdi wrote: Thanks again for your reply. If I'm reading your reply correctly, you are saying that we can evaluate XPath expessions with JSTL 1.1 XML Tags That's correct. Although there may be some bugs ;-). For details on what sort of XML/XPath/XSLT operations are available, do some more reading on JSTL. The JSTL 1.1 spec (supported by JSP 2.0) can be found here: http://jcp.org/aboutJava/communityprocess/final/jsr052/index2.html You'll be looking for a doc called jstl-1_1-mr2-spec.pdf. It's actually a pretty easy read, as specs go, and full of good info. I got XTags from here: http://people.apache.org/builds/jakarta-taglibs/nightly/projects/xtags/ , That would be a nightly build. I'm pretty sure that's all that's available. Not that there's anything wrong with that, I just don't think XTags has ever been through the official release process. I had to set up my environment with dom4j and jaxen beta jar files in order to use XTags I'm not sure if XTags has a user mailing list, I wasn't able to find it. I had some further questions on XTags. All of the Jakarta taglibs (http://jakarta.apache.org/taglibs/) use this list. Kris Schneider [EMAIL PROTECTED] wrote: Rashmi Rubdi wrote: Thank you for the solution I never thought of that. I think I could use what you have suggested in cases where I transform the xml with jstl and just need the count of certain node sets. I tried XTags, and it has a rich set of XPath capabilities, I was able to do something more complex like this inside the JSP I wonder if one (JSTL XML Tags) is better than the other(XTags) performance wise, but may be they are just different tools with their own purpose. I'm not sure that XTags was ever officially released. I assume you're using one of the nightly builds. The Standard taglib is an implementation of JSTL which has been officially released for both JSTL 1.0 and JSTL 1.1. Your original code actually appears to work with Standard 1.0.6 (JSTL 1.0). To support XPath, Standard 1.0 uses Jaxen/SAXPath while Standard 1.1 uses Xalan. It's likely there's a bug in how Standard 1.1 is using Xalan to do its XPath evaluation. I believe XTags uses dom4j. Kris Schneider wrote: Rashmi Rubdi wrote: I searched for a solution for this but couldn't find an answer. I'm trying to count the number of book nodes from the xml below: Book Title 1 Book Title 2 Book Title 3 Book Title 4 Book Title 5 I tried using XPath's count function, inside the JSP page, but it gives 0 instead of 5 - (the number of book nodes) Is it possible to obtain the count of a node set inside a JSP or do I have to first transform the source XML into another XML which obtains the count and then read the count from the second XML file? Hm, this works though (Standard 1.1.2): -Rashmi -- 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: huge memory amount bound by sleeping standard tags
thomas rimmele-nguyen wrote: Hy, I was searching a memory leak in our application. A profiler told me that there are standard tags (probably sleeping in a pool) that are holding the references to our objects. Especially the items-variable in the forEach-tag seems to be very greedy in our application. When I modified the standard-tag code (call a Tag.release() within every TryCatchFinally.doFinally()), our objects were garbage-collected as desired. The javadoc of javax.servlet.jsp..Tag tells, that the call of release() is NOT guaranteed for every usage of a Tag. So everything seems to be ok, no bug. But does anybody have good advice how I could reduce the amount of bound memory? One option would be to disable tag pooling. Which app server are you using? Greetings, Thomas -- 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: huge memory amount bound by sleeping standard tags
thomas rimmele-nguyen wrote: Tomcat 5.0.27 Look in $CATALINA_HOME/conf/web.xml for the jsp servlet (org.apache.jasper.servlet.JspServlet) and set its enablePooling init-param to false. Does it have a big impact on performance? Hard to say. It's likely app and tag dependent. First, see if it solves your memory issue. If it does, then decide if the app's performance is still acceptable. If it is, ship it! ;-) P.S. If the app's performance isn't acceptable with pooling disabled, keep using the profiler to be sure you're identifying the real performance issues... Kris Schneider schrieb: thomas rimmele-nguyen wrote: Hy, I was searching a memory leak in our application. A profiler told me that there are standard tags (probably sleeping in a pool) that are holding the references to our objects. Especially the items-variable in the forEach-tag seems to be very greedy in our application. When I modified the standard-tag code (call a Tag.release() within every TryCatchFinally.doFinally()), our objects were garbage-collected as desired. The javadoc of javax.servlet.jsp..Tag tells, that the call of release() is NOT guaranteed for every usage of a Tag. So everything seems to be ok, no bug. But does anybody have good advice how I could reduce the amount of bound memory? One option would be to disable tag pooling. Which app server are you using? Greetings, Thomas -- 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: JSP Tomcat and Myfaces
Quoting Martin Haimberger [EMAIL PROTECTED]: Hy, i am new on this mailinglist and i hope this is the right one for my question. This looks like a better place to go for MyFaces: http://myfaces.apache.org/mail-lists.html Good luck! I am taking part on the GSoC Projekt for Apache MyFaces. My task is to implement partial state Saving. For this i have to render the component Tree myself but i also need the unknown tags or the text from the JSP in the component Tree. My Question is: How can i configer Tomcat or Jasper to get the unkown text passed to myfaces ? Thanks in advance Martin Haimberger -- 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: Is there a way to turn-off character escaping when using c:set ?
x:out is doing the escaping by default. Try: c:set var=valuex:out select=@ProductURL escapeXml=false//c:set Rashmi Rubdi wrote: I'm processing an XML file and trying to get the value stored in the ProductURL attribute of a node. I'm doing this: c:set var=valuex:out select=@ProductURL//c:set When I output the value of @ProductURL , with just x:out, I get this: http://www.something.com?qs1=some_valueqs2=another_value (Notice how the ampersand is not escaped in the above URL generated from x:out) But when I do c:redirect url=${value}/ it is not working properly because , the URL stored inside value has escaped ampersands and c:redirect requires unescaped ampersands I could do this to get the unescaped URL: c:out value=${value} escapeXml=false/ But, I need the unescaped url in a variable so that it can be added to the url attribute of c:redirect url=${value}/ -- 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: Nested request in c:import
For the same context, c:import is the equivalent of RequestDispatcher.include, so the request scope is essentially shared. Is it possible for you to refactor either the included servlet or your controller to avoid the stomping? Clint Popetz wrote: Hi, Under jsp 2.0 (jstl 1.2), is there any way to force c:import, or perhaps the requestDispatcher.include() in particular, to set up a new request scope when the resource is in the same context? I'm using c:import to do sort of a lightweight tiles replacement for a page menu, and the imported servlet execution is stomping on some of my request variables that my controller sets up for the view. So, for example: Controller does request.setAttribute(someModel,x); jsp does c:import imported controller does request.setAttribute(someModel,y) jsp for imported controller is happy (finds y) import returns jspi for original controller finds y instead of x under someModel, and bad things happen. I'd really like the imported servlet to see a wrapped/cloned request, in which it muck with anything, but that the original request context is untouched. I don't know if this prohibited by the jsp spec though. Thanks, -Clint -- 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: Is it possible to read a value generated from within an XSL file into a JSP?
If you store the result of your transform in a var: x:transform var=transformed doc=${xml} xslt=${xsl}/ Then you can use x:set/x:out with an XPath expression to grab what you need. Will that help or have I misunderstood what you're trying to do? Quoting Rashmi Rubdi [EMAIL PROTECTED]: Hello, I am trying to read a value that is generated inside an XSLT file (session_test.xsl ) , in to the JSP file (session_test.jsp) that contains the code to transform the XML (session_test.xml) I want to store the value of sub-node , and the value of the generated id as session parameters inside the JSP file. Is there a way to read a value generated inside an XSL into the JSP ? session_test.xml ?xml version=1.0 encoding=UTF-8? root-node some-nodes node sub-nodesome_value_1/sub-node /node node sub-nodesome_value_2/sub-node /node node sub-nodesome_value_3/sub-node /node node sub-nodesome_value_4/sub-node /node /some-nodes /root-node - session_test.xsl ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:output omit-xml-declaration=yes/ xsl:template match=/ xsl:for-each select=root-node/some-nodes/node xsl:value-of select=sub-node/ br/ xsl:value-of select=generate-id()/ hr/ /xsl:for-each /xsl:template /xsl:stylesheet -- session_test.jsp %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % html headtitle/title/head body c:import url=session_test.xml var=xml charEncoding=UTF-8/ c:import url=session_test.xsl var=xsl charEncoding=UTF-8/ x:transform doc=${xml} xslt=${xsl}/ /body /html -Thank you -- 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: Is it possible to read a value generated from within an XSL file into a JSP?
Glad it helped - everyone's a newbie at some point... Quoting Rashmi Rubdi [EMAIL PROTECTED]: Yes, this definitely helps I am now able to get additional information from the intermediate xslt transformation. Sorry, if my question was inane, I'm a newbie to JSTL and I was looking for a way to do 2 xslt transformations, didn't know it was this easy. Thank you very much. Kris Schneider [EMAIL PROTECTED] wrote: If you store the result of your transform in a var: Then you can use / with an XPath expression to grab what you need. Will that help or have I misunderstood what you're trying to do? Quoting Rashmi Rubdi : Hello, I am trying to read a value that is generated inside an XSLT file (session_test.xsl ) , in to the JSP file (session_test.jsp) that contains the code to transform the XML (session_test.xml) I want to store the value of sub-node , and the value of the generated id as session parameters inside the JSP file. Is there a way to read a value generated inside an XSL into the JSP ? session_test.xml some_value_1 some_value_2 some_value_3 some_value_4 - session_test.xsl xmlns:xsl=http://www.w3.org/1999/XSL/Transform; - -- session_test.jsp -Thank you -- Kris Schneider D.O.Tech - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- 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: Value of the variable set with x:set , is [attribute_name=attribute_value] instead of just attribute_value
One way: c:set var=keyx:out select=$transformed/Products/Product[1]/@l_id//c:set c:out value=${key}/ Rashmi Rubdi wrote: Hello, I searched everywhere for a solution, but couldn't find an answer to this scenario: If I output the value of the attribute l_id as follows, the correct output - attribute's value - is being displayed x:out select=$transformed/Products/Product[1]/@l_id/ However, If I try the following, the value of attribute l_id is being printed as [l_id=some_value] instead of just some_value x:set var=key select=$transformed/Products/Product[1]/@l_id / c:out value=${key}/ How do I make only the xml node's attribute value be stored in the variable while using x:set ? -- 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 c:out tag-- how to escape apostrophe
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: c:out array problem
Couple of ways to skin it, one is: c:forEach var=arr1item items=${arr1} varStatus=status c:set var=arr2item value=${arr2[status.index]}/ ... /c:forEach Eric Chow wrote: Hello, If I have two arrays with same length, how can I display them in c:forEach ? Best regards, Eric -- 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: Problem with JSTL
The correct URI for JSTL 1.1 is: http://java.sun.com/jsp/jstl/xml As you've noted, the parse tag would be used like so: x:parse var=doc doc=${val}/ Make sure you have the proper JAR files for the Standard 1.1 taglib installed (instead of Standard 1.0). Make sure that the value of ${val} doesn't contain any content before the prolog/declaration: ?xml version=1.0? Make sure that the value of ${val} doesn't contain any non-XML content before the root element. Emandi, Srinivasrao wrote: Hi all I m using jstl to parse xml in my jsp, i m facing a strange problem with the uri in %@ taglib The following code is working fine: %@ taglib prefix=x uri=http://java.sun.com/jstl/xml; % c:set var=val value=${requestScope.responseXML} / x:parse var=doc xml=${val} / however xml in x:parse ..is deprecated one i want to use doc in place of xml , but its throwing an exception :Attribute doc invalid for tag parse according to TLD If i use %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; % then the result is javax.servlet.jsp.JspException: Content is not allowed in prolog. Version i m using : Tomcat : 5.0.3 jstl :1.1 jetspeed 2 Can any one please give some idea to solve this problem. -- 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: FW: How to get the source for JSTL 1.0
Go here: http://jakarta.apache.org/site/downloads/downloads_taglibs-standard-1.0.cgi You'll be redirected to a mirror and you'll see a link for 1.0.6.zip. The actual URL will look something like: http://apache.mirrors.pair.com/jakarta/taglibs/standard-1.0/binaries/jakarta-taglibs-standard-1.0.6.zip Take that URL and replace binaries with source. So, something like this: http://apache.mirrors.pair.com/jakarta/taglibs/standard-1.0/source/ You should see a directory listing of files to choose from. Stokes, Jerry wrote: I'm trying to get the source for the 1.0 version of the standard tag library. When I go to the release link http://people.apache.org/builds/jakarta-taglibs/releases/standard/ There is no file that has the source. If I go to the nightly builds, there is no designation for 1.0. That all looks like 1.1. Where can I get the 1.0 source? -- 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: Runtime expressions with img:image
Hassan Schroeder wrote: Robert Bowen wrote: No, path = ${path} does not work. I am using JSTL 1.0 and Servlet 2.4. So can I do this? ...Without changing versions of JSTL / Servlet? short answer: no. Though I'm not sure where that img:... tag comes from, haven't used it myself. Well, no is maybe too short an answer. At worst you should be able to do something like: img:image src='%= (String)pageContext.getAttribute(path) %'/ But if you're using a 2.4 deployment descriptor -- check what's at the beginning of your application's web.xml -- upgrading to JSTL 1.1 is as simple as downloading and replacing a couple of jar files... And well worth it, IMO -- replacing all those `c:out value=${path}/` statements with `${path}` cleans up a workspace most wonderfully :-) Agreed. If you can upgrade, it's a good idea for a number of reasons. FWIW! -- 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: Runtime expressions with img:image
Martin Cooper wrote: On 5/17/06, Hassan Schroeder [EMAIL PROTECTED] wrote: Robert Bowen wrote: No, path = ${path} does not work. I am using JSTL 1.0 and Servlet 2.4. So can I do this? ...Without changing versions of JSTL / Servlet? short answer: no. Though I'm not sure where that img:... tag comes from, haven't used it myself. Uh, that would be HTML... ;-) I had a WTF moment when I read your previous reply because I assumed it was the Image taglib: http://jakarta.apache.org/taglibs/sandbox/doc/image-doc/intro.html -- Martin Cooper But if you're using a 2.4 deployment descriptor -- check what's at the beginning of your application's web.xml -- upgrading to JSTL 1.1 is as simple as downloading and replacing a couple of jar files... And well worth it, IMO -- replacing all those `c:out value=${path}/` statements with `${path}` cleans up a workspace most wonderfully :-) FWIW! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com opinion: webtuitive.blogspot.com dream. code. -- 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: XPath function not() not working.
For Standard 1.1, XPath support is based on Xalan (for 1.0, it's based on Jaxen/SAXPath). How do you have Xalan installed and which version are you using? Sébastien Brodeur wrote: Kris Schneider kris at dotech.com writes: Is bookId a request parameter? If so, what happens with this: x:when select=not($xml/books/book[id=$param:bookId]) I try to put a valid id directly, without using the request parameter. x:when select=not($xml/books/book[id='1']) The problem still occur. Thank for your reply. -- 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: Sun JSTL Standard versus Jakarta JSTL Standard
Not sure if this is exactly what you're after, but you have to keep in mind that JSTL is a specification. In order to actually make use of it, you need an implementation. That's where the Standard taglib comes in - it's an implementation of the JSTL spec. Standard 1.0 implements JSTL 1.0 and Standard 1.1 implements JSTL 1.1. Sébastien Brodeur wrote: What is the difference between the Sun version of standard JSTL and the Jakarta one? -- 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: XPath function not() not working.
Here's what may be a workaround. I'm not sure of the root cause yet, but try this: x:set var=nodeSet select=$xml/books/book[id=$param:bookId]/ x:choose x:when select=not($nodeSet).../x:when x:otherwise.../x:otherwise /x:choose Kris Schneider wrote: For Standard 1.1, XPath support is based on Xalan (for 1.0, it's based on Jaxen/SAXPath). How do you have Xalan installed and which version are you using? Sébastien Brodeur wrote: Kris Schneider kris at dotech.com writes: Is bookId a request parameter? If so, what happens with this: x:when select=not($xml/books/book[id=$param:bookId]) I try to put a valid id directly, without using the request parameter. x:when select=not($xml/books/book[id='1']) The problem still occur. Thank for your reply. -- 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: XPath function not() not working.
Is bookId a request parameter? If so, what happens with this: x:when select=not($xml/books/book[id=$param:bookId]) Sébastien Brodeur wrote: Sébastien Brodeur brodseba at gmail.com writes: I want to clarify my post. I check the JSTL 1.1 Specification Maintenance Release, but I found nothing helpful (except the change in x:forEach having now a varStatus attribute and the fact that the c:forEach can no longer use a X tags select to iterate. A change not highlight into the Appendix A by the way.) This code work fine using JSTL 1.0, but not with JSTL 1.1. The expression ($xml/books/book[id=$param.bookId]) ALWAYS return false, so I ALWAYS got not(false()) x:choose x:when select=not($xml/books/book[id=$param.bookId]) %-- There is no valid node in the xml --% /x:when x:otherwise %-- Do something with the xml. --% /x:otherwise /x:choose The easies solution seem obvious. I should remore the not() and swap the code segment from when to otherwise. But not() should work God d**m it. We have also problem using the AND and OR operator in XPath expression. -- 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: Weblogic 9.0 and JSTL 1.1 ${variable} expansion
If you're using JSP documents (XML format), then it looks like there was a bug in 9.0 that's been fixed in 9.1 that *might* be an issue. See CR224130 at: http://edocs.bea.com/wls/docs91/issues/known_resolved.html#1056681 Otherwise, it's difficult to guess at the problem from the information you've provided. The only suggestion I can make is to be sure you haven't unintentionally disabled EL evaluation. One other suggestion I'd make is for all your developers to get on the same platform, preferably the same one that will be used in production. That way everyone will see the same set of issues and will likely encounter them earlier rather than later in the development cycle. Luca Passani wrote: Hello, I'm involved in a distributed project. I develop a web app using Tomcat5, JSTL 1.1, Struts, Java 1.5 (but compiling for 1.4) and when I am done, someone somewhere else re-builds my app for Weblogic 9.0 and integrates with the back-end. Unfortunately, things are not going 100% smooth. First we had to figure out that web.xml for servlets 2.4 is not just a change in the header (DTD vs schema), but also the syntax has changed in subtle ways (taglib tags need to go inside a jsp-config tag with 2.4). To add to that, Tomcat5 does not complain but weblogic does! (as an aside, which tools do you guy use to validate the web.xml in accordance with the 2.4 schema?) But let me get to my question. In my Struts action I do something like: request.setAttribute(title, Hi there!); and in tomcat5, as expected, I am able to read back that value in my JSPs as simply as: a href=# title=${title} Alas, in Weblogic they are seeing ${title} not Hi There ! as I said, the web.xml is correctly set (and correctly recognized) as 2.4. We know for sure that WL 9 is supposed to handle 2.4 and JSP 2.0 http://e-docs.bea.com/wls/docs90/notes/new.html#1225583 any idea of what we may be missing? Thanks Luca -- 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: JSP and JSTL sql:param and order by with Oracle
One of the things to try in cases like this is the equivalent Java code. It turns out that doesn't seem to work either, which means JSP/JSTL isn't the issue. I tried the following on our own database with various Oracle drivers (9.2.0.5 and 10.2.0.1 to name a couple): import java.io.*; import java.sql.*; import java.util.*; public class ParamTest { private static final String DRIVER_CLASSNAME = oracle.jdbc.OracleDriver; private static final String DB_URL = jdbc:oracle:thin:@...; private static final String DB_USER = ...; private static final String DB_PASSWORD = ...; private static final Properties DB_PROPS = new Properties(); static { DB_PROPS.setProperty(user, DB_USER); DB_PROPS.setProperty(password, DB_PASSWORD); } private static final String SQL = select owner, table_name from all_tables order by ?; // try this as owner, table_name or xxx // can also try an Integer instead private static final String ORDER_BY = owner; public static void main(String[] args) throws Exception { Class driverClass = Class.forName(DRIVER_CLASSNAME); Driver driver = (Driver)driverClass.newInstance(); Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = driver.connect(DB_URL, DB_PROPS); stmt = conn.prepareCall(SQL); stmt.setObject(1, ORDER_BY); rs = stmt.executeQuery(); while (rs.next()) { System.out.println(Owner: + rs.getObject(1) + , Table name: + rs.getObject(2)); } } catch (SQLException exc) { exc.printStackTrace(); } finally { if (rs != null) { try { rs.close(); } catch (SQLException exc) { exc.printStackTrace(); } } if (stmt != null) { try { stmt.close(); } catch (SQLException exc) { exc.printStackTrace(); } } if (conn != null) { try { conn.close(); } catch (SQLException exc) { exc.printStackTrace(); } } } } } Interestingly, if you try something similar with either the jTDS or Microsoft SQL Server drivers (against an SQL Server database), you get an error trying to use a param for order by. Francis wrote: Impossible to sort a select in sql:query with an order by ? and sql:param with Oracle. sql:query var=stmt dataSource=${ ig42 } SELECT id_agent, nom, prenom, no_ulis, no_bureau, prof_telephone, serv_principal FROM perso.per_v_agent_opencms WHERE NVL( perso.per_v_agent_opencms.date_fin_contrat , TO_DATE('01/01/2100','DD/MM/')) SYSDATE ORDER BY ? sql:param value=${truc} / /sql:query I try with truc=nom or truc=2. The var truc is tested with c:out. With ORDER BY nom or ORDER BY 2 in the select the query is in order Another test with a where clause nom like ? and sql:param value=${truc}% / is working with correct value of truc. The JSP page is working but without sort. If the text in the var truc is xxx it's also working without error and sort. Why? Francis -- 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: c:set and runtime expressions
The implication that the example singleton class causes a memory leak just because ...it creates a hard reference to a class instance into the class itself is hard to believe. There are plenty of other ways to pin classes loaded by the web app's class loader, but the singleton pattern isn't one of them. One common way to pin classes is through the JavaBeans Introspector. Since the Introspector caches information about the classes it processes, those references will keep the web app's class loader from becoming eligible for collection. If you're using a container that doesn't take this into account, the common solution is to create a ServletContextListener that calls Introspector.flushCaches in its contextDestroyed method. If your singleton is really causing a performance issue, there's probably something else going on. If it's released open source, you might want to post a link to the code so someone can take a look at it. Luca Passani wrote: Tarek Nabil wrote: Thanks a lot Luca for pointing this out. I must say it's completely new information to me. I wonder if it's really accurate and relevant to all containers. For example, in Oracle Containers for Java (OC4J), when you redeploy an application, the OC4J instance is restarted. You can reload an application without restarting the OC4J instance. Do you think that would make it immune against this kind of problem? I'm also going to the Oracle forums with that question. can you post (or send me off-line) a pointer to your post on the Oracle forum? I am interested in this for a bit of open source that I have released and where I have used a Singleton. If I restart the application, it takes increasingly more time for the app-server to recover each time the Singleton is rebuilt. This is a problem I want to fix for the first release. Luca -- 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: c:set and runtime expressions
Tarek Nabil wrote: Thanks a lot Kris for the explanation. Actually, I'm starting to feel that moving to JSTL 1.0 was not such a wise move. There are a lot of things that I used to be able to do with the Struts tag libraries that I can not do with JSTL. One of them is the example I mentioned. Currently, the only work around for me is to do this % Config config = Config.getIntance(); % And then use config in later EL expressions. This is exactly what I don't want to do, but unfortunately, it seems there's no other way around it. If that Config instance is likely to be required for most requests, perhaps you can use a Filter to set the instance as a request attribute. Or, if you're using Struts, have an Action do something similar before forwarding. I'm starting to feel that JSTL has some severe limitations. Even with 1.1, I ran before into the problem of not being able to use constants. Someone on this list kindly suggested the non standard tag library, but the way it works (I guess) is that it uses reflection to expose those static fields as properties, which is a very artificial solution. I mean, why isn't this supported by default? I believe this is a question for the JSR experts to answer. Not sure why you'd characterize reflection that way, it's certainly a naturally occurring part of JavaBeans (not to mention Struts and BeanUtils). In fact, reflection was my approach to this very issue a few years back when using Struts: http://marc.theaimsgroup.com/?l=struts-userm=103790677413408 Similar thread from this group: http://marc.theaimsgroup.com/?l=taglibs-userm=105889207116316 Lots of other ways to approach the problem, but it is recognized as an issue: access to constants http://jsp-spec-public.dev.java.net/issues/show_bug.cgi?id=145 -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, April 03, 2006 5:57 PM To: Tag Libraries Users List Subject: Re: c:set and runtime expressions Tarek Nabil wrote: So that means if I use the RT-based version, then I won't be able to use EL? That's quite strange, because 1.1 could handle both, so it has to be doable. In fact, that's exactly what it means. It's only as of JSP 2.0 that EL evaluation is done by the container. This means that both EL expressions and JSP expressions can be used as RT attribute values. So, JSTL 1.1 isn't really handling anything, it's the JSP 2.0 container. Since JSP 1.2 doesn't do EL evaluation, it's up to a taglib (JSTL 1.0, for example) to do it. That's why the versions of the JSTL 1.0 taglibs that support EL evaluation have attributes with rtexprvalue = false. -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, April 03, 2006 6:26 AM To: Tag Libraries Users List Subject: Re: c:set and runtime expressions If you need to run JSTL 1.0 and want to use JSP expressions as attribute values, you need to use the RT-based versions. For JSTL, there are basically two distinct versions of each taglib: %@ taglib prefix=curi=http://java.sun.com/jstl/core; % %@ taglib prefix=c_rt uri=http://java.sun.com/jstl/core_rt; % If you look at the TLD files for JSTL 1.0, you'll see: c.tld: -- tag nameset/name ... attribute namevalue/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute ... /tag c-rt.tld: - tag nameset/name ... attribute namevalue/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute ... /tag JSTL 1.0 has to handle EL evaluation on its own (it's integrated into JSP 2.0 so JSTL 1.1 doesn't need to do the evaluation), so you're forced to make a choice between different taglibs that use EL expressions or JSP expressions. Tarek Nabil wrote: Hi everyone, I was using JSTL 1.1 in my application, and then unfortunately, I had to downgrade to 1.0. Now, my IDE is complaining about this line in my JSP c:set var=config value=%= Config.getInstance() %/ It says Attribute value does not accept runtime expressions. This used to work perfectly when I was using 1.1. I tried to look at the changes between 1.1 and 1.0 but I can not see anything related to this issue. Is this really a difference between 1.0 and 1.1 or am I doing something wrong? Thanks in advance for your help. -- 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: c:set and runtime expressions
Tarek Nabil wrote: So that means if I use the RT-based version, then I won't be able to use EL? That's quite strange, because 1.1 could handle both, so it has to be doable. In fact, that's exactly what it means. It's only as of JSP 2.0 that EL evaluation is done by the container. This means that both EL expressions and JSP expressions can be used as RT attribute values. So, JSTL 1.1 isn't really handling anything, it's the JSP 2.0 container. Since JSP 1.2 doesn't do EL evaluation, it's up to a taglib (JSTL 1.0, for example) to do it. That's why the versions of the JSTL 1.0 taglibs that support EL evaluation have attributes with rtexprvalue = false. -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, April 03, 2006 6:26 AM To: Tag Libraries Users List Subject: Re: c:set and runtime expressions If you need to run JSTL 1.0 and want to use JSP expressions as attribute values, you need to use the RT-based versions. For JSTL, there are basically two distinct versions of each taglib: %@ taglib prefix=curi=http://java.sun.com/jstl/core; % %@ taglib prefix=c_rt uri=http://java.sun.com/jstl/core_rt; % If you look at the TLD files for JSTL 1.0, you'll see: c.tld: -- tag nameset/name ... attribute namevalue/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute ... /tag c-rt.tld: - tag nameset/name ... attribute namevalue/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute ... /tag JSTL 1.0 has to handle EL evaluation on its own (it's integrated into JSP 2.0 so JSTL 1.1 doesn't need to do the evaluation), so you're forced to make a choice between different taglibs that use EL expressions or JSP expressions. Tarek Nabil wrote: Hi everyone, I was using JSTL 1.1 in my application, and then unfortunately, I had to downgrade to 1.0. Now, my IDE is complaining about this line in my JSP c:set var=config value=%= Config.getInstance() %/ It says Attribute value does not accept runtime expressions. This used to work perfectly when I was using 1.1. I tried to look at the changes between 1.1 and 1.0 but I can not see anything related to this issue. Is this really a difference between 1.0 and 1.1 or am I doing something wrong? Thanks in advance for your help. -- 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: c:set and runtime expressions
If you need to run JSTL 1.0 and want to use JSP expressions as attribute values, you need to use the RT-based versions. For JSTL, there are basically two distinct versions of each taglib: %@ taglib prefix=curi=http://java.sun.com/jstl/core; % %@ taglib prefix=c_rt uri=http://java.sun.com/jstl/core_rt; % If you look at the TLD files for JSTL 1.0, you'll see: c.tld: -- tag nameset/name ... attribute namevalue/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute ... /tag c-rt.tld: - tag nameset/name ... attribute namevalue/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute ... /tag JSTL 1.0 has to handle EL evaluation on its own (it's integrated into JSP 2.0 so JSTL 1.1 doesn't need to do the evaluation), so you're forced to make a choice between different taglibs that use EL expressions or JSP expressions. Tarek Nabil wrote: Hi everyone, I was using JSTL 1.1 in my application, and then unfortunately, I had to downgrade to 1.0. Now, my IDE is complaining about this line in my JSP c:set var=config value=%= Config.getInstance() %/ It says Attribute value does not accept runtime expressions. This used to work perfectly when I was using 1.1. I tried to look at the changes between 1.1 and 1.0 but I can not see anything related to this issue. Is this really a difference between 1.0 and 1.1 or am I doing something wrong? Thanks in advance for your help. -- 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: x:out ignores XML documents character encoding
/report report id=608 titlePatients sans résultat de radiographie thoracique/title reportFileNoXray.jasper/reportFile /report report id=609 titlePatients sans résultat de crachat/title reportFileNoSputum.jasper/reportFile /report report id=610 titlePatients sans résultat PPD/title reportFileNoPPD.jasper/reportFile /report report id=611 titlePatients éligibles pour traitement ARV mais non inscrit/title reportFileNotEnrolled.jasper/reportFile /report report id=612 titlePatients avec CD4 lt; 200 n'étant pas sous Cotrimox/title reportFileNotOnCotrimox.jasper/reportFile /report /reportSubSet /reportSet /reports -- 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: question about standard taglib sql
Jerry wrote: Steven F. Bell sbell at frycomm.com writes: Hello, I am using the standard taglib sql tag to query a database and large text fields are coming back like: net.sourceforge.jtds.jdbc.ClobImpl at 94aa42 What could be causing this, and is there any means to correct it, and get the proper text back? JSTL will use ResultSet.getObject to retrieve your results. In some cases, this will result in a Clob. If you're using JSP 2.0, you might consider creating an EL function to process the Clob into a string. Or you could take a bean-based approach that will also work with earlier version of JSP. Obviously, a scriptlet will also get the job done. The simplest way to convert a Clob into a String is: long length = theClob.length(); String s = theClob.getSubString(0, (int)length); Of course, that might not work depending on the length of the Clob, so there are other ways to stream the Clob data: Reader in = theClob.getCharacterStream(); ... Also, the results in the tag are alphabetical a-z, can this order be changed around to match the field order in the database? You might want to look at using Result.getRowsByIndex instead of Result.getRows to iterate through your results: c:forEach var=row items=${results.rowsByIndex} c:forEach var=col items=${row} Result.getRowsByIndex returns an Object[][] instance where the first dimension is a row index and the second dimension is a column index. I hope that's right, it's been a while since I've been able to play with JSP/JSTL stuff... Hi, I had the same problem because i used the datatype ntext of text of a sql server database. Using varchar instead of text resolved my problem. Hope this helps, Jerry -- 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: question about standard taglib sql
Kris Schneider wrote: Jerry wrote: Steven F. Bell sbell at frycomm.com writes: Hello, I am using the standard taglib sql tag to query a database and large text fields are coming back like: net.sourceforge.jtds.jdbc.ClobImpl at 94aa42 What could be causing this, and is there any means to correct it, and get the proper text back? JSTL will use ResultSet.getObject to retrieve your results. In some cases, this will result in a Clob. If you're using JSP 2.0, you might consider creating an EL function to process the Clob into a string. Or you could take a bean-based approach that will also work with earlier version of JSP. Obviously, a scriptlet will also get the job done. The simplest way to convert a Clob into a String is: long length = theClob.length(); String s = theClob.getSubString(0, (int)length); Sorry, I think that should be: String s = theClob.getSubString(1, (int)length); Of course, that might not work depending on the length of the Clob, so there are other ways to stream the Clob data: Reader in = theClob.getCharacterStream(); ... Also, the results in the tag are alphabetical a-z, can this order be changed around to match the field order in the database? You might want to look at using Result.getRowsByIndex instead of Result.getRows to iterate through your results: c:forEach var=row items=${results.rowsByIndex} c:forEach var=col items=${row} Result.getRowsByIndex returns an Object[][] instance where the first dimension is a row index and the second dimension is a column index. I hope that's right, it's been a while since I've been able to play with JSP/JSTL stuff... Hi, I had the same problem because i used the datatype ntext of text of a sql server database. Using varchar instead of text resolved my problem. Hope this helps, Jerry -- 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]