Re: Nesting tags from different tag libraries?
Hi, Shawn Bayern wrote: On Tue, 23 Apr 2002, Carole E. Mah wrote: This is REALLY important, because each time I upgrade to a new version of the taglibs, I only need to update the one in /usr/java/jakarta-taglibs/. Whereas if I copied the file to all the different foo|bar|blort/WEB-INF directories, I'd have to replace about twelve different files. symlinks are your friend (I am sure Windows users can make a shortcut). No, that won't work on Windows, but it's a little-known fact that Window's NFTS filesystem indeed supports *hard* links, just like Unix does. You typically need a tool from Microsoft's Resource Kit to set them up, though; there isn't an interface that's more readily available. But unfortunatly, hardlinks won't help here (because you can't exchange the file all the hard links are pointing to so easily as with soft links). Shortcuts are a special files and not even all MS programs know how to properly deal with them Greetings, Wolfgang smime.p7s Description: S/MIME Cryptographic Signature
Re: integrating dbtags into MM Ultradev code
On Wed, 2002-04-24 at 05:07, Mariano Barcia wrote: I think there are other members more authorized than me to answer this, You are the first one to reply to my questions so thank you very much!!! but I think you should install CTLX (look for custom extensions in the Jakarta Taglibs). This will install an extension to the ultradev tool, and a servlet in your app server. Then you would insert and manage your custom tags (like escapeSQL or struts or any other) from Ultradev, see the documentation it comes with a tutorial. Beware if the version is of April 19 the servlet doesn´t work, I had to recompile it, I didn´t check the repository, send me a email and I will send you the good servlet. Is there a manual way? I just want to put the escapeSQL tag around one or two request.getParameter statements. All this trouble just to insert ' into a search box seems strange to me. There are several European languages which use the ' . How do people work around this? Why was it changed from JSP 1.0 where it worked just fine? Cheers Tony Grant -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: integrating dbtags into MM Ultradev code
I didn't succeeded in running the TLDparser for MM ultradev. Every time I tried to start and get the list of the tag library I got an error, and I abort to use that integration. But If someone realize it, please let us know how. Your problem maybe is just to use the c:out value=.. escapeXml=false/ Using this I built sql query and passed to the db for a search engine like: c:set var=testoTokenselect * from mytab where Az.ParolaChiave like '%c:out value=${token} escapeXml=true/%' /c:set Hope this will help you Bye Andrea -Original Message- From: tony [mailto:[EMAIL PROTECTED]] Sent: mercoledì 24 aprile 2002 08:37 To: Tag Libraries Users List Subject: Re: integrating dbtags into MM Ultradev code On Wed, 2002-04-24 at 05:07, Mariano Barcia wrote: I think there are other members more authorized than me to answer this, You are the first one to reply to my questions so thank you very much!!! but I think you should install CTLX (look for custom extensions in the Jakarta Taglibs). This will install an extension to the ultradev tool, and a servlet in your app server. Then you would insert and manage your custom tags (like escapeSQL or struts or any other) from Ultradev, see the documentation it comes with a tutorial. Beware if the version is of April 19 the servlet doesn´t work, I had to recompile it, I didn´t check the repository, send me a email and I will send you the good servlet. Is there a manual way? I just want to put the escapeSQL tag around one or two request.getParameter statements. All this trouble just to insert ' into a search box seems strange to me. There are several European languages which use the ' . How do people work around this? Why was it changed from JSP 1.0 where it worked just fine? Cheers Tony Grant -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html -- 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: Nesting tags from different tag libraries?
Yup, this is what my WEB-INF/lib looks like: 19.04.2002 16:36 206'289 crimson.jar 19.04.2002 16:36 186'980 jaxen-full.jar 19.04.2002 16:366'727 jdbc2_0-stdext.jar 19.04.2002 16:36 21'239 jstl.jar 19.04.2002 16:36 23'390 saxpath.jar 19.04.2002 16:36 577'152 standard.jar 23.04.2002 03:46 51'640 string.jar 19.04.2002 16:361'002'741 xalan.jar And this is what my web.xml looks like: ?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 taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib taglib taglib-urihttp://java.sun.com/jstl/xml/taglib-uri taglib-location/WEB-INF/x.tld/taglib-location /taglib taglib taglib-urihttp://java.sun.com/jstl/fmt/taglib-uri taglib-location/WEB-INF/fmt.tld/taglib-location /taglib taglib taglib-urihttp://java.sun.com/jstl/sql/taglib-uri taglib-location/WEB-INF/sql.tld/taglib-location /taglib taglib taglib-urihttp://jakarta.apache.org/taglibs/string-1.0/taglib-uri taglib-location/WEB-INF/string.tld/taglib-location /taglib /web-app I looked at the workaround that Ryan posted, but wasn't too sure about the CATALINA_HOME. I did create C:\Program Files\Apache Tomcat 4.0\temp but that didn't change anything. Regards, Eric -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 23. April 2002 18:41 To: Tag Libraries Users List Subject: RE: Nesting tags from different tag libraries? Eric, You need to install the individaul JAR files for all taglibs you want to use (e.g., standard.jar jstl.jar, or string.jar) in the WEB-INF/lib directory of your web application. Once you've done that, your container should recognize the tag libraries. Tomcat 4.0.3 has a bug whereby it doesn't recognize them by default unless you modify your web.xml file, but Ryan Lubke posted a workaround yesterday (And you can also upgrade to Tomcat 4.0.4B2). -- Shawn Bayern JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) On Tue, 23 Apr 2002 [EMAIL PROTECTED] wrote: Ok, I now installed the String Tag Library, and it works fine on its own. I installed it into my JSTL directory C:\Program Files\Apache Tomcat 4.0\webapps\jstl\ and put the *.war into C:\Program Files\Apache Tomcat 4.0\webapps\ (where I also put the JSTL standard-examples.war). So now I can use the JSTL examples from http://localhost:8080/standard-examples/index.html and I can use the String Tag exmples from http://localhost:8080/string-examples/index.html - everything works fine. However, I tried modifying the Iterator example http://localhost:8080/standard-examples/iterators/Simple.jsp to include String tags, i.e. the first lines read %@ taglib prefix=c uri=http://java.sun.com/jstl/ea/core; % %@ taglib prefix=str uri=http://jakarta.apache.org/taglibs/string-1.0; % (I didn't write String tags yet, since I always take baby steps...) and it crashes: org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/taglibs/string-1.0) cannot be resolved in either web.xml or the jar files deployed with this application at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:194) at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:174) at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspP arseEventListener.java:1162) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:758) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:121) etc. etc. Is there anything blindingly stupid I did wrong? ;-) Regards, Eric -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 23. April 2002 16:57 To: Tag Libraries Users List Subject: Re: Nesting tags from different tag libraries? On Tue, 23 Apr 2002 [EMAIL PROTECTED] wrote: Since JSTL doesn't do anything more than more or less writing stuff into a HTML page, I looked at the possibility of using another tag library for string manipulation. The String Tag library looks excellent. However, I'm not sure if something like this would work: str:substring start=1 end=10 c:out value=${someText}/ /str:substring At what point does the starting tag get the contained body? Will it only get the JSTL tag or will it get the content of the JSTL tag? The first case of course wouldn't help... Yes - JSP tags within other JSP tags get evaluated by the container as usual (and so your example will work) when the outer tag is declared as having a body type of JSP (versus
RE: integrating dbtags into MM Ultradev code
Andrea, pls see my posting of April 19, I solved the problem with TLDParser. You will have to recompile the servlet class. Maybe this class file helps you, unzip it under WEB-INF/classes directory of the webapp, cheers --mariano --- Andrea Grittini [EMAIL PROTECTED] escribió: I didn't succeeded in running the TLDparser for MM ultradev. Every time I tried to start and get the list of the tag library I got an error, and I abort to use that integration. But If someone realize it, please let us know how. Your problem maybe is just to use the c:out value=.. escapeXml=false/ Using this I built sql query and passed to the db for a search engine like: c:set var=testoTokenselect * from mytab where Az.ParolaChiave like '%c:out value=${token} escapeXml=true/%' /c:set Hope this will help you Bye Andrea -Original Message- From: tony [mailto:[EMAIL PROTECTED]] Sent: mercoledì 24 aprile 2002 08:37 To: Tag Libraries Users List Subject: Re: integrating dbtags into MM Ultradev code On Wed, 2002-04-24 at 05:07, Mariano Barcia wrote: I think there are other members more authorized than me to answer this, You are the first one to reply to my questions so thank you very much!!! but I think you should install CTLX (look for custom extensions in the Jakarta Taglibs). This will install an extension to the ultradev tool, and a servlet in your app server. Then you would insert and manage your custom tags (like escapeSQL or struts or any other) from Ultradev, see the documentation it comes with a tutorial. Beware if the version is of April 19 the servlet doesn´t work, I had to recompile it, I didn´t check the repository, send me a email and I will send you the good servlet. Is there a manual way? I just want to put the escapeSQL tag around one or two request.getParameter statements. All this trouble just to insert ' into a search box seems strange to me. There are several European languages which use the ' . How do people work around this? Why was it changed from JSP 1.0 where it worked just fine? Cheers Tony Grant -- RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html Macromedia UltraDev with PostgreSQL http://www.animaproductions.com/ultra.html -- 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] = Colaborativa.net SRL Argentina Email: [EMAIL PROTECTED] _ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com org.zip Description: org.zip -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Nesting tags from different tag libraries?
I just downloaded and installed Tomcat 4.0.4-b2 - same error message... Regards, Eric -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 23. April 2002 18:41 To: Tag Libraries Users List Subject: RE: Nesting tags from different tag libraries? Eric, You need to install the individaul JAR files for all taglibs you want to use (e.g., standard.jar jstl.jar, or string.jar) in the WEB-INF/lib directory of your web application. Once you've done that, your container should recognize the tag libraries. Tomcat 4.0.3 has a bug whereby it doesn't recognize them by default unless you modify your web.xml file, but Ryan Lubke posted a workaround yesterday (And you can also upgrade to Tomcat 4.0.4B2). -- Shawn Bayern JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) On Tue, 23 Apr 2002 [EMAIL PROTECTED] wrote: Ok, I now installed the String Tag Library, and it works fine on its own. I installed it into my JSTL directory C:\Program Files\Apache Tomcat 4.0\webapps\jstl\ and put the *.war into C:\Program Files\Apache Tomcat 4.0\webapps\ (where I also put the JSTL standard-examples.war). So now I can use the JSTL examples from http://localhost:8080/standard-examples/index.html and I can use the String Tag exmples from http://localhost:8080/string-examples/index.html - everything works fine. However, I tried modifying the Iterator example http://localhost:8080/standard-examples/iterators/Simple.jsp to include String tags, i.e. the first lines read %@ taglib prefix=c uri=http://java.sun.com/jstl/ea/core; % %@ taglib prefix=str uri=http://jakarta.apache.org/taglibs/string-1.0; % (I didn't write String tags yet, since I always take baby steps...) and it crashes: org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/taglibs/string-1.0) cannot be resolved in either web.xml or the jar files deployed with this application at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:194) at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:174) at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspP arseEventListener.java:1162) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:758) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:121) etc. etc. Is there anything blindingly stupid I did wrong? ;-) Regards, Eric -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 23. April 2002 16:57 To: Tag Libraries Users List Subject: Re: Nesting tags from different tag libraries? On Tue, 23 Apr 2002 [EMAIL PROTECTED] wrote: Since JSTL doesn't do anything more than more or less writing stuff into a HTML page, I looked at the possibility of using another tag library for string manipulation. The String Tag library looks excellent. However, I'm not sure if something like this would work: str:substring start=1 end=10 c:out value=${someText}/ /str:substring At what point does the starting tag get the contained body? Will it only get the JSTL tag or will it get the content of the JSTL tag? The first case of course wouldn't help... Yes - JSP tags within other JSP tags get evaluated by the container as usual (and so your example will work) when the outer tag is declared as having a body type of JSP (versus tagdependent) in its TLD. -- 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]
Mail Tag CC error
Hey everybody, I've setup the mailer tag library example(premailer.html, mailer.jsp) and it works, for the most part. Here's the problem: No matter what I put in the CC field, it uses the TO field instead. Is this a bug? Thanks, Chris Evans Canlink Interactive Technologies www.canlink.com Work: 613-549-7883 ext 32 Cell:613-539-3900 Codito, Ergo Sum
RE: Nesting tags from different tag libraries?
It looks like you have included the necessary JARs and that your deployment descriptor (web.xml) is fine; are you sure the TLD files that it points to are present in your WEB-INF/lib directory? -- Shawn Bayern JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) On Wed, 24 Apr 2002 [EMAIL PROTECTED] wrote: I just downloaded and installed Tomcat 4.0.4-b2 - same error message... Regards, Eric -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 23. April 2002 18:41 To: Tag Libraries Users List Subject: RE: Nesting tags from different tag libraries? Eric, You need to install the individaul JAR files for all taglibs you want to use (e.g., standard.jar jstl.jar, or string.jar) in the WEB-INF/lib directory of your web application. Once you've done that, your container should recognize the tag libraries. Tomcat 4.0.3 has a bug whereby it doesn't recognize them by default unless you modify your web.xml file, but Ryan Lubke posted a workaround yesterday (And you can also upgrade to Tomcat 4.0.4B2). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Nesting tags from different tag libraries?
Well, if you look at the directories: Directory of C:\Program Files\Apache Tomcat 4.0\webapps\jstl\WEB-INF 23.04.2002 18:01 DIR . 23.04.2002 18:01 DIR .. 19.04.2002 16:36 10'763 c-rt.tld 19.04.2002 16:36 11'312 c.tld 19.04.2002 16:36 11'409 fmt-rt.tld 19.04.2002 16:36 12'580 fmt.tld 23.04.2002 18:03 DIR lib 03.04.2002 03:461'313 permittedTaglibs.tld 03.04.2002 03:461'928 scriptfree.tld 19.04.2002 16:365'370 sql-rt.tld 19.04.2002 16:366'125 sql.tld 23.04.2002 03:46 16'387 string.tld 23.04.2002 18:24 956 web.xml 19.04.2002 16:367'200 x-rt.tld 19.04.2002 16:367'673 x.tld 12 File(s) 93'016 bytes and Directory of C:\Program Files\Apache Tomcat 4.0\webapps\jstl\WEB-INF\lib 23.04.2002 18:03 DIR . 23.04.2002 18:03 DIR .. 19.04.2002 16:36 206'289 crimson.jar 19.04.2002 16:36 186'980 jaxen-full.jar 19.04.2002 16:366'727 jdbc2_0-stdext.jar 19.04.2002 16:36 21'239 jstl.jar 19.04.2002 16:36 23'390 saxpath.jar 19.04.2002 16:36 577'152 standard.jar 23.04.2002 03:46 51'640 string.jar 19.04.2002 16:361'002'741 xalan.jar 8 File(s) 2'076'158 bytes it seems to me that everything is present. Regards, Eric -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 24. April 2002 17:34 To: Tag Libraries Users List Subject: RE: Nesting tags from different tag libraries? It looks like you have included the necessary JARs and that your deployment descriptor (web.xml) is fine; are you sure the TLD files that it points to are present in your WEB-INF/lib directory? -- Shawn Bayern JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) On Wed, 24 Apr 2002 [EMAIL PROTECTED] wrote: I just downloaded and installed Tomcat 4.0.4-b2 - same error message... Regards, Eric -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Dienstag, 23. April 2002 18:41 To: Tag Libraries Users List Subject: RE: Nesting tags from different tag libraries? Eric, You need to install the individaul JAR files for all taglibs you want to use (e.g., standard.jar jstl.jar, or string.jar) in the WEB-INF/lib directory of your web application. Once you've done that, your container should recognize the tag libraries. Tomcat 4.0.3 has a bug whereby it doesn't recognize them by default unless you modify your web.xml file, but Ryan Lubke posted a workaround yesterday (And you can also upgrade to Tomcat 4.0.4B2). -- 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]
Mailer Taglib SecurityException
I'm trying to run the Mailer taglib with a very basic configuration: mt:mail server=smtp.mail.yahoo.com authenticate=true user=my_id password=my_pw [EMAIL PROTECTED] from=[EMAIL PROTECTED] subject=a test message mt:messagethis is a test/mt:message mt:send/ pThe following errors occuredbr/br/ mt:error id=err jsp:getProperty name=err property=error/br/ /mt:error br/Please back up a page, fix the error and resubmit./p /mt:send /mt:mail I keep getting the exception message: java.lang.SecurityException: Access to default session denied at javax.mail.Session.getDefaultInstance(Session.java:175) at org.apache.taglibs.mailer.MailTag.doStartTag(MailTag.java:296) at org.apache.jsp.mail_0005fsend$jsp._jspService(mail_0005fsend$jsp.java:94) I have installed the mailer.jar file in my WEB-INF/lib directory, per the instructions. Are any other JAR files required? The configuration docs don't reference any other JAR files. Regards, - Derek Doerr [EMAIL PROTECTED] Beer is proof that God loves us and wants us to be happy. - Benjamin Franklin - Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more
Re: Mail Tag CC error
How old is the version you are using, that was fixed a while ago.. Address values in the setRecipient tag are reset to null after each use. Rich Catlett Chris Evans wrote: Hey everybody, I've setup the mailer tag library example(premailer.html, mailer.jsp) and it works, for the most part. Here's the problem: No matter what I put in the CC field, it uses the TO field instead. Is this a bug? Thanks, Chris Evans Canlink Interactive Technologies www.canlink.com Work: 613-549-7883 ext 32 Cell:613-539-3900 Codito, Ergo Sum -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mail Tag CC error
I picked up version 1. I'm going to try the latest. Chris Evans Canlink Interactive Technologies www.canlink.com Work: 613-549-7883 ext 32 Cell:613-539-3900 Codito, Ergo Sum - Original Message - From: Rich Catlett [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 11:00 AM Subject: Re: Mail Tag CC error | How old is the version you are using, that was fixed a while ago.. | Address values in the setRecipient tag are reset to null after each use. | | Rich Catlett | | Chris Evans wrote: | | Hey everybody, | | I've setup the mailer tag library example(premailer.html, mailer.jsp) and it works, for the most part. Here's the problem: | No matter what I put in the CC field, it uses the TO field instead. Is this a bug? | | Thanks, | | | | Chris Evans | Canlink Interactive Technologies | www.canlink.com | Work: 613-549-7883 ext 32 | Cell:613-539-3900 | | Codito, Ergo Sum | | | | | | | | -- | 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: Mailer Taglib SecurityException
Try running your servlet container with security debug turned on. Start the container and give the following options to java -Djava.security.debug=access,failure. Run the example, and then search your logs for the word denied one will be the attempt to get the default session. This should tell you permission you need to add to your security policy. Most likely your going to have to give the mail.jar (javamail jar file) permission to access the session. Hope this helps Rich Catlett Derek Doerr wrote: I'm trying to run the Mailer taglib with a very basic configuration: mt:mail server=smtp.mail.yahoo.com authenticate=true user=my_id password=my_pw [EMAIL PROTECTED] from=[EMAIL PROTECTED] subject=a test message mt:messagethis is a test/mt:message mt:send/ pThe following errors occuredbr/br/ mt:error id=err jsp:getProperty name=err property=error/br/ /mt:error br/Please back up a page, fix the error and resubmit./p /mt:send /mt:mail I keep getting the exception message: java.lang.SecurityException: Access to default session denied at javax.mail.Session.getDefaultInstance(Session.java:175) at org.apache.taglibs.mailer.MailTag.doStartTag(MailTag.java:296) at org.apache.jsp.mail_0005fsend$jsp._jspService(mail_0005fsend$jsp.java:94) I have installed the mailer.jar file in my WEB-INF/lib directory, per the instructions. Are any other JAR files required? The configuration docs don't reference any other JAR files. Regards, - Derek Doerr [EMAIL PROTECTED] Beer is proof that God loves us and wants us to be happy. - Benjamin Franklin - Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[standard] query tag exception when no session
The sql:query tag throws an exception in a page that has no session unless I provide the maxRows=-1 parameter. I just tested this with the nightly build from April 24 on Tomcat 4.0.2. Is this normal behavior...is a Session required? It seems like it should just skip checking the session if one has not been created yet, and default to -1 for maxRows. Here is the essence of the page: -- % page language=java contentType=text/html;charset=UTF-8 session=false % % taglib prefix=c uri=http://java.sun.com/jstl/core; % % taglib prefix=sql uri=http://java.sun.com/jstl/sql; % sql:transaction dataSource=${myDataSource} sql:query var=rset-- when I add maxRows=-1 here it works ...my query... /sql:query /sql:transaction c:forEach var=row items=${rset.rows} : /c:forEach -- And here is the stack trace from Tomcat's log: 2002-04-24 16:05:57 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an HttpSession at org.apache.jasper.runtime.PageContextImpl.getAttribute(PageContextImpl.java: 215) at javax.servlet.jsp.jstl.core.Config.get(Config.java:117) at javax.servlet.jsp.jstl.core.Config.find(Config.java:351) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryT agSupport.java:171) at org.apache.taglibs.standard.tag.el.sql.QueryTag.doStartTag(QueryTag.java:125 ) at org.apache.jsp.browsepl$jsp._jspService(browsepl$jsp.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) :
Re: [standard] query tag exception when no session
(By the way -- many thanks for reporting the issue! Jeez, I've been so pressed for time recently that my manners are slipping. :) ) Shawn On Wed, 24 Apr 2002, Halvorson, Loren wrote: The sql:query tag throws an exception in a page that has no session unless I provide the maxRows=-1 parameter. I just tested this with the nightly build from April 24 on Tomcat 4.0.2. Is this normal behavior...is a Session required? It seems like it should just skip checking the session if one has not been created yet, and default to -1 for maxRows. Here is the essence of the page: -- %@ page language=java contentType=text/html;charset=UTF-8 session=false % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % sql:transaction dataSource=${myDataSource} sql:query var=rset-- when I add maxRows=-1 here it works ...my query... /sql:query /sql:transaction c:forEach var=row items=${rset.rows} : /c:forEach -- And here is the stack trace from Tomcat's log: 2002-04-24 16:05:57 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an HttpSession at org.apache.jasper.runtime.PageContextImpl.getAttribute(PageContextImpl.java: 215) at javax.servlet.jsp.jstl.core.Config.get(Config.java:117) at javax.servlet.jsp.jstl.core.Config.find(Config.java:351) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryT agSupport.java:171) at org.apache.taglibs.standard.tag.el.sql.QueryTag.doStartTag(QueryTag.java:125 ) at org.apache.jsp.browsepl$jsp._jspService(browsepl$jsp.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) : -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Question about using xtags' forEach to sort
Hi All, I am new here. We are using xtags to render XML on our JSP pages. Has anybody tried the the attribute sort in forEach tag to do sorting based on two things? Like in SQL: order by something1, something2? I've tried to give a single xpath expression like sort=@categoryName and works great. But my problem is that I have to sort by groups organized by a certain id, like parentID. So when I try to give it sort=@parentID and @categoryName it does only search by parentID. Is there any way around this? Thank you, ~ Maya Vayner Technical Architect One Source Computer Services Website: www.myerete.com Email: [EMAIL PROTECTED] Work: (508)370-3960 ext.40 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [standard] query tag exception when no session
All fixed in the CVS head. Thanks again, -- Shawn Bayern JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) On Wed, 24 Apr 2002, Shawn Bayern wrote: (By the way -- many thanks for reporting the issue! Jeez, I've been so pressed for time recently that my manners are slipping. :) ) Shawn On Wed, 24 Apr 2002, Halvorson, Loren wrote: The sql:query tag throws an exception in a page that has no session unless I provide the maxRows=-1 parameter. I just tested this with the nightly build from April 24 on Tomcat 4.0.2. Is this normal behavior...is a Session required? It seems like it should just skip checking the session if one has not been created yet, and default to -1 for maxRows. Here is the essence of the page: -- %@ page language=java contentType=text/html;charset=UTF-8 session=false % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % sql:transaction dataSource=${myDataSource} sql:query var=rset-- when I add maxRows=-1 here it works ...my query... /sql:query /sql:transaction c:forEach var=row items=${rset.rows} : /c:forEach -- And here is the stack trace from Tomcat's log: 2002-04-24 16:05:57 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an HttpSession at org.apache.jasper.runtime.PageContextImpl.getAttribute(PageContextImpl.java: 215) at javax.servlet.jsp.jstl.core.Config.get(Config.java:117) at javax.servlet.jsp.jstl.core.Config.find(Config.java:351) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryT agSupport.java:171) at org.apache.taglibs.standard.tag.el.sql.QueryTag.doStartTag(QueryTag.java:125 ) at org.apache.jsp.browsepl$jsp._jspService(browsepl$jsp.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) : -- 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: [standard] query tag exception when no session
By the way many thanks for the exceptional work on the standard tag library. It's really a joy to work with. As an experiment, I'm porting some scriptlet-laden pages to JSTL. It's amazing how much it cleans things up. The one thing I really would have liked was the ability to test the size of a collection before I iterate it. (in my case I needed to know when there is exactly 1 item) I know there was a discussion on this a little while ago and saw your workaround to pre-iterate it, but it's not a practical solution for large collections. So while I had your ear, I just wanted get my vote in to add some way to do it. Although I'm sure it's too late. --LH -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 4:20 PM To: Tag Libraries Users List Subject: Re: [standard] query tag exception when no session (By the way -- many thanks for reporting the issue! Jeez, I've been so pressed for time recently that my manners are slipping. :) ) Shawn On Wed, 24 Apr 2002, Halvorson, Loren wrote: The sql:query tag throws an exception in a page that has no session unless I provide the maxRows=-1 parameter. I just tested this with the nightly build from April 24 on Tomcat 4.0.2. Is this normal behavior...is a Session required? It seems like it should just skip checking the session if one has not been created yet, and default to -1 for maxRows. Here is the essence of the page: -- %@ page language=java contentType=text/html;charset=UTF-8 session=false % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % sql:transaction dataSource=${myDataSource} sql:query var=rset-- when I add maxRows=-1 here it works ...my query... /sql:query /sql:transaction c:forEach var=row items=${rset.rows} : /c:forEach -- And here is the stack trace from Tomcat's log: 2002-04-24 16:05:57 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalArgumentException: can't access SESSION_SCOPE without an HttpSession at org.apache.jasper.runtime.PageContextImpl.getAttribute(PageContextImpl .java: 215) at javax.servlet.jsp.jstl.core.Config.get(Config.java:117) at javax.servlet.jsp.jstl.core.Config.find(Config.java:351) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryT agSupport.java:171) at org.apache.taglibs.standard.tag.el.sql.QueryTag.doStartTag(QueryTag.java:125 ) at org.apache.jsp.browsepl$jsp._jspService(browsepl$jsp.java:123) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) : -- 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: [standard] query tag exception when no session
On Wed, 24 Apr 2002, Halvorson, Loren wrote: The one thing I really would have liked was the ability to test the size of a collection before I iterate it. (in my case I needed to know when there is exactly 1 item) I know there was a discussion on this a little while ago and saw your workaround to pre-iterate it, but it's not a practical solution for large collections. So while I had your ear, I just wanted get my vote in to add some way to do it. Although I'm sure it's too late. It's indeed too late for JSTL 1.0, though we realize it's important and will probably address it in JSTL 1.1/JSP 1.3. The best workaround, when you're a Java programmer, is to provide all data the page authors will need yourself; e.g., public class MyData { Collection collection = ...; public Collection getCollection() { return collection; } public int getSize() { return collection.size(); } // accessors useful data other than size } Glad to hear you're enjoying JSTL, though! Thanks for the note. -- Shawn Bayern 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]
RE: [standard] query tag exception when no session
Not sure if I ever mentioned this. With an iterate tag, would the following be possible: [not got jstl to hand so inventing the names] c:iterate collection=myPhones variable=col c:preIteratepMy phones areul/c:preIterate lic:get name=col//li c:postIterate/ul./p/c:postIterate /c:iterate I'm sure I'm doing lots of nasty things. But thought I'd ask. Hen On Wed, 24 Apr 2002, Shawn Bayern wrote: On Wed, 24 Apr 2002, Halvorson, Loren wrote: The one thing I really would have liked was the ability to test the size of a collection before I iterate it. (in my case I needed to know when there is exactly 1 item) I know there was a discussion on this a little while ago and saw your workaround to pre-iterate it, but it's not a practical solution for large collections. So while I had your ear, I just wanted get my vote in to add some way to do it. Although I'm sure it's too late. It's indeed too late for JSTL 1.0, though we realize it's important and will probably address it in JSTL 1.1/JSP 1.3. The best workaround, when you're a Java programmer, is to provide all data the page authors will need yourself; e.g., public class MyData { Collection collection = ...; public Collection getCollection() { return collection; } public int getSize() { return collection.size(); } // accessors useful data other than size } Glad to hear you're enjoying JSTL, though! Thanks for the note. -- Shawn Bayern 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: [standard] query tag exception when no session
On Wed, 24 Apr 2002, Henri Yandell wrote: Not sure if I ever mentioned this. With an iterate tag, would the following be possible: [not got jstl to hand so inventing the names] c:iterate collection=myPhones variable=col c:preIteratepMy phones areul/c:preIterate lic:get name=col//li c:postIterate/ul./p/c:postIterate /c:iterate I'm sure I'm doing lots of nasty things. But thought I'd ask. Are you asking, Can something like this be done in JSTL? The answer is yes: c:forEach items=${myPhones} var=col varStatus=s c:if test=${s.first}My phones areul/c:if lic:out value=${col}//li c:if test=${s.last}/ul./p/c:if /c:forEach This is useful because opening and closing ul tags won't print unless the collection has at least one item. This avoids empty ul/ul elements (which normally display fine but are technically an error). -- Shawn Bayern 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]
RE: [standard] query tag exception when no session
Shawn, Yes, I agree the best work around for now is to provide the getSize() accessor to your collection. Unfortunately I can't provide the getSize() in this case because I'm iterating a native array and don't have a wrapper. But I did realize that to find out if there is exactly 1, all I really need to pre-iterate is the first two elements using the end attribute. This eases the pain of having to iterate the entire collection twice. c:forEach varStatus=s items=${dataSources} end=1 c:set var=size value=${s.count}/ /c:forEach c:choose c:when test=${size == 1} .. Do what needs to be done when there is exactly one element in the array /c:when c:otherwise .. Do what needs to be done when there are more than one /c:otherwise /c:choose -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 4:37 PM To: Tag Libraries Users List Subject: RE: [standard] query tag exception when no session On Wed, 24 Apr 2002, Halvorson, Loren wrote: The one thing I really would have liked was the ability to test the size of a collection before I iterate it. (in my case I needed to know when there is exactly 1 item) I know there was a discussion on this a little while ago and saw your workaround to pre-iterate it, but it's not a practical solution for large collections. So while I had your ear, I just wanted get my vote in to add some way to do it. Although I'm sure it's too late. It's indeed too late for JSTL 1.0, though we realize it's important and will probably address it in JSTL 1.1/JSP 1.3. The best workaround, when you're a Java programmer, is to provide all data the page authors will need yourself; e.g., public class MyData { Collection collection = ...; public Collection getCollection() { return collection; } public int getSize() { return collection.size(); } // accessors useful data other than size } Glad to hear you're enjoying JSTL, though! Thanks for the note. -- Shawn Bayern 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: Mailer Taglib SecurityException
Rich, I'm running Tomcat 4.0.2. I suspect that the security changes that you reference, below, should be made to the catalina.policy file. Do you know what the change would be? Also, do you know where, in the server.xml file I would turn on security debugging? Thanks! - Derek Rich Catlett [EMAIL PROTECTED] wrote: Try running your servlet container with security debug turned on. Start the container and give the following options to java -Djava.security.debug=access,failure. Run the example, and then search your logs for the word denied one will be the attempt to get the default session. This should tell you permission you need to add to your security policy. Most likely your going to have to give the mail.jar (javamail jar file) permission to access the session. Hope this helps Rich Catlett Derek Doerr wrote: I'm trying to run the Mailer taglib with a very basic configuration: server=smtp.mail.yahoo.com authenticate=true user=my_id password=my_pw [EMAIL PROTECTED] from=[EMAIL PROTECTED] subject=a test message this is a test The following errors occured Please back up a page, fix the error and resubmit. I keep getting the exception message: java.lang.SecurityException: Access to default session denied at javax.mail.Session.getDefaultInstance(Session.java:175) at org.apache.taglibs.mailer.MailTag.doStartTag(MailTag.java:296) at org.apache.jsp.mail_0005fsend$jsp._jspService(mail_0005fsend$jsp.java:94) I have installed the mailer.jar file in my WEB-INF/lib directory, per the instructions. Are any other JAR files required? The configuration docs don't reference any other JAR files. Regards, - Derek Doerr [EMAIL PROTECTED] Beer is proof that God loves us and wants us to be happy. - Benjamin Franklin - Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more
RE: [standard] query tag exception when no session
On Wed, 24 Apr 2002, Henri Yandell wrote: I was asking more if there could be a preForEach and postForEach internal tags. It's not something I've seen in custom JSPs much yet, special concents which do different things. So: c:preForEach varStatus=s./c:preForEach etc. Take away the iffing and elsing for what is a very standard thing to do. You could write such a custom tag using the LoopTagStatus interface exposed by the JSTL LoopTag interface; there didn't seem to be any reason to design standard tags for these particular cases given how easy the c:if syntax is. But custom-tag authors can write tags to sense the first or last iteration, differentiate between even and odd rows, and so forth. -- Shawn Bayern 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]
RE: forEach compared to logic:iterate
This looks like it will work, but there is no c:declare tag in JSTL. There is a c:set, but it has no type attribute. Thanks, Matt -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 12:22 PM To: Struts Developers List Subject: RE: forEach compared to logic:iterate c:forEach var=pageInfo items=${topicForm.pages} c:declare id=pageInfo type=package.PageForm/ html:link forward=getPage name=pageInfo property=pageTopicMap title=%=pageInfo.getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /c:forEach The important part is the c:declare, which defines the scripting variable (var attributes in other tags don't). Also the type attribute lets you remove the cast from the scriptlet. You could also use bean:define, but if you're migrating away from Struts tags, you'll probably want to do it this way. -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 1:01 AM To: 'Tag Libraries Users List' Cc: 'Struts Developers List' Subject: c:forEach compared to logic:iterate I'm using the logic:iterate tag in the following manner: logic:iterate id=pageInfo name=topicForm property=pages html:link forward=getPage name=pageInfo property=pageTopicMap title=%=((PageForm)pageInfo).getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /logic:iterate Which works great! However, I was hoping to migrate my logic tags to JSTL and the following doesn't work: c:forEach var=pageInfo items=${topicForm.pages} html:link forward=getPage name=pageInfo property=pageTopicMap title=%=((PageForm)pageInfo).getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /c:forEach However, I get the following error when I try this: [ServletException in:/viewer/coursePage.jsp] Unable to compile class for JSP An error occured between lines: 83 and 84 in the jsp file: /viewer/coursePage.jsp Generated servlet error: D:\Tools\tomcat-4.0.1\work\localhost\onpoint\viewer\coursePage $jsp.java: 743: Undefined variable: pageInfo _jspx_th_html_link_0.setTitle(((PageForm)pageInfo).getName()); ^ 1 error ' -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [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]
Using c:import to include the contents of a file
I want to do the following: c:import url=file://d:\repository\assets\doc.html/ However, I get an UnknownHostException - is it possible to do this with JSTL? My only solution (so far) is to use an iframe and do: iframe src=file://d:\repository\assets\doc.html/iframe It's the only way I've found to read a file from the filesystem when it's outside Tomcat's webapps directory. Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using c:import to include the contents of a file
Yes, you can do this. You need to use three slashes at the front, so your example would be: c:import url=file:///d:\repository\assets\doc.html/ From the remaining separators, you can use either '/' or '\', but personally I always use '/' because then I don't have to worry about which I can use where. -- Martin Cooper - Original Message - From: Matt Raible [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 7:14 PM Subject: Using c:import to include the contents of a file I want to do the following: c:import url=file://d:\repository\assets\doc.html/ However, I get an UnknownHostException - is it possible to do this with JSTL? My only solution (so far) is to use an iframe and do: iframe src=file://d:\repository\assets\doc.html/iframe It's the only way I've found to read a file from the filesystem when it's outside Tomcat's webapps directory. Thanks, Matt -- 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: Can't concatenate 2 strings together
In JSTL, '+' is a numeric operator only. However, this will do what you want: c:import url=${viewPath}${assetForm.filename}/ -- Martin Cooper - Original Message - From: Matt Raible [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Wednesday, April 24, 2002 6:41 PM Subject: Can't concatenate 2 strings together This seems like it should work: c:import url=${viewPath + assetForm.filename}/ However, I'm getting the following error - any ideas? [ServletException in:/viewer/coursePage.jsp] Attempt to apply operator + to arguments of type java.lang.String and java.lang.String' -- 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]