Re: Fedora Core 3
On Wednesday 01 December 2004 11:34 am, Elihu Smails wrote: I have Tomcat 5.5.4, Java 1.5.0 and Apache 2.1 running on a Fedora Core 3 box. I have not seen any problems to date.. Ditto. Installed Tomcat from the latest tarball. Was ridiculously easy. Did not bother to un-install the gcc-java or libgcj stuff that comes with FC3, just set PATH and JAVA_HOME to the new stuff. jdk1.5.0 jakarta-tomcat-5.5.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSTL forEach acting funny
Hi, Tomcat n00b here just installed 5.5.4. Trying to do the HOWTO at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html Finally got the JDBC connection working I think, but my final JSP output just shows == Results Foo ${row.foo} Bar ${row.bar} == It's like the c:forEach tag is being ignored and the contents are not parsed at all. I actually have 3 rows in the testdata table so if it was at least looping I should have repeats. The test.jsp is exactly like the tutorial. I have jstl.jar and standard.jar in my WEB-INF/lib copied from jakarta-taglibs-standard-1.1.2 from the jakarta site. Please let me know what I did wrong, I am going through the JSTL docs but everything seems to be on the up-and-up with that... thanks -Sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL forEach acting funny
On Thursday 02 December 2004 07:39 am, Allistair Crossley wrote: for a question on forEach I would expect you to have copied in the forEach part ;) i am surprised if you are seeing the actual dollar signs and braces as tomcat should be picking those up as expression language. is there any errors in stdout? also, which scope are you placing your results into and how are you placing those results there, i.e what is row? what value are you suppluing items in forEach ... etc.. more info people! Well its exactly like on the HOWTO page I linked to, you can see the whole thing there, including what my web.xml and server.xml files look like since I followed this by letter. Actually I just found that passing a nonexistent collection token to forEach results in the same thing - it doesn't loop, and it doesn't error, and just outputs everything between the c:forEach.../c:forEach tags as if nothing happened. To wit: c:forEach var=foo items=${thisIsANonExistentCollection} foo is ${foo}br/ /c:forEach just gives me: foo is ${foo} in the browser. Of course this behavior differs from every reasonable expectation of what a foreach type construct should do. So is there some misconfiguration? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL forEach acting funny
On Thursday 02 December 2004 08:07 am, Allistair Crossley wrote: you need %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % at the top of your jsp though. Have that - if I didn't then c:forEach ... would show up in the output, but it doesn't. My apologies, I should have mentioned I was doing the mySQL DBCP Example specifically. Anyway, here is the whole jsp: = %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/TestDB select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} Foo ${row.foo}br/ Bar ${row.bar}br/ /c:forEach /body /html = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL forEach acting funny
On Thursday 02 December 2004 08:12 am, David Smith wrote: As I understand it, you need to make sure Tomcat knows you want the 2.4 spec as opposed to the 2.3 spec to use JSTL semantics like ${}. What does your web.xml file show at the top? Does it use the 2.4 schema? --David I think so. Actually I am removing all the DB stuff to narrow this down a bit. Here is my new server.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 /web-app = And now, even weirder, I use the following simplified JSP: = %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % c:forTokens var=foo items=5,6,7,8 delims=, foo is ${foo} br/ /c:forTokens = and got foo is ${foo} foo is ${foo} foo is ${foo} foo is ${foo} So now it is looping but the ${} is still not parsed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL forEach acting funny
On Thursday 02 December 2004 08:27 am, Allistair Crossley wrote: you mention you changed your server.xml .. that's wrong. i said web.xml and this will be at webapps/yourwebapp/WEB-INF/web.xml Sorry, I misspoke there. Actually it _was_ web.xml that has the contents changed as indicated, in the correct location. Your explanation seems reasonable but as far as I can tell web.xml is set to trigger 2.4 mode. The opening web-app tag now looks exactly like the one you sent. Also restarted Tomcat just to be sure. Is there any way to tell from inside the JSP what mode you are in? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL forEach acting funny [SORT OF SOLVED]
On Thursday 02 December 2004 08:52 am, Allistair Crossley wrote: i don't know sorry. i can however tell you that i just pasted your simplified code into one of my JSPs and it works (i.e foo is 1 ..). you've installed standard.jar and jstl.jar as your forEach is now working. it's probably very obvious but I cannot spot it. you have not got any EL disabling I assume like isELIgnored sorry pal! Thanks everyone for your time bandwidth and neural firings. I created a new dir under webapps/ called tagtest/, and basically replicated all the steps in building the JDBC example given - only backwards - and it works fine there. The forEach tag acts normal in the new dir. Funny thing is, the stuff in the original dir is the same - permissions and everything - but still has the broken behavior. Like it is being cached. I can't figure it out, just chalk it up to bad voodoo in that dir and move on I guess. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]