RE: JSTL + XSLT
Hi Shawn, Thanx that solved the problem. Now it is working like it should be. Had still some files left of the old beta. Sorry about that. Manfred. -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 8:27 PM To: Tag Libraries Users List Subject: RE: JSTL + XSLT On Fri, 12 Jul 2002, Manfred Riem wrote: I actually am doing that. See var=xsl and later xslt=${xsl}? And the error stays the Same. Hmm - I think I actually misread your original code. Sorry about that. I've taken a closer look and tried to correlate your stack trace with version 1.0 of the Standard Taglib. Are you using that version? This could be an older bug related to the way we set up our DocumentBuilderFactory; it was fixed some time before the version 1.0 release. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
apply.jsp example not working
hi, When I try to run the Apply.jsp example from the examples from jakarta xsl taglibs, I get the following exception: Internal Servlet Error: java.lang.NoSuchMethodError: org.apache.xalan.xslt.Process.getDefaultLiaison()Ljava/lang/String; at org.apache.xalan.xslt.XSLTEngineImpl.(XSLTEngineImpl.java:367) at org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor(XSLTProcessorFactory .java:79) at org.apache.taglibs.xsl.ApplyTag.doEndTag(ApplyTag.java:271) at jsp.Apply_15._jspService(Apply_15.java:144) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I nterceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:516) at java.lang.Thread.run(Thread.java:536) Yes, I have done the three configuration steps described in the docs: * Copy the tag library descriptor file to the /WEB-INF subdirectory of your web application. * Copy the tag library JAR file to the /WEB-INF/lib subdirectory of your web application. * Add a taglib element to your web application deployment descriptor in /WEB-INF/web.xml like this: Does anyone have any idea what might be wrong? Regards, Ruud. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: apply.jsp example not working
Ruud, The XSL Taglib is no longer supported; use the Standard Taglib, which is an implementation of the JSP Standard Tag Library (JSTL) instead. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 from Manning Publications) On Mon, 15 Jul 2002 [EMAIL PROTECTED] wrote: hi, When I try to run the Apply.jsp example from the examples from jakarta xsl taglibs, I get the following exception: Internal Servlet Error: java.lang.NoSuchMethodError: org.apache.xalan.xslt.Process.getDefaultLiaison()Ljava/lang/String; at org.apache.xalan.xslt.XSLTEngineImpl.(XSLTEngineImpl.java:367) at org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor(XSLTProcessorFactory .java:79) at org.apache.taglibs.xsl.ApplyTag.doEndTag(ApplyTag.java:271) at jsp.Apply_15._jspService(Apply_15.java:144) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I nterceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:516) at java.lang.Thread.run(Thread.java:536) Yes, I have done the three configuration steps described in the docs: * Copy the tag library descriptor file to the /WEB-INF subdirectory of your web application. * Copy the tag library JAR file to the /WEB-INF/lib subdirectory of your web application. * Add a taglib element to your web application deployment descriptor in /WEB-INF/web.xml like this: Does anyone have any idea what might be wrong? Regards, Ruud. -- 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 Tag library - any additions.
Well that sorted it.. As I had messed around with the TLD file I thought I'd start again from scratch so I deleted both and put tried Gin Chen's code. Here it is mt:mail server=dilbert subject=Bsafe/400e DemoRequest from=[EMAIL PROTECTED] mt:setrecipient type=to%= request.getParameter(Email)% /mt:setrecipient mt:message Your Bsafe Demo will be mailed to you /mt:message mt:send/ /mt:mail And it worked... Thanks to everyone who contributed to this thread. Don't change the tld file... Blow me this was the second example in the documentation... RTFM everyone..including me!! Regards Kevin -Original Message- From: Chen, Gin [mailto:[EMAIL PROTECTED]] Sent: 12 July 2002 17:30 To: 'Tag Libraries Users List' Subject: RE: Mailer Tag library - any additions. according the the mailer documentation: http://jakarta.apache.org/taglibs/doc/mailer-doc/mailer-1.0/index.html none of the items you are setting accept runtime expressions. Runtime Expressions is not controlled by a simple on/off type switch. It has to be built into the taglib. have you tried using: mt:setrecipient type=cc[EMAIL PROTECTED]/mt:setrecipient you might be able to do something like: mt:mail server=dilbert subject=Bsafe/400e DemoRequest from=[EMAIL PROTECTED] mt:setrecipient type=cc%= request.getParameter(Email) %/mt:setrecipient /mt:mail Or even better (although I dont know if it will support it) use the new EL of JSTL and do something like: mt:mail server=dilbert subject=Bsafe/400e DemoRequest from=[EMAIL PROTECTED] to=${request.email} I haven't been able to really use the EL functionality in my projects cause we havent ported to a container that supports JSP1.2 yet (hopefully, soon) so the syntax might not be absolutely correct but give it a try. -Tim -Original Message- From: Kevin Passey [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 11:17 AM To: Taglibs (E-mail) Subject: Mailer Tag library - any additions. As the rtexprvalue is set to no on all of the address parameters, am I to assume this tag library will not allow variables in the from/to/cc/bcc tags. Here is what my taglib book says the rtexprvalue element defines whether an attributes value is hard coded at design time, or as a constant stream, or is the result of the evaluation of a Java expression, at run time (rtexprvalue stands for runtime expression value). If its dynamic, the value of rtexprvalue must be true or yes, and the value of the attribute must be calculated with a JSP expression. If the value is static, it must be false or no, and the value must be hard coded at design time. The default value is false static attributes must be passed as strings. So my assumption is that as these are defined as no in the tag library - static strings must be used - not a lot of good if you are trying to pass an email address from a form. Anybody more experienced than me care to offer an opinion or a work around. Thanks for your help anyway Kevin Passey -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
db taglibs questions
Hello! I'm using DBTags Tag library. I executes simple query: sql:statement id=stmt1 conn=conn1 sql:query select string_value, number_value from my_table /sql:query /sql:statement How i can output result: sql:setColumn position=1 to the string or int variable (not to JSP directly) ? (i try % A= sql:setColumn position=1 %, but get error) Best regards, Igor Bursin.
RE: db taglibs questions
Igor, Here is some of my code that displays database stuff in a table - I've only given the row TR tdsql:getColumn position=1//td tdsql:getColumn position=2//td tdsql:getColumn position=3//td tdsql:getColumn position=4//td tdsql:getColumn position=5//td tdsql:getColumn position=6//td tdsql:getColumn position=7//td tdsql:getColumn position=8//td tdsql:getColumn position=9//td tdsql:getColumn position=10//td tdsql:getColumn position=11//td tdsql:getColumn position=12//td tdsql:getColumn position=13//td tdsql:getColumn position=14//td /TR Hope this helps Regards Kevin Passey -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:06 To: [EMAIL PROTECTED] Subject: db taglibs questions Hello! I'm using DBTags Tag library. I executes simple query: sql:statement id=stmt1 conn=conn1 sql:query select string_value, number_value from my_table /sql:query /sql:statement How i can output result: sql:setColumn position=1 to the string or int variable (not to JSP directly) ? (i try % A= sql:setColumn position=1 %, but get error) Best regards, Igor Bursin. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: db taglibs questions
Ok I'm sorry.. Try this % String = request.getParameter(Email); % Good luck. Kevin -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:53 To: Tag Libraries Users List Subject: Re: db taglibs questions Hello, Kevin. I do not need to show results sql query through web. I want to write down results of sql query in variables that further them to use... - Original Message - From: Kevin Passey [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 6:31 PM Subject: RE: db taglibs questions Igor, Here is some of my code that displays database stuff in a table - I've only given the row TR tdsql:getColumn position=1//td tdsql:getColumn position=2//td tdsql:getColumn position=3//td tdsql:getColumn position=4//td tdsql:getColumn position=5//td tdsql:getColumn position=6//td tdsql:getColumn position=7//td tdsql:getColumn position=8//td tdsql:getColumn position=9//td tdsql:getColumn position=10//td tdsql:getColumn position=11//td tdsql:getColumn position=12//td tdsql:getColumn position=13//td tdsql:getColumn position=14//td /TR Hope this helps Regards Kevin Passey -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:06 To: [EMAIL PROTECTED] Subject: db taglibs questions Hello! I'm using DBTags Tag library. I executes simple query: sql:statement id=stmt1 conn=conn1 sql:query select string_value, number_value from my_table /sql:query /sql:statement How i can output result: sql:setColumn position=1 to the string or int variable (not to JSP directly) ? (i try % A= sql:setColumn position=1 %, but get error) Best regards, Igor Bursin. -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: db taglibs questions
Use the to property of the getColumn tag (see doco). e.g. sql:getColumn position=1 to=field1 / You can also use the optional scope parameter to set the scope. e.g. sql:getColumn position=1 to=field1 scope=page / I think it defaults to page scope (others are request,session,), which means you'd use the pageContext.getAttribute() method to extract the value (pageContext.getAttribute(field1)). Hope this helps. Steve -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 10:53 AM To: Tag Libraries Users List Subject: Re: db taglibs questions Hello, Kevin. I do not need to show results sql query through web. I want to write down results of sql query in variables that further them to use... - Original Message - From: Kevin Passey [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 6:31 PM Subject: RE: db taglibs questions Igor, Here is some of my code that displays database stuff in a table - I've only given the row TR tdsql:getColumn position=1//td tdsql:getColumn position=2//td tdsql:getColumn position=3//td tdsql:getColumn position=4//td tdsql:getColumn position=5//td tdsql:getColumn position=6//td tdsql:getColumn position=7//td tdsql:getColumn position=8//td tdsql:getColumn position=9//td tdsql:getColumn position=10//td tdsql:getColumn position=11//td tdsql:getColumn position=12//td tdsql:getColumn position=13//td tdsql:getColumn position=14//td /TR Hope this helps Regards Kevin Passey -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:06 To: [EMAIL PROTECTED] Subject: db taglibs questions Hello! I'm using DBTags Tag library. I executes simple query: sql:statement id=stmt1 conn=conn1 sql:query select string_value, number_value from my_table /sql:query /sql:statement How i can output result: sql:setColumn position=1 to the string or int variable (not to JSP directly) ? (i try % A= sql:setColumn position=1 %, but get error) Best regards, Igor Bursin. -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Simple JSTL SQL update fails, but only when parameters come fromNetscape 4.x browser
On Sat, 13 Jul 2002, John Hicks wrote: Everything works fine, that is, *unless* the form is posted from the Netscape 4.73 browser!! (It works fine coming from Konqueror and Opera 6.0 and Netscape 7 (all running under Linux) and from IE6.0 and Opera 6.01 running in Windows. But when the request comes from Netscape 4.73, I get a stack trace (which I'll post at the bottom of this message). It sounds like a parameter isn't coming through on Netscape 4.73. This is a little perplexing, since to my knowledge, Netscape 4.73 behaves similarly to other browsers with respect to how it submits empty form fields. To debug the problem, walk through all of the parameters you're using in sql:param tags manually (e.g., using the same exprssions with c:out) to determine which one is failing. Then walk backwards to the form itself and determine whether the problem lies with Netscape or elsewhere. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Simple JSTL SQL update fails,but only when parameters come from Netscape 4.x browser
Don't know if this will help, but Netscape handles encoding differently from other browsers if a parameter contains a space, so if you are doing a GET as the post method on your form instead of POST you may want to look at the following that I googled Development Tips ... Although Internet Explorer (IE) processes spaces in parameters, Netscape doesn't. So you must encode parameters that include only spaces as well as strings ... developer.novell.com/ndk/doc/imgrsdk/ emf__enu/data/aechbi8.html Although Internet Explorer (IE) processes spaces in parameters, Netscape doesn't. So you must encode parameters that include only spaces as well as strings which include the other special characters. All href and action data is automatically unencoded when it reaches the server. If you are using a WebAccess VAR keyword from the property object, you encode them as explained above using the urlEncode() function as follows: Good luck! Shawn Bayern wrote: On Sat, 13 Jul 2002, John Hicks wrote: Everything works fine, that is, *unless* the form is posted from the Netscape 4.73 browser!! (It works fine coming from Konqueror and Opera 6.0 and Netscape 7 (all running under Linux) and from IE6.0 and Opera 6.01 running in Windows. But when the request comes from Netscape 4.73, I get a stack trace (which I'll post at the bottom of this message). It sounds like a parameter isn't coming through on Netscape 4.73. This is a little perplexing, since to my knowledge, Netscape 4.73 behaves similarly to other browsers with respect to how it submits empty form fields. To debug the problem, walk through all of the parameters you're using in sql:param tags manually (e.g., using the same exprssions with c:out) to determine which one is failing. Then walk backwards to the form itself and determine whether the problem lies with Netscape or elsewhere. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 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]
Compress the HTML code
Hi I noticed that after completing a page, JSTL (or JSP?) leaves empty space where the Java Tags were. Is there any possibility to compress the HTML code? The best thing would actually to have all the HTML code on one line, getting rid of a couple of bytes (the carriage returns, tabs etc.) on the way. Best regards, Eric -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: db taglibs questions
Yes, sql:getColumn position=1 to=field1 scope=page / %= pageContext.getAttribute(field1) % it's ok, but if i'll write % int field1=pageContext.getAttribute(field1); % I'll get next errors: Can't convert java.lang.Object to int, If i'm using db taglib from coldbeans software i'll can write: sql:setQuery id=query1 query=select A,B from T res=B / sql:getColumn res=B position=1 id=C / A=%=C% Can I make same with the jakarta db tablibs? - Original Message - From: Mader, Steve [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 7:18 PM Subject: RE: db taglibs questions Use the to property of the getColumn tag (see doco). e.g. sql:getColumn position=1 to=field1 / You can also use the optional scope parameter to set the scope. e.g. sql:getColumn position=1 to=field1 scope=page / I think it defaults to page scope (others are request,session,), which means you'd use the pageContext.getAttribute() method to extract the value (pageContext.getAttribute(field1)). Hope this helps. Steve -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 10:53 AM To: Tag Libraries Users List Subject: Re: db taglibs questions Hello, Kevin. I do not need to show results sql query through web. I want to write down results of sql query in variables that further them to use... - Original Message - From: Kevin Passey [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 6:31 PM Subject: RE: db taglibs questions Igor, Here is some of my code that displays database stuff in a table - I've only given the row TR tdsql:getColumn position=1//td tdsql:getColumn position=2//td tdsql:getColumn position=3//td tdsql:getColumn position=4//td tdsql:getColumn position=5//td tdsql:getColumn position=6//td tdsql:getColumn position=7//td tdsql:getColumn position=8//td tdsql:getColumn position=9//td tdsql:getColumn position=10//td tdsql:getColumn position=11//td tdsql:getColumn position=12//td tdsql:getColumn position=13//td tdsql:getColumn position=14//td /TR Hope this helps Regards Kevin Passey -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:06 To: [EMAIL PROTECTED] Subject: db taglibs questions Hello! I'm using DBTags Tag library. I executes simple query: sql:statement id=stmt1 conn=conn1 sql:query select string_value, number_value from my_table /sql:query /sql:statement How i can output result: sql:setColumn position=1 to the string or int variable (not to JSP directly) ? (i try % A= sql:setColumn position=1 %, but get error) Best regards, Igor Bursin. -- 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] -- 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: db taglibs questions
Sounds like you need to look at the J2EE api doco (http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/index.html). pageContext.getAttribute() returns a java.lang.Object. You'll probably need to cast this to something else (e.g. a String). % String field1=(String)pageContext.getAttribute(field1); % You can't do this with primitive types like int, however, so you'll need to probably use the Integer class to convert it to an int. Hope this helps. -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 12:25 PM To: Tag Libraries Users List Subject: Re: db taglibs questions Yes, sql:getColumn position=1 to=field1 scope=page / %= pageContext.getAttribute(field1) % it's ok, but if i'll write % int field1=pageContext.getAttribute(field1); % I'll get next errors: Can't convert java.lang.Object to int, If i'm using db taglib from coldbeans software i'll can write: sql:setQuery id=query1 query=select A,B from T res=B / sql:getColumn res=B position=1 id=C / A=%=C% Can I make same with the jakarta db tablibs? - Original Message - From: Mader, Steve [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 7:18 PM Subject: RE: db taglibs questions Use the to property of the getColumn tag (see doco). e.g. sql:getColumn position=1 to=field1 / You can also use the optional scope parameter to set the scope. e.g. sql:getColumn position=1 to=field1 scope=page / I think it defaults to page scope (others are request,session,), which means you'd use the pageContext.getAttribute() method to extract the value (pageContext.getAttribute(field1)). Hope this helps. Steve -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 10:53 AM To: Tag Libraries Users List Subject: Re: db taglibs questions Hello, Kevin. I do not need to show results sql query through web. I want to write down results of sql query in variables that further them to use... - Original Message - From: Kevin Passey [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 6:31 PM Subject: RE: db taglibs questions Igor, Here is some of my code that displays database stuff in a table - I've only given the row TR tdsql:getColumn position=1//td tdsql:getColumn position=2//td tdsql:getColumn position=3//td tdsql:getColumn position=4//td tdsql:getColumn position=5//td tdsql:getColumn position=6//td tdsql:getColumn position=7//td tdsql:getColumn position=8//td tdsql:getColumn position=9//td tdsql:getColumn position=10//td tdsql:getColumn position=11//td tdsql:getColumn position=12//td tdsql:getColumn position=13//td tdsql:getColumn position=14//td /TR Hope this helps Regards Kevin Passey -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:06 To: [EMAIL PROTECTED] Subject: db taglibs questions Hello! I'm using DBTags Tag library. I executes simple query: sql:statement id=stmt1 conn=conn1 sql:query select string_value, number_value from my_table /sql:query /sql:statement How i can output result: sql:setColumn position=1 to the string or int variable (not to JSP directly) ? (i try % A= sql:setColumn position=1 %, but get error) Best regards, Igor Bursin. -- 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] -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: db taglibs questions
All works. Thanks all for advices. - Original Message - From: Mader, Steve [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 8:45 PM Subject: RE: db taglibs questions Sounds like you need to look at the J2EE api doco (http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/index.html). pageContext.getAttribute() returns a java.lang.Object. You'll probably need to cast this to something else (e.g. a String). % String field1=(String)pageContext.getAttribute(field1); % You can't do this with primitive types like int, however, so you'll need to probably use the Integer class to convert it to an int. Hope this helps. -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 12:25 PM To: Tag Libraries Users List Subject: Re: db taglibs questions Yes, sql:getColumn position=1 to=field1 scope=page / %= pageContext.getAttribute(field1) % it's ok, but if i'll write % int field1=pageContext.getAttribute(field1); % I'll get next errors: Can't convert java.lang.Object to int, If i'm using db taglib from coldbeans software i'll can write: sql:setQuery id=query1 query=select A,B from T res=B / sql:getColumn res=B position=1 id=C / A=%=C% Can I make same with the jakarta db tablibs? - Original Message - From: Mader, Steve [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 7:18 PM Subject: RE: db taglibs questions Use the to property of the getColumn tag (see doco). e.g. sql:getColumn position=1 to=field1 / You can also use the optional scope parameter to set the scope. e.g. sql:getColumn position=1 to=field1 scope=page / I think it defaults to page scope (others are request,session,), which means you'd use the pageContext.getAttribute() method to extract the value (pageContext.getAttribute(field1)). Hope this helps. Steve -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 10:53 AM To: Tag Libraries Users List Subject: Re: db taglibs questions Hello, Kevin. I do not need to show results sql query through web. I want to write down results of sql query in variables that further them to use... - Original Message - From: Kevin Passey [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, July 15, 2002 6:31 PM Subject: RE: db taglibs questions Igor, Here is some of my code that displays database stuff in a table - I've only given the row TR tdsql:getColumn position=1//td tdsql:getColumn position=2//td tdsql:getColumn position=3//td tdsql:getColumn position=4//td tdsql:getColumn position=5//td tdsql:getColumn position=6//td tdsql:getColumn position=7//td tdsql:getColumn position=8//td tdsql:getColumn position=9//td tdsql:getColumn position=10//td tdsql:getColumn position=11//td tdsql:getColumn position=12//td tdsql:getColumn position=13//td tdsql:getColumn position=14//td /TR Hope this helps Regards Kevin Passey -Original Message- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:06 To: [EMAIL PROTECTED] Subject: db taglibs questions Hello! I'm using DBTags Tag library. I executes simple query: sql:statement id=stmt1 conn=conn1 sql:query select string_value, number_value from my_table /sql:query /sql:statement How i can output result: sql:setColumn position=1 to the string or int variable (not to JSP directly) ? (i try % A= sql:setColumn position=1 %, but get error) Best regards, Igor Bursin. -- 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] -- 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] -- 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: Compress the HTML code
Hello, If i were to iterate over two sets of parameters, is there a way to specify their values within one forEach loop? Thank You, Alex -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 1:17 PM To: Tag Libraries Users List Subject: Re: Compress the HTML code On Mon, 15 Jul 2002 [EMAIL PROTECTED] wrote: I noticed that after completing a page, JSTL (or JSP?) leaves empty space where the Java Tags were. Is there any possibility to compress the HTML code? The best thing would actually to have all the HTML code on one line, getting rid of a couple of bytes (the carriage returns, tabs etc.) on the way. You could write a tag or, in a Servlet 2.3 environment, a filter, that compresses the space, but there isn't a way to change the underlying behavior, which is dictated by the JSP standard. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 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: Compress the HTML code
On Mon, 15 Jul 2002, Alex Reznik wrote: If i were to iterate over two sets of parameters, is there a way to specify their values within one forEach loop? It depends on what you really want to do. You can iterate over numbers and apply them as indices over two arrays or List objects, like this: c:forEach var=i begin=0 end=${end} c:out value=${a[i]} / c:out value=${b[i]} / /c:forEach Or you can iterate over one array and use 'count' from 'varStatus' as the index into another: c:forEach items=${a} var=aItem varStatus=s c:out value=${a} / c:out value=${b[s.count]} / /c:forEach If you're looking for something else, please feel free to clarify. Hope this helps, -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Compress the HTML code
Thank You, both ways work correctly, my idea was to write an equivalent of something like this: for(int i=0, int j=0; i10, j20;i++;j--) alex -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 3:38 PM To: Tag Libraries Users List Subject: RE: Compress the HTML code On Mon, 15 Jul 2002, Alex Reznik wrote: If i were to iterate over two sets of parameters, is there a way to specify their values within one forEach loop? It depends on what you really want to do. You can iterate over numbers and apply them as indices over two arrays or List objects, like this: c:forEach var=i begin=0 end=${end} c:out value=${a[i]} / c:out value=${b[i]} / /c:forEach Or you can iterate over one array and use 'count' from 'varStatus' as the index into another: c:forEach items=${a} var=aItem varStatus=s c:out value=${a} / c:out value=${b[s.count]} / /c:forEach If you're looking for something else, please feel free to clarify. Hope this helps, -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 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]
SQL Query question
Hello, please take a look at the following: sql:query var=value select value from msgrouter.mr_preferences where category = ? and name = ? sql:param value=${tmp}/ sql:param value=${tmp_name}/ /sql:query i am getting an invalid column type error from this statement...is the error in and name = ? part and how do i avoid it? thank you, alex -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 3:38 PM To: Tag Libraries Users List Subject: RE: Compress the HTML code On Mon, 15 Jul 2002, Alex Reznik wrote: If i were to iterate over two sets of parameters, is there a way to specify their values within one forEach loop? It depends on what you really want to do. You can iterate over numbers and apply them as indices over two arrays or List objects, like this: c:forEach var=i begin=0 end=${end} c:out value=${a[i]} / c:out value=${b[i]} / /c:forEach Or you can iterate over one array and use 'count' from 'varStatus' as the index into another: c:forEach items=${a} var=aItem varStatus=s c:out value=${a} / c:out value=${b[s.count]} / /c:forEach If you're looking for something else, please feel free to clarify. Hope this helps, -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 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: SQL Query question
On Mon, 15 Jul 2002, Alex Reznik wrote: Hello, please take a look at the following: sql:query var=value select value from msgrouter.mr_preferences where category = ? and name = ? sql:param value=${tmp}/ sql:param value=${tmp_name}/ /sql:query i am getting an invalid column type error from this statement...is the error in and name = ? part and how do i avoid it? If the error says something like invalid column type, that probably comes from your JDBC driver. The error sounds like it's indicative of an attempt to assign a variable of one type to a column that cannot accept that type. (E.g., you might be setting an integer in to a SQL TIMESTAMP field.) Without more information, it'll be hard to diagnose the problem further. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: SQL Query question
all fields in the db are varchar2 and i am trying to send it parameters from a request obj, also i am using Oracle8i..is there any occasion when the ? mark need to be quoted? alex -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 4:29 PM To: Tag Libraries Users List Subject: Re: SQL Query question On Mon, 15 Jul 2002, Alex Reznik wrote: Hello, please take a look at the following: sql:query var=value select value from msgrouter.mr_preferences where category = ? and name = ? sql:param value=${tmp}/ sql:param value=${tmp_name}/ /sql:query i am getting an invalid column type error from this statement...is the error in and name = ? part and how do i avoid it? If the error says something like invalid column type, that probably comes from your JDBC driver. The error sounds like it's indicative of an attempt to assign a variable of one type to a column that cannot accept that type. (E.g., you might be setting an integer in to a SQL TIMESTAMP field.) Without more information, it'll be hard to diagnose the problem further. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 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: SQL Query question
here is what i am getting: by the way, i think the error comes from the second parameter, and it looks like the following: (i am setting this in a loop) c:set var=tmp_name value=${paramValues.name[s.count]}/ thanks, alex javax.servlet.ServletException: select msgrouter.mr_preferences.value from msgrouter.mr_preferences where category = ? and name = ?: Invalid column type at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.UpdatePreferences$jsp._jspService(UpdatePreferences$jsp.java: 485) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 ) at java.lang.Thread.run(Thread.java:536) root cause javax.servlet.jsp.JspException: select msgrouter.mr_preferences.value from msgrouter.mr_preferences where category = ? and name = ?: Invalid column type at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTag Support.java:252) at org.apache.jsp.UpdatePreferences$jsp._jspService(UpdatePreferences$jsp.java: 383) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at
C:Import
I am trying to pass along the XML file I would like to ttransform via parameter. I get the error: java.lang.ArrayIndexOutOfBoundsException at org.apache.catalina.util.RequestUtil.URLDecode(RequestUtil.java:417) I assume I have missed a step. I found some help on encoding but it would appear to be old help. So how do get a string from request and pass it along to C:import do it can make sense out of it? Pretty simple I am sure. The file is: % String xmlReq = request.getParameter(xml); % %@taglib uri=http://java.sun.com/jstl/core; prefix=c % %@taglib uri=http://java.sun.com/jstl/xml; prefix=x % c:import url=generic.xsl var=xslt/ c:import url=%=xmlReq% var=xml/ x:transform xml=${xml} xslt=${xslt}/ __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: C:Import
On Mon, 15 Jul 2002, Tim Ringwood wrote: % String xmlReq = request.getParameter(xml); % %@taglib uri=http://java.sun.com/jstl/core; prefix=c % %@taglib uri=http://java.sun.com/jstl/xml; prefix=x % c:import url=generic.xsl var=xslt/ c:import url=%=xmlReq% var=xml/ x:transform xml=${xml} xslt=${xslt}/ You cannot use rtexprvalues in the EL versions of JSTL tags. Replace the second line with the following: c:import url=${param.xmlReq} var=xml / -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: apply.jsp example not working
Shawn, Tank you for your fast and kind response. Taken from the jakarta homepage, it states that JSTL has to be used in combination with e.g. Tomcat 4. What would I use when using Tomcat 3, which support Servlet 2.2 and JSP 1.1 specifications. Or am I drawing the wrong conclusion thinking that Servlet 2.2 and JSP 1.1 do support the XSL Taglib and the newer specs Servlet 2.3 and JSP1.2 don't? Regards, Ruud. -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: maandag 15 juli 2002 15:30 To: Tag Libraries Users List Subject: Re: apply.jsp example not working Ruud, The XSL Taglib is no longer supported; use the Standard Taglib, which is an implementation of the JSP Standard Tag Library (JSTL) instead. -- Shawn Bayern JSTL in Action http://www.jstlbook.com (coming in July 2002 from Manning Publications) On Mon, 15 Jul 2002 [EMAIL PROTECTED] wrote: hi, When I try to run the Apply.jsp example from the examples from jakarta xsl taglibs, I get the following exception: Internal Servlet Error: java.lang.NoSuchMethodError: org.apache.xalan.xslt.Process.getDefaultLiaison()Ljava/lang/String; at org.apache.xalan.xslt.XSLTEngineImpl.(XSLTEngineImpl.java:367) at org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor(XSLTProcessorFactory .java:79) at org.apache.taglibs.xsl.ApplyTag.doEndTag(ApplyTag.java:271) at jsp.Apply_15._jspService(Apply_15.java:144) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I nterceptor.java:176) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:516) at java.lang.Thread.run(Thread.java:536) Yes, I have done the three configuration steps described in the docs: * Copy the tag library descriptor file to the /WEB-INF subdirectory of your web application. * Copy the tag library JAR file to the /WEB-INF/lib subdirectory of your web application. * Add a taglib element to your web application deployment descriptor in /WEB-INF/web.xml like this: Does anyone have any idea what might be wrong? Regards, Ruud. -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]