Re: EL expressions not being evaluated..
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...:) 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. - 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..
interesting.. I didn't know they had a 1.4-compatible package for 5.5.. again, many thanks to all.. Kris Schneider wrote: 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expressions not being evaluated..
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 [EMAIL PROTECTED] wrote: On 9/11/06, maya [EMAIL PROTECTED] 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.. snip/ http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expressions not being evaluated..
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Stay in the know. Pulse on the new Yahoo.com. Check it out.
Re: EL expressions not being evaluated..
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Stay in the know. Pulse on the new Yahoo.com. Check it out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expressions not being evaluated..
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Stay in the know. Pulse on the new Yahoo.com. Check it out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expressions not being evaluated..
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? 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Stay in the know. Pulse on the new Yahoo.com. Check it out. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 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: EL expressions not being evaluated..
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: ?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 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 ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app 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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expressions not being evaluated..
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 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
Re: EL expressions not being evaluated..
i think it is the servlet specifications if i am not wrong servlet 2.3 specifications does not evaluate the EL expressions.. On 9/12/06, maya [EMAIL PROTECTED] 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.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expressions not being evaluated..
On 9/11/06, maya [EMAIL PROTECTED] 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.. snip/ http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expression not evaluating
Hi, Take a look on the web.xml file of your application. It should begin with the following : web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; Hope it helps. - Original Message - From: clunkyrobot [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 06, 2004 16:32 Subject: EL expression not evaluating Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and MySQL. So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta Core Tags version 2, all seems to be functioning. I am using Intellij IDEA 4.5 as my IDE. Now all seems to be running fine, no errors, Intellij IDEA is configured and sees what it needs, and look happy. Problem 01 - My EL expressions in my c:out value=${some Expression} / are not being evaluated, they look right but the expressions are just printed out on the screen like this ${some Expression} as plain text. Now it is not a problem with my tags because my c:choose tags and others work fine. So it looks my core tags are working, but why are my expressions not being executed? Here is the page any suggestions? -Kurt code: %@ taglib uri=/WEB-INF/tld/c.tld prefix=c % %@ taglib uri=/WEB-INF/tld/sql.tld prefix=sql % %@ taglib uri=/WEB-INF/tld/fmt.tld prefix=fmt % %@ taglib uri=/WEB-INF/tld/x.tld prefix=x % html head titleSearch Result/title /head body bgcolor=white pCreate a a href=newCreate.jspnew Blog/a/p c:choose c:when test=${not empty listQuery.rows} Sorry, no existing blogs were found. /c:when c:otherwise The following soapbox articles were found: table border=1 thID/th thDate Created/th thDate Last Modified/th thArticle Status/th thArticle Title/th thArticle Summery/th thEdit/th thDelete/th c:forEach items=${listQuery.rows} var=row tr tdc:out value=${row.id} //td tdc:out value=${row.dateCreated} //td tdc:out value=${row.dateLastModified} //td tdc:out value=${row.articleStatus} //td tdc:out value=${row.articleTitle} //td tdc:out value=${row.articleSummery} //td tda href=currentQuery.jsp?id=c:out value=${row.id} /Edit/a/td tda href=delete.jsp?id=c:out value=${row.id} /Delete/a/td /tr /c:forEach /table /c:otherwise /c:choose /body /html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expression not evaluating
This is my web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- makes MySQL driver accessible -- context-param param-name javax.servlet.jsp.jstl.sql.dataSource /param-name param-value jdbc:mysql://localhost/scuttlebug,com.mysql.jdbc.Driver,guest,guest /param-value /context-param /web-app Very basic - I tried adding Dima XML however to no effect? Can anyone see some thing I am missing: On 06/09/2004, at 11:54 PM, Dima Gutzeit wrote: Hi, Take a look on the web.xml file of your application. It should begin with the following : web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; Hope it helps. - Original Message - From: clunkyrobot [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 06, 2004 16:32 Subject: EL expression not evaluating Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and MySQL. So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta Core Tags version 2, all seems to be functioning. I am using Intellij IDEA 4.5 as my IDE. Now all seems to be running fine, no errors, Intellij IDEA is configured and sees what it needs, and look happy. Problem 01 - My EL expressions in my c:out value=${some Expression} / are not being evaluated, they look right but the expressions are just printed out on the screen like this ${some Expression} as plain text. Now it is not a problem with my tags because my c:choose tags and others work fine. So it looks my core tags are working, but why are my expressions not being executed? Here is the page any suggestions? -Kurt code: %@ taglib uri=/WEB-INF/tld/c.tld prefix=c % %@ taglib uri=/WEB-INF/tld/sql.tld prefix=sql % %@ taglib uri=/WEB-INF/tld/fmt.tld prefix=fmt % %@ taglib uri=/WEB-INF/tld/x.tld prefix=x % html head titleSearch Result/title /head body bgcolor=white pCreate a a href=newCreate.jspnew Blog/a/p c:choose c:when test=${not empty listQuery.rows} Sorry, no existing blogs were found. /c:when c:otherwise The following soapbox articles were found: table border=1 thID/th thDate Created/th thDate Last Modified/th thArticle Status/th thArticle Title/th thArticle Summery/th thEdit/th thDelete/th c:forEach items=${listQuery.rows} var=row tr tdc:out value=${row.id} //td tdc:out value=${row.dateCreated} //td tdc:out value=${row.dateLastModified} //td tdc:out value=${row.articleStatus} //td tdc:out value=${row.articleTitle} //td tdc:out value=${row.articleSummery} //td tda href=currentQuery.jsp?id=c:out value=${row.id} /Edit/a/td tda href=delete.jsp?id=c:out value=${row.id} /Delete/a/td /tr /c:forEach /table /c:otherwise /c:choose /body /html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL expression not evaluating
think you need 2.4 webapp dtd web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; -Original Message- From: clunkyrobot [mailto:[EMAIL PROTECTED] Sent: 06 September 2004 15:39 To: Tag Libraries Users List Subject: Re: EL expression not evaluating This is my web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- makes MySQL driver accessible -- context-param param-name javax.servlet.jsp.jstl.sql.dataSource /param-name param-value jdbc:mysql://localhost/scuttlebug,com.mysql.jdbc.Driver,guest,guest /param-value /context-param /web-app Very basic - I tried adding Dima XML however to no effect? Can anyone see some thing I am missing: On 06/09/2004, at 11:54 PM, Dima Gutzeit wrote: Hi, Take a look on the web.xml file of your application. It should begin with the following : web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; Hope it helps. - Original Message - From: clunkyrobot [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 06, 2004 16:32 Subject: EL expression not evaluating Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and MySQL. So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta Core Tags version 2, all seems to be functioning. I am using Intellij IDEA 4.5 as my IDE. Now all seems to be running fine, no errors, Intellij IDEA is configured and sees what it needs, and look happy. Problem 01 - My EL expressions in my c:out value=${some Expression} / are not being evaluated, they look right but the expressions are just printed out on the screen like this ${some Expression} as plain text. Now it is not a problem with my tags because my c:choose tags and others work fine. So it looks my core tags are working, but why are my expressions not being executed? Here is the page any suggestions? -Kurt code: %@ taglib uri=/WEB-INF/tld/c.tld prefix=c % %@ taglib uri=/WEB-INF/tld/sql.tld prefix=sql % %@ taglib uri=/WEB-INF/tld/fmt.tld prefix=fmt % %@ taglib uri=/WEB-INF/tld/x.tld prefix=x % html head titleSearch Result/title /head body bgcolor=white pCreate a a href=newCreate.jspnew Blog/a/p c:choose c:when test=${not empty listQuery.rows} Sorry, no existing blogs were found. /c:when c:otherwise The following soapbox articles were found: table border=1 thID/th thDate Created/th thDate Last Modified/th thArticle Status/th thArticle Title/th thArticle Summery/th thEdit/th thDelete/th c:forEach items=${listQuery.rows} var=row tr tdc:out value=${row.id} //td tdc:out value=${row.dateCreated} //td tdc:out value=${row.dateLastModified} //td tdc:out value=${row.articleStatus} //td tdc:out value=${row.articleTitle} //td tdc:out value=${row.articleSummery} //td tda href=currentQuery.jsp?id=c:out value=${row.id} /Edit/a/td tda href=delete.jsp?id=c:out value=${row.id} /Delete/a/td /tr /c:forEach /table /c:otherwise /c:choose /body /html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL expression not evaluating
also, get the latest jstl 1.1 and use %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % %@ taglib uri=http://java.sun.com/jsp/jstl/fmt; prefix=fmt % %@ taglib uri=http://java.sun.com/jsp/jstl/functions; prefix=fn % ADC -Original Message- From: clunkyrobot [mailto:[EMAIL PROTECTED] Sent: 06 September 2004 15:39 To: Tag Libraries Users List Subject: Re: EL expression not evaluating This is my web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- makes MySQL driver accessible -- context-param param-name javax.servlet.jsp.jstl.sql.dataSource /param-name param-value jdbc:mysql://localhost/scuttlebug,com.mysql.jdbc.Driver,guest,guest /param-value /context-param /web-app Very basic - I tried adding Dima XML however to no effect? Can anyone see some thing I am missing: On 06/09/2004, at 11:54 PM, Dima Gutzeit wrote: Hi, Take a look on the web.xml file of your application. It should begin with the following : web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; Hope it helps. - Original Message - From: clunkyrobot [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 06, 2004 16:32 Subject: EL expression not evaluating Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and MySQL. So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta Core Tags version 2, all seems to be functioning. I am using Intellij IDEA 4.5 as my IDE. Now all seems to be running fine, no errors, Intellij IDEA is configured and sees what it needs, and look happy. Problem 01 - My EL expressions in my c:out value=${some Expression} / are not being evaluated, they look right but the expressions are just printed out on the screen like this ${some Expression} as plain text. Now it is not a problem with my tags because my c:choose tags and others work fine. So it looks my core tags are working, but why are my expressions not being executed? Here is the page any suggestions? -Kurt code: %@ taglib uri=/WEB-INF/tld/c.tld prefix=c % %@ taglib uri=/WEB-INF/tld/sql.tld prefix=sql % %@ taglib uri=/WEB-INF/tld/fmt.tld prefix=fmt % %@ taglib uri=/WEB-INF/tld/x.tld prefix=x % html head titleSearch Result/title /head body bgcolor=white pCreate a a href=newCreate.jspnew Blog/a/p c:choose c:when test=${not empty listQuery.rows} Sorry, no existing blogs were found. /c:when c:otherwise The following soapbox articles were found: table border=1 thID/th thDate Created/th thDate Last Modified/th thArticle Status/th thArticle Title/th thArticle Summery/th thEdit/th thDelete/th c:forEach items=${listQuery.rows} var=row tr tdc:out value=${row.id} //td tdc:out value=${row.dateCreated} //td tdc:out value=${row.dateLastModified} //td tdc:out value=${row.articleStatus} //td tdc:out value=${row.articleTitle} //td tdc:out value=${row.articleSummery} //td tda href=currentQuery.jsp?id=c:out value=${row.id} /Edit/a/td tda href=delete.jsp?id=c:out value=${row.id} /Delete/a/td /tr /c:forEach /table /c:otherwise /c:choose /body /html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expression not evaluating
Replace the following : !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app With the value from my first reply. - Original Message - From: clunkyrobot [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Monday, September 06, 2004 17:39 Subject: Re: EL expression not evaluating This is my web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app !-- makes MySQL driver accessible -- context-param param-name javax.servlet.jsp.jstl.sql.dataSource /param-name param-value jdbc:mysql://localhost/scuttlebug,com.mysql.jdbc.Driver,guest,guest /param-value /context-param /web-app Very basic - I tried adding Dima XML however to no effect? Can anyone see some thing I am missing: On 06/09/2004, at 11:54 PM, Dima Gutzeit wrote: Hi, Take a look on the web.xml file of your application. It should begin with the following : web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; Hope it helps. - Original Message - From: clunkyrobot [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 06, 2004 16:32 Subject: EL expression not evaluating Hi - I am building a blog in the JSP and JSTL and EL and Tomcat and MySQL. So far I have installed Tomcat 5, with MySQL 4.x.x, and the Jakarta Core Tags version 2, all seems to be functioning. I am using Intellij IDEA 4.5 as my IDE. Now all seems to be running fine, no errors, Intellij IDEA is configured and sees what it needs, and look happy. Problem 01 - My EL expressions in my c:out value=${some Expression} / are not being evaluated, they look right but the expressions are just printed out on the screen like this ${some Expression} as plain text. Now it is not a problem with my tags because my c:choose tags and others work fine. So it looks my core tags are working, but why are my expressions not being executed? Here is the page any suggestions? -Kurt code: %@ taglib uri=/WEB-INF/tld/c.tld prefix=c % %@ taglib uri=/WEB-INF/tld/sql.tld prefix=sql % %@ taglib uri=/WEB-INF/tld/fmt.tld prefix=fmt % %@ taglib uri=/WEB-INF/tld/x.tld prefix=x % html head titleSearch Result/title /head body bgcolor=white pCreate a a href=newCreate.jspnew Blog/a/p c:choose c:when test=${not empty listQuery.rows} Sorry, no existing blogs were found. /c:when c:otherwise The following soapbox articles were found: table border=1 thID/th thDate Created/th thDate Last Modified/th thArticle Status/th thArticle Title/th thArticle Summery/th thEdit/th thDelete/th c:forEach items=${listQuery.rows} var=row tr tdc:out value=${row.id} //td tdc:out value=${row.dateCreated} //td tdc:out value=${row.dateLastModified} //td tdc:out value=${row.articleStatus} //td tdc:out value=${row.articleTitle} //td tdc:out value=${row.articleSummery} //td tda href=currentQuery.jsp?id=c:out value=${row.id} /Edit/a/td tda href=delete.jsp?id=c:out value=${row.id} /Delete/a/td /tr /c:forEach /table /c:otherwise /c:choose /body /html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL expression not evaluating -SOLVED
Thank you so much That did it calling sun URI rather then my local in combination with the updated web.xml - thanks heaps, thank you, Question -- Intelij IDEA marks version=2.4 in RED as not not valid ?? is this just Intelij IDEA being silly? -Kurt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: el in JSTL / JSP 2.0
I had the same prob. And 2 things I did that worked: 1. try using the 2.4 schema definition in web.xml 2. if the PermittedTablibs.tld is involved make sure your taglib-uri is http://java.sun.com/jsp/jstl/core Good luck -Original Message- From: Paul Wallace [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 28, 2004 11:17 PM To: [EMAIL PROTECTED] Subject: el in JSTL / JSP 2.0 Hi, I am trying to introduce JSP 2 with Tomcat 5 (full source below), and thus experimenting with the JSTL expression language in JSP tag files (.tag). I am bemused as to why I cannot embed the expression language within a JSTL tag thus: c:forEach begin=${a} end=${b} varStatus=status ${status.count} br/ /c:forEach Tomcat is really unhappy with this: org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(13,4) According to TLD or attribute directive in tag file, attribute begin does not accept any expressions org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand ler.java:39) the same code with c:forEach begin=1 end=5 varStatus=status iterates 5 times with no trouble. I have the latest tld's from Jakarta, status.count is displaying correctly. Any thoughts please? Thanks Paul. jsp: %@ taglib prefix=tags tagdir=/WEB-INF/tags % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % tags:wrapper a=1 b=10 p Wrapped Content /p /tags:wrapper .tag: %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ tag body-content=scriptless % %@ attribute name=a required=true % %@ attribute name=b required=true % p Attributes - ${a}, ${b} /p c:forEach begin=${a} end=${b} varStatus=status ${status.count} br/ /c:forEach
RE: el in JSTL / JSP 2.0
Hi, Tbanks for that. I was using the 2.4 schema: 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 And tried (although PermittedTablibs.tld is not in the picture): taglib taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri taglib-location/WEB-INF/tld/c.tld/taglib-location /taglib Using this gave me a 500 error (can't find said file). Before edition it looked something like: taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/WEB-INF/tld/c.tld/taglib-location /taglib The code hasn't changed (below). Are you suggesting I use that URL in the JSP / .tag? If so, my IDE cannot resolve the library (IDEA). Thanks for your thoughts. Paul. I had the same prob. And 2 things I did that worked: 1. try using the 2.4 schema definition in web.xml 2. if the PermittedTablibs.tld is involved make sure your taglib-uri is http://java.sun.com/jsp/jstl/core Hi, I am trying to introduce JSP 2 with Tomcat 5 (full source below), and thus experimenting with the JSTL expression language in JSP tag files (.tag). I am bemused as to why I cannot embed the expression language within a JSTL tag thus: c:forEach begin=${a} end=${b} varStatus=status ${status.count} br/ /c:forEach Tomcat is really unhappy with this: org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(13,4) According to TLD or attribute directive in tag file, attribute begin does not accept any expressions org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand ler.java:39) the same code with c:forEach begin=1 end=5 varStatus=status iterates 5 times with no trouble. I have the latest tld's from Jakarta, status.count is displaying correctly. Any thoughts please? Thanks Paul. jsp: %@ taglib prefix=tags tagdir=/WEB-INF/tags % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % tags:wrapper a=1 b=10 p Wrapped Content /p /tags:wrapper .tag: %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % %@ tag body-content=scriptless % %@ attribute name=a required=true % %@ attribute name=b required=true % p Attributes - ${a}, ${b} /p c:forEach begin=${a} end=${b} varStatus=status ${status.count} br/ /c:forEach - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: el in JSTL / JSP 2.0
Hi, It took me a while to get IJ/Jboss3.2.5(tomcat5)/JDK1.5 working but the above finally rendered jstl 1.1 ${2+2} without using c:out value=${2+2}/ That is what I am trying to do, embed some el in my JSTL (two int attributes passed into my tag, and the tag then iterates for the defined number). It works with static nos, but does not accept the el (${status.count} is fine): c:forEach begin=${a} end=${b} varStatus=status ${status.count} br/ /c:forEach Where static values are fine: c:forEach begin=1 end=5 varStatus=status I made mods as per your email (source included at the foot). Idea 4.5 now is happy with %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % in my JSPs (mysterious), but I am still getting the same message. Here's the 3 source files again. Thanks again for your help Paul. web.xml: 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 jsp-config taglib taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri taglib-location/WEB-INF/tld/c.tld/taglib-location /taglib /jsp-config . JSP: %@ taglib prefix=tags tagdir=/WEB-INF/tags % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % tags:wrapper a=1 b=10 p Wrapped Content /p /tags:wrapper wrapper.tag: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % %@ tag body-content=scriptless % %@ attribute name=a required=true % %@ attribute name=b required=true % c:forEach begin=${a} end=${b} varStatus=status ${status.count} br/ /c:forEach Message (same): org.apache.jasper.JasperException: /WEB-INF/tags/wrapper.tag(15,4) According to TLD or attribute directive in tag file, attribute begin does not accept any expressions org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand ler.java:39) IDEA 4.5 will not complain about the 2.4 schema spec of web.xml however note jars in web-inf/lib will be default added to library. Try web.xml: ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 (as you have) jsp-config (new 2.4 xml tag) taglib taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri taglib-location/WEB-INF/tld/c.tld/taglib-location (make sure this path is correct) /taglib /jsp-config /web-app Then in jsp: %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % (must be same as in web.xml, technically can be anything unless permittedTags involved) Start simple w/ EL: ${2+2} With IDEA 4.5 you should get green bars for both the web.xml and the jsp file (the c.tld is all red, but no matter as tomcat 5 will still work) when the taglib-uri paths match. As part of the jsp 2.0 spec, taglib is optional in jsp's as the container knows of them by default. It took me a while to get IJ/Jboss3.2.5(tomcat5)/JDK1.5 working but the above finally rendered jstl 1.1 ${2+2} without using c:out value=${2+2}/ Sound like you are almost there... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not evaluated
okok, maybe just look into the code before posting: the web-app-tag of the web.xml did not point to the 2.4-version, adding web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 solved this issue. sorry for bothering you, folks stf Stefan Frank wrote: Hi, I suspect this has been asked numerous times before, but I could not find a FAQ for JSTL: I set up jstl for my web-app(on tomcat 5) by: - copying the tld's to web-inf - adding the taglibs to web.xml - announcing the used taglibs on the jsp The tags get correctly evaluated (I suppose...) but the EL's inside the jsp never get evaluated: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % html head titleTest Page /title /head body sql:query var=rs dataSource=jdbc/ibiosServicesData select id, user_name, from users /sql:query html head titleDB Users/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} id: ${row.id}br/ user:${row.user_name}br/ /c:forEach /body /html /body /html gives: id: ${row.id} user:${row.user_name} even outing with c:out value=${row.user_name}/ does not change the output. Is there something else I have to do for evaluating EL-Expressions?! Cheers stf -- Stefan Frank iBioS - Intelligent BioInformatics Systems http://www.dkfz-heidelberg.de/ibios DKFZ - German Cancer Research Center Im Neuenheimer Feld 580 69120 Heidelberg Tel.: +49 (0) 6221 42-3612 Mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL access to a bean property... ?
Maps are treated differently than regular JavaBeans so that you can't access bean properties. For example, every object has a bean property called class, but you won't get any output if you try ${map.class}. It's even more fun to try and get at a map's empty property ;-). If all you're concerned with is testing whether a map is empty or not, you can use ${not empty map}. If you really need the size of the map, you could try the Unstandard taglib: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html Or do something like create a wrapper bean for collections that exposes a size property and delegates to the wrapped collection. Quoting Roy Benjamin [EMAIL PROTECTED]: I am displaying the values in a TreeMap using forEach tag. However, I only want to do this if the map is not empty. I also need to display the count of entries in the map at the top of the page. In TreeMap, size/size() is not a Bean Property (no?) so I tried in-line subclassing to expose the property: % TreeMap treeMap = new TreeMap() { public int getSize(){return size();} }; pageContext.setAttribute(TableRows,treeMap); % now much later I try: TD Search Results:nbsp;c:out value=${TableRows.size}/nbsp;found. /TD I could just count things as they are added to the map over a series of SQL queries, but it seemed to me this was the better solution.. only the EL expression is null. I'm sure I'm doing something wrong Thanks Roy -- 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 access to a bean property... ?
Very interesting, so wrapping would work, but you can't just expose a Bean property. I've switched to c-rt for now, Thanks! On Fri, 2004-03-26 at 10:35, Kris Schneider wrote: Maps are treated differently than regular JavaBeans so that you can't access bean properties. For example, every object has a bean property called class, but you won't get any output if you try ${map.class}. It's even more fun to try and get at a map's empty property ;-). If all you're concerned with is testing whether a map is empty or not, you can use ${not empty map}. If you really need the size of the map, you could try the Unstandard taglib: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html Or do something like create a wrapper bean for collections that exposes a size property and delegates to the wrapped collection. Quoting Roy Benjamin [EMAIL PROTECTED]: I am displaying the values in a TreeMap using forEach tag. However, I only want to do this if the map is not empty. I also need to display the count of entries in the map at the top of the page. In TreeMap, size/size() is not a Bean Property (no?) so I tried in-line subclassing to expose the property: % TreeMap treeMap = new TreeMap() { public int getSize(){return size();} }; pageContext.setAttribute(TableRows,treeMap); % now much later I try: TD Search Results:nbsp;c:out value=${TableRows.size}/nbsp;found. /TD I could just count things as they are added to the map over a series of SQL queries, but it seemed to me this was the better solution.. only the EL expression is null. I'm sure I'm doing something wrong Thanks Roy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL access to a bean property... ?
Right, because the wrapper would be a JavaBean, not a Map. The gory details behind the . operator can be found in section A.3.4 Operators [] and . of the JSTL 1.0 Spec. Quoting Roy Benjamin [EMAIL PROTECTED]: Very interesting, so wrapping would work, but you can't just expose a Bean property. I've switched to c-rt for now, Thanks! On Fri, 2004-03-26 at 10:35, Kris Schneider wrote: Maps are treated differently than regular JavaBeans so that you can't access bean properties. For example, every object has a bean property called class, but you won't get any output if you try ${map.class}. It's even more fun to try and get at a map's empty property ;-). If all you're concerned with is testing whether a map is empty or not, you can use ${not empty map}. If you really need the size of the map, you could try the Unstandard taglib: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html Or do something like create a wrapper bean for collections that exposes a size property and delegates to the wrapped collection. Quoting Roy Benjamin [EMAIL PROTECTED]: I am displaying the values in a TreeMap using forEach tag. However, I only want to do this if the map is not empty. I also need to display the count of entries in the map at the top of the page. In TreeMap, size/size() is not a Bean Property (no?) so I tried in-line subclassing to expose the property: % TreeMap treeMap = new TreeMap() { public int getSize(){return size();} }; pageContext.setAttribute(TableRows,treeMap); % now much later I try: TD Search Results:nbsp;c:out value=${TableRows.size}/nbsp;found. /TD I could just count things as they are added to the map over a series of SQL queries, but it seemed to me this was the better solution.. only the EL expression is null. I'm sure I'm doing something wrong Thanks Roy -- 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 access to a bean property... ?
Roy, if you are using JSP 2.0 (e.g. with Tomcat 5) and JSTL 1.1 you can do the following: [EMAIL PROTECTED] isELIgnored=false% %@ taglib uri=http://java.sun.com/jsp/jstl/functions; prefix=fn % Map size is ${fn:length(TableRows)} Roy Benjamin wrote: Very interesting, so wrapping would work, but you can't just expose a Bean property. I've switched to c-rt for now, Thanks! On Fri, 2004-03-26 at 10:35, Kris Schneider wrote: Maps are treated differently than regular JavaBeans so that you can't access bean properties. For example, every object has a bean property called class, but you won't get any output if you try ${map.class}. It's even more fun to try and get at a map's empty property ;-). If all you're concerned with is testing whether a map is empty or not, you can use ${not empty map}. If you really need the size of the map, you could try the Unstandard taglib: http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html Or do something like create a wrapper bean for collections that exposes a size property and delegates to the wrapped collection. Quoting Roy Benjamin [EMAIL PROTECTED]: I am displaying the values in a TreeMap using forEach tag. However, I only want to do this if the map is not empty. I also need to display the count of entries in the map at the top of the page. In TreeMap, size/size() is not a Bean Property (no?) so I tried in-line subclassing to expose the property: % TreeMap treeMap = new TreeMap() { public int getSize(){return size();} }; pageContext.setAttribute(TableRows,treeMap); % now much later I try: TD Search Results:nbsp;c:out value=${TableRows.size}/nbsp;found. /TD I could just count things as they are added to the map over a series of SQL queries, but it seemed to me this was the better solution.. only the EL expression is null. I'm sure I'm doing something wrong Thanks Roy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not being evaluated?
Personally, I'd keep JSTL/Standard in WEB-INF/lib and Xerces/Xalan in endorsed. Unless I needed an app-specific version of the XML libs, in which case I'd need them in WEB-INF/lib. I wouldn't recommend dumping everything in endorsed, or some other directory that a shared classloader can access, since it can cause problems for certain frameworks (e.g. Struts). I'm not sure if JSTL/Standard suffers from this problem. So, I guess my second choice would be to dump everything in WEB-INF/lib. Not exactly sure what's going on with that NPE. Can you post some example code that triggers it? Quoting David Wall [EMAIL PROTECTED]: Thanks. The comments below did it for me. However, I still had some JAR file location issues (tomcat's common/endorsed for the webapps WEB-INF/lib). Do most people put the XERCES, XALAN, JSTL/STANDARD jars in the endorsed location or do they just keep it with their webapps? Right now, I seem to be working with XERCES and XALAN in endorsed, and the JSTL/STANDARD in my WEB-INF/lib. Obviously, I'd prefer to have everything in the WEB-INF/lib since it would be packaged nicely together, or I'd prefer all these non-app JARs to be in the endorsed area. Even though everything appeared okay with my initial EL, I did note the following exception in catalina.log: java.lang.NullPointerException at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:557) at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:487) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 50) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 91) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:587) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) David Instead of: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app ... /web-app Use: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
RE: EL not being evaluated?
el has been incorporated into JSP 2.0 which is what Tomcat 5 implements. So, you no longer need the c:out tag. Just do: p1 + 2 + 3 = ${1+2+3}/p Check out Tomcat's default pages to see more cool things you can do with Tomcat 5 (JSP 2.0/Servlet2.4). -Ben From: David Wall [EMAIL PROTECTED] Reply-To: David Wall [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: EL not being evaluated? Date: Thu, 5 Feb 2004 09:44:28 -0800 I've installed JDK 1.4.2_03, Tomcat 5.0.18 and Apache's JSTL 1.1 on RH Linux 9. My XHTML JSP contains a simple construct: p1 + 2 + 3 = c:out value=${1+2+3}//p But the expression is not being evaluated, yet the c:out tag is being processed fine. The output just looks like: 1 + 2 + 3 = ${1+2+3} Is there a trick to getting the expressions configured to work with Tomcat 5? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Learn how to choose, serve, and enjoy wine at Wine @ MSN. http://wine.msn.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not being evaluated?
David Wall wrote: I've installed JDK 1.4.2_03, Tomcat 5.0.18 and Apache's JSTL 1.1 on RH Linux 9. My XHTML JSP contains a simple construct: p1 + 2 + 3 = c:out value=${1+2+3}//p But the expression is not being evaluated, yet the c:out tag is being processed fine. The output just looks like: 1 + 2 + 3 = ${1+2+3} Is there a trick to getting the expressions configured to work with Tomcat 5? I think you need to indicate in the web.xml that this is a jsp version 2 web application, otherwise the container assumes the web application is written for an old jsp version where not the container but the taglib does the EL evaluation (you would need the 1.0.5 taglib version for this). Regards, wolfgang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not being evaluated?
Since you're using a JSP 2.0 container, you should be able to just do: p1 + 2 + 3 = ${1+2+3}/p Make sure you're using a Servlet 2.4 deployment descriptor. That didn't work for me. Perhaps it's your last comment. What does it mean to have a 2.4 deployment descriptor for the JSP page? Maybe that's where I've gone wrong... It seems like it has to be just a configuration issue. I have the jstl.jar and standard.jar in the WEB-INF/lib directory, and I've put the c.tld in WEB-INF and updated web.xml to point to it using: taglib taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not being evaluated?
I think you need to indicate in the web.xml that this is a jsp version 2 web application, otherwise the container assumes the web application is written for an old jsp version where not the container but the taglib does the EL evaluation (you would need the 1.0.5 taglib version for this). That's no doubt my problem. What's sort of entries are needed for web.xml to show it's JSP version 2? Is this the WEB-INF/web.xml file or tomcat's conf/web.xml that needs to be changed? Thanks, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not being evaluated?
David Wall wrote: I think you need to indicate in the web.xml that this is a jsp version 2 web application, otherwise the container assumes the web application is written for an old jsp version where not the container but the taglib does the EL evaluation (you would need the 1.0.5 taglib version for this). That's no doubt my problem. What's sort of entries are needed for web.xml to show it's JSP version 2? Is this the WEB-INF/web.xml file or tomcat's This one. conf/web.xml that needs to be changed? according to http://cermics.enpc.fr/doc/java/j2eetutorial-1.4/doc/WebApp4.html Since the deployment descriptor is an XML document, it requires a prolog. The prolog of the version 2.4 Web application deployment descriptor is as follows: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not being evaluated?
Thanks. The comments below did it for me. However, I still had some JAR file location issues (tomcat's common/endorsed for the webapps WEB-INF/lib). Do most people put the XERCES, XALAN, JSTL/STANDARD jars in the endorsed location or do they just keep it with their webapps? Right now, I seem to be working with XERCES and XALAN in endorsed, and the JSTL/STANDARD in my WEB-INF/lib. Obviously, I'd prefer to have everything in the WEB-INF/lib since it would be packaged nicely together, or I'd prefer all these non-app JARs to be in the endorsed area. Even though everything appeared okay with my initial EL, I did note the following exception in catalina.log: java.lang.NullPointerException at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:557) at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:487) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 50) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 91) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:587) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:578) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:683) at java.lang.Thread.run(Thread.java:534) David Instead of: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app ... /web-app Use: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 ... /web-app Get rid of the taglib element and the TLD file, as of JSP 1.2 you don't need them for packaged taglibs. Just use the proper URI in the taglib directive in your JSP: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL not being evaluated?
Instead of: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app ... /web-app Use: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 ... /web-app Get rid of the taglib element and the TLD file, as of JSP 1.2 you don't need them for packaged taglibs. Just use the proper URI in the taglib directive in your JSP: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % Quoting David Wall [EMAIL PROTECTED]: Since you're using a JSP 2.0 container, you should be able to just do: p1 + 2 + 3 = ${1+2+3}/p Make sure you're using a Servlet 2.4 deployment descriptor. That didn't work for me. Perhaps it's your last comment. What does it mean to have a 2.4 deployment descriptor for the JSP page? Maybe that's where I've gone wrong... It seems like it has to be just a configuration issue. I have the jstl.jar and standard.jar in the WEB-INF/lib directory, and I've put the c.tld in WEB-INF and updated web.xml to point to it using: taglib taglib-urihttp://java.sun.com/jsp/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib Thanks, David -- 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 are not evaluated
Try adding ?xml version=1.0 ? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd at the top of your web.xml. If you don't tell tomcat this is a 2.4 version document it will not try evaluating EL expressions. Also, don't double-include libs that are already in tomcat/common/lib in your WEB-INF/lib since it can cause problems. There is no need for it either. If you are using an IDE you might have to include just the path to those libraries in the project settings Manos - Original Message - From: Popova, Marina To: '[EMAIL PROTECTED]' Sent: Tuesday, October 21, 2003 6:22 PM Subject: EL expressions are not evaluated Hi, Sorry if this question was asked already... I am trying to write a simple test web application using JSTL and encountered the following problem: JSTL core tags are working fine (like c:out ..., c:forEach...) but the EL expressions are not evaluated. I do use the c.tld file - it is in my app's WEB-INf directory. Below is a simple test page that demonstrates the problem: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html head titleJSTL WISS Preview/title /head body bgcolor=#FF jsp:useBean id=directory class=test_wiss_JSTL.WISSDirectoryDataBean / br Total number of Files (JSTL): c:out value=${directory.totalNumFiles}/ br Total number of Files (JSP): jsp:getProperty name=directory property=totalNumFiles/ br c:forEach var=i begin=1 end=5 c:out value=${i}/br /c:forEach c:forEach var=file items=${directory.fileList} c:out value=${file}/br /c:forEach /body /html The result (in the browser) is: Total number of Files (JSTL): ${directory.totalNumFiles} Total number of Files (JSP): 2 ${i} ${i} ${i} ${i} ${i} ${file} So, as you can see, the c:xxx tags work correctly , the usual JSP tags work correctly also and the bean's totalNumFiles value is shown correctly too, but when I try to show the same value using the EL expression (${directory.totalNumFiles} ) - it does not work. Nor does a simple integer value ${i} - not a bean's property... It seems I'm missing something very obvious - just cannot see it just yet. Any ideas? I use Tomcat5.0.12. I did try to include the JSTL's jar files (standard.jar and jstl.jar) into my web application's WEB-INF/lib directory, even though they are in the $CATALINA/commons/lib - it did not help. Thanks, Marina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: EL expressions are not evaluated
Thanks, Manos, it worked! Marina -Original Message- From: Manos Papantoniou [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 1:27 PM To: Tag Libraries Users List Subject: Re: EL expressions are not evaluated Try adding ?xml version=1.0 ? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd at the top of your web.xml. If you don't tell tomcat this is a 2.4 version document it will not try evaluating EL expressions. Also, don't double-include libs that are already in tomcat/common/lib in your WEB-INF/lib since it can cause problems. There is no need for it either. If you are using an IDE you might have to include just the path to those libraries in the project settings Manos - Original Message - From: Popova, Marina To: '[EMAIL PROTECTED]' Sent: Tuesday, October 21, 2003 6:22 PM Subject: EL expressions are not evaluated Hi, Sorry if this question was asked already... I am trying to write a simple test web application using JSTL and encountered the following problem: JSTL core tags are working fine (like c:out ..., c:forEach...) but the EL expressions are not evaluated. I do use the c.tld file - it is in my app's WEB-INf directory. Below is a simple test page that demonstrates the problem: %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html head titleJSTL WISS Preview/title /head body bgcolor=#FF jsp:useBean id=directory class=test_wiss_JSTL.WISSDirectoryDataBean / br Total number of Files (JSTL): c:out value=${directory.totalNumFiles}/ br Total number of Files (JSP): jsp:getProperty name=directory property=totalNumFiles/ br c:forEach var=i begin=1 end=5 c:out value=${i}/br /c:forEach c:forEach var=file items=${directory.fileList} c:out value=${file}/br /c:forEach /body /html The result (in the browser) is: Total number of Files (JSTL): ${directory.totalNumFiles} Total number of Files (JSP): 2 ${i} ${i} ${i} ${i} ${i} ${file} So, as you can see, the c:xxx tags work correctly , the usual JSP tags work correctly also and the bean's totalNumFiles value is shown correctly too, but when I try to show the same value using the EL expression (${directory.totalNumFiles} ) - it does not work. Nor does a simple integer value ${i} - not a bean's property... It seems I'm missing something very obvious - just cannot see it just yet. Any ideas? I use Tomcat5.0.12. I did try to include the JSTL's jar files (standard.jar and jstl.jar) into my web application's WEB-INF/lib directory, even though they are in the $CATALINA/commons/lib - it did not help. Thanks, Marina - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL case sensitivity
John == John Thorhauer [EMAIL PROTECTED] writes: John When using JSTL and the Expression Language with a bean, how does the John api handle upper/lower case. For example, I have an class with a John getPONumber() method. Now if i want call that in the Expression John Language how is it properly done: John ${myobj.ponumber} John ${myobj.pONumber} John ${myobj.PONumber} John I am trying to figure out how this works so I can standardize my calls. I always avoid having the second letter capitalized. It just gets confusing otherwise. I think the correct property name would be poNumber, but you could either examine the JavaBeans specification, or perhaps write some testing code using the Introspector class, to get the answer from the horse's mouth. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL in Input taglib
The input taglib was developed before there was the Standard taglib and the EL. Over time, those taglibs here which are not superceded by the Standard taglib may have support for the EL added. Glenn Igor Kozlov wrote: Hello! I have a question. Why expression language don't used in Input taglib? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder| MOREnet System Programming | * if iz ina coment. | Missouri Research and Education Network | */ | -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL Functions
From what little I know, JSP 2.0 introduces the concept of functions to EL. I doubt these equate to ECMAScript, but is rather the ability to define your own functions. I'v eno clue if there will be standard-ised functions, though I'd expect JSTL might be the one to determine those. [Sorry, I'm quite clueless but there might be some nuggets there to help you move on, like reading the JSP 2.0 spec] Hen On Sun, 16 Feb 2003, David Goodenough wrote: I notice in the source of Taglibs that there are what appear to be EL functions, but these do not appear in the JSTL reference material. Is there a definition of these functions? Or can we assume that all the functions in JavaScript (EcmaScript) exist in EL? David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL Functions
JSP 2.0 provides tag-library developers with the ability to expose static methods as functions in their TLDs. These functions will be accessible to authors of any pages that import the containing tag library. This facility also allows JSTL to expose a set of standard functions. The precise set of functions that JSTL 1.1 will expose is still being debated, but it will likely include a limited set of string-manipulation functions and a handful of targeted solutions (such as a 'size' function). Future versions of JSTL can expose more functions as necessary. -- Shawn Bayern JSTL in Action http://www.manning.com/bayern On Sun, 16 Feb 2003, Henri Yandell wrote: From what little I know, JSP 2.0 introduces the concept of functions to EL. I doubt these equate to ECMAScript, but is rather the ability to define your own functions. I'v eno clue if there will be standard-ised functions, though I'd expect JSTL might be the one to determine those. [Sorry, I'm quite clueless but there might be some nuggets there to help you move on, like reading the JSP 2.0 spec] Hen On Sun, 16 Feb 2003, David Goodenough wrote: I notice in the source of Taglibs that there are what appear to be EL functions, but these do not appear in the JSTL reference material. Is there a definition of these functions? Or can we assume that all the functions in JavaScript (EcmaScript) exist in EL? David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EL in String Taglib 1.0
On Fri, 1 Nov 2002, Travis McCauley wrote: Hello, I apologize if this has been covered recently. I'm trying to find out how to use EL expressions in the 'with' attribute of a str:replace tag. I'm using the 10/8/02 1.0 Release Version. If you grab the latest nightly build [tonights, which should get created in about an hour or two], then it should support EL expressions in all attributes [except the var attribute] of all tags. I've not tested it heavily, my test page is at the bottom of this email, and I think it shows that things are generally working. To use the latest nightly jar you'll need to have the standard.jar and all its accompanying jars available, which is also available from the Jakarta Taglibs project as the JSTL Standard implementation. Hopefully you're on this already. If you use another JSTL implementation, then with help I should be able to make the String taglib support that. Hen % taglib prefix=c uri=http://java.sun.com/jstl/core; % % taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str % % taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; % c:forTokens var=token items=a,e,i delims=, str:replace replace=o with=${token}I am a bong/str:replace /c:forTokens c:set var=poo value=pooh/ ul liI am a str:capitalizec:out value=${poo}//str:capitalize of little brains/li liI am a str:upperCasec:out value=${poo}//str:upperCase of little brains/li liI am a str:lowerCasec:out value=${poo}//str:lowerCase of little brains/li /ul c:set var=cot value=4/ c:set var=cot2 value=2/ pSix tiggers, or four plus two: str:repeat count=${cot+cot2}Tigger /str:repeat/p -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
Re: EL in String Taglib 1.0
Hi Travis, String Taglib [and all the Jakarta taglibs to my knowledge] are not ELized yet. JSP 2.0 will make all taglibs ELized, so the question on whether to add hacked in support for ELs to the taglibs is a bit up in the air depending on when JSP 2.0 is released, and how long this is going to be before it's released [I thought it would be soon, but hard to tell sometimes]. The current nightly builds are pretty similar to your version, the only difference being a big bug-fix for using the taglib inside a loop [probably only occurs in certain servers] and the addition of a new attribute to the Replace tag [for handling newlines]. Sorry for the negative reply, Hen On Fri, 1 Nov 2002, Travis McCauley wrote: Hello, I apologize if this has been covered recently. I'm trying to find out how to use EL expressions in the 'with' attribute of a str:replace tag. I'm using the 10/8/02 1.0 Release Version. Thanks, Travis -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
RE: EL in String Taglib 1.0
-Original Message- From: Henri Yandell [mailto:bayard;generationjava.com] Sent: Friday, November 01, 2002 11:21 AM On Fri, 1 Nov 2002, Karr, David wrote: If there's interest in EL-izing certain non-ELed tag libraries, without changing the library (so the original library can still work in Servlet 2.2 environments), and you don't want to wait for JSP 2.0, you might consider using the strategy I used in building the Struts-EL tag library. I was thinking of a strategy that basically did a: Is this class [ExpressionEvaluator or whatever it is] in the classpath. If so, then cache this result statically [in my StringTagSupport] and make sure that ELizing happens. Any reason this would fail? String taglib has a pretty simple design, there's only one actual taglib class, all the rest just do String transformations and not tag stuff, so it can be nice and easy to upgrade :) You're intending to store the class name as a string somewhere, determine whether you can load it, and then call the methods of the class through Reflection? I suppose that would work. You'll have to rip out that code when you move to JSP 2.0. If you used a subclass, you would just remove the subclass. -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
RE: EL in String Taglib 1.0
On Fri, 1 Nov 2002, Karr, David wrote: -Original Message- From: Henri Yandell [mailto:bayard;generationjava.com] Sent: Friday, November 01, 2002 11:21 AM On Fri, 1 Nov 2002, Karr, David wrote: If there's interest in EL-izing certain non-ELed tag libraries, without changing the library (so the original library can still work in Servlet 2.2 environments), and you don't want to wait for JSP 2.0, you might consider using the strategy I used in building the Struts-EL tag library. I was thinking of a strategy that basically did a: Is this class [ExpressionEvaluator or whatever it is] in the classpath. If so, then cache this result statically [in my StringTagSupport] and make sure that ELizing happens. Any reason this would fail? String taglib has a pretty simple design, there's only one actual taglib class, all the rest just do String transformations and not tag stuff, so it can be nice and easy to upgrade :) You're intending to store the class name as a string somewhere, determine whether you can load it, and then call the methods of the class through Reflection? I suppose that would work. You'll have to rip out that code when you move to JSP 2.0. If you used a subclass, you would just remove the subclass. Kinda. Will play with it a while, see if it'll work. Hen -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
RE: EL in String Taglib 1.0
My goal is to not change the existing library at all, either at the source level or the deployment level. If you put the new classes in the old jar, then people deploying the old taglib will get those extra classes. Those shouldn't cause any conflicts, but I don't like to introduce changes that very likely won't have any effect. -Original Message- From: Henri Yandell [mailto:bayard;generationjava.com] Sent: Friday, November 01, 2002 12:31 PM On Fri, 1 Nov 2002, Karr, David wrote: All the tag classes in the Struts-EL tag library are subclasses of the corresponding class in the Struts tag library, and all of them look almost identical. In each one, the doStartTag() method calls a method called evaluateExpressions(), which just has one block of almost identical code for each property of the tag, which just passes the current value of the property through the EL parser and into the setter method for the property. The only exception to this relatively Okay. I'm convinced :) Will work on getting a 1.1 release out which has an EL'd component. Any reason it has to be a different jar? Or just one jar with them all and a different tld? -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
RE: EL in String Taglib 1.0
There is that, but in terms of project management for the Jakarta Taglibs, it'll turn each ELized version into a new project, or a branch or somewhat. Unless we declare org.apache.taglibs.name.el to be special perhaps, and output two jars, one with and one without the el sub-package. Will ask Glenn. Hen On Fri, 1 Nov 2002, Karr, David wrote: My goal is to not change the existing library at all, either at the source level or the deployment level. If you put the new classes in the old jar, then people deploying the old taglib will get those extra classes. Those shouldn't cause any conflicts, but I don't like to introduce changes that very likely won't have any effect. -Original Message- From: Henri Yandell [mailto:bayard;generationjava.com] Sent: Friday, November 01, 2002 12:31 PM On Fri, 1 Nov 2002, Karr, David wrote: All the tag classes in the Struts-EL tag library are subclasses of the corresponding class in the Struts tag library, and all of them look almost identical. In each one, the doStartTag() method calls a method called evaluateExpressions(), which just has one block of almost identical code for each property of the tag, which just passes the current value of the property through the EL parser and into the setter method for the property. The only exception to this relatively Okay. I'm convinced :) Will work on getting a 1.1 release out which has an EL'd component. Any reason it has to be a different jar? Or just one jar with them all and a different tld? -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
Re: EL in String Taglib 1.0
I would recommend creating the EL enabled version as a 2.0 release. Enabling EL in an older non EL taglib can allow you to restructure how your tags work. Some tags or tag attributes may no longer be necessary when the EL is available. Plus doesn't the EL require JSP 1.2? And the current taglib is compatible with JSP 1.1? Adding the EL is enough of a change to warrant a 2.0 release IMHO. Perhaps not from the developer viewpoint, but definitely from the user viewpoint. Regards, Glenn Henri Yandell wrote: There is that, but in terms of project management for the Jakarta Taglibs, it'll turn each ELized version into a new project, or a branch or somewhat. Unless we declare org.apache.taglibs.name.el to be special perhaps, and output two jars, one with and one without the el sub-package. Will ask Glenn. Hen On Fri, 1 Nov 2002, Karr, David wrote: My goal is to not change the existing library at all, either at the source level or the deployment level. If you put the new classes in the old jar, then people deploying the old taglib will get those extra classes. Those shouldn't cause any conflicts, but I don't like to introduce changes that very likely won't have any effect. -Original Message- From: Henri Yandell [mailto:bayard;generationjava.com] Sent: Friday, November 01, 2002 12:31 PM On Fri, 1 Nov 2002, Karr, David wrote: All the tag classes in the Struts-EL tag library are subclasses of the corresponding class in the Struts tag library, and all of them look almost identical. In each one, the doStartTag() method calls a method called evaluateExpressions(), which just has one block of almost identical code for each property of the tag, which just passes the current value of the property through the EL parser and into the setter method for the property. The only exception to this relatively Okay. I'm convinced :) Will work on getting a 1.1 release out which has an EL'd component. Any reason it has to be a different jar? Or just one jar with them all and a different tld? -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org -- -- Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder| MOREnet System Programming | * if iz ina coment. | Missouri Research and Education Network | */ | -- -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
RE: EL in String Taglib 1.0
-Original Message- From: Glenn Nielsen [mailto:glenn;mail.more.net] Sent: Friday, November 01, 2002 1:02 PM I would recommend creating the EL enabled version as a 2.0 release. Enabling EL in an older non EL taglib can allow you to restructure how your tags work. Some tags or tag attributes may no longer be necessary when the EL is available. Plus doesn't the EL require JSP 1.2? And the current taglib is compatible with JSP 1.1? Adding the EL is enough of a change to warrant a 2.0 release IMHO. Perhaps not from the developer viewpoint, but definitely from the user viewpoint. Why exactly would enabling EL allow you to restructure how your tags work? When you say that some tags or attributes may no longer be necessary, do you mean because some JSTL tag might perform that functionality? In the case of the Struts-EL library, I simply chose not to port certain tags from Struts to Struts-EL if their functionality was entirely provided by a JSTL tag. It didn't allow me restructure how tags work. Yes, using the EL requires JSP 1.2. That's why it's good at this point to keep the -rt and -el versions of libraries somewhat separated. I consider the functionality of a tag library, and the mechanism it uses to evaluate tag attributes, to be independent. Adding an EL-ized version of a library doesn't imply any change to the base library. Users using the -rt library would never notice a difference. However, the people who want to quickly move forward on using and experimenting with the JSTL would have another tool they could more easily integrate with, without having to wait for a 2.0 release. Note that I haven't used the String tag library, nor am I familiar with its contents (although I believe you have some substring matching tags, which is good). I'm just looking to promote usage of the JSTL, which will be more likely if popular tag libraries that do things the JSTL doesn't do can use the same attribute syntax. -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
Re: EL: Inconsistent bean introspection behaviour
Hi Kenny. Responses below -- On Thu, 24 Oct 2002, MacLeod, Kenny wrote: I've just started delving into JSTL, and I've run into some inconsistent behaviour between some of the tags. This behaviour concerns how the EL evaluates bean expressions. For example, say I have a bean user, with a method getUserName(). The EL expression ${user.userName} works fine in all cases. However, if I use the expression ${user.UserName} (note the change of case), then it works in some cases, but not others. Per the JavaBeans specification, ${user.userName} should work, and ${user.UserName} should not work. Specifically, it works for the value attributes of c:set and c:out, but it doesn't work for fmt:formatDate or c:param. The latter cases throw the exception 'Unable to find a value for UserName in object'. I've tried 1.0.1 and 1.0.2, but both behave the same. I can't find any previous mention of this problem, either. A read through the spec doesn't yield any clues, but I could be missing something. Are you certain that you've factored out all other possibilities. In the minimal case, it works correctly for me. That is, for me, given the following start to a page: % taglib prefix=c uri=http://java.sun.com/jstl/core; % % taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; % %! public static class Foo { public String getUserName() { return George; } } % % pageContext.setAttribute(user, new Foo()); % the following prints George: c:out value=${user.userName} / and the following yields an error: c:out value=${user.userName} / I'm using 1.0.2, but nothing in 1.0.2 should differ from 1.0.1 or 1.0 in this regard. Please post more information if you can reproduce the bug. Thanks, -- Shawn Bayern JSTL in Action http://www.jstlbook.com -- To unsubscribe, e-mail: mailto:taglibs-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
RE: EL and RT...
EL is the Expression Language, which is new for JSTL. RT is the RunTime expression mechanism from JSP 1.x (i.e. things like %= i++ %). JSTL provides taglibs that work with both. In general, you'll probably want to use the EL, since it's cleaner and more flexible, and only use the RT tags if you just can't do what you need with the EL. -- Martin Cooper -Original Message- From: Carlos Barroso [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 9:36 AM To: '[EMAIL PROTECTED]' Subject: EL and RT... I've seen in some docs of taglib's, references to EL and RT? What are they and what are the diferences between them? Can someone please help me? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL
Thank you, I understand. Maybe a stupid question, but why Java is not used as EL? Is not it possible to just generate JSP script in the page with minor substitution of variable names to pageContext.getAttribute() calls? Sorry I am not very professional in this area yet, so just a question. Best regards, Yuri. -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 31, 2002 6:46 AM To: Tag Libraries Users List Subject: Re: EL On Fri, 29 Mar 2002, Yuri Peter Kazakov wrote: Hello, how can I use JS functions in EL, for example: c:if test="${ a.indexOf( b ) 0 }" doesn't work. Any ideas? Regards, Yuri. You can't. The JSTL expression language is really just for simple references to request parameters, attributes, and other commonly accessed data. For more complex operations -- e.g., on Strings and Collections -- I suggest using custom tag libraries. Having said that, the EL may grow slightly to include some common functionality, either for JSTL 1.0 or JSP 1.3. These features are still being debated. -- Shawn Bayern Author, "JSP Standard Tag Library" http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: EL
On Fri, 29 Mar 2002, Yuri Peter Kazakov wrote: Hello, how can I use JS functions in EL, for example: c:if test=${ a.indexOf( b ) 0 } doesn't work. Any ideas? Regards, Yuri. You can't. The JSTL expression language is really just for simple references to request parameters, attributes, and other commonly accessed data. For more complex operations -- e.g., on Strings and Collections -- I suggest using custom tag libraries. Having said that, the EL may grow slightly to include some common functionality, either for JSTL 1.0 or JSP 1.3. These features are still being debated. -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]