End of content reached while more parsing required: tag nesting error?
Hello. I'm getting: End of content reached while more parsing required: tag nesting error? after checking my html/jsp before the include that causes this and not finding any inbalances. I have pages A and B. Both include the c.tld. Infact both say: %@ taguri=/WEB-INF/tlds/jstl/c.tld prefix=c % Page A includes B. The problem is occuring due to the declaration in B. I'm confused. Help :-) John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my o -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: End of content reached while more parsing required: tag nesting error?
Oh wait, I've fixed it. I had this: c:choose /c:test further on down in the page. I didn't realise that would break it ;-) On Monday 18 Mar 2002 10H:31 am, you wrote: Hello. I'm getting: End of content reached while more parsing required: tag nesting error? after checking my html/jsp before the include that causes this and not finding any inbalances. I have pages A and B. Both include the c.tld. Infact both say: %@ taguri=/WEB-INF/tlds/jstl/c.tld prefix=c % Page A includes B. The problem is occuring due to the declaration in B. I'm confused. Help :-) John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
c:if
Is this possible: if (request.getAttribute(moo != null) { } Using c:if Thanks. -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problems by Compling JSP's
If your in an IDE, make sure you have imported ldapjdk.jar. Thats my first guess. Booker -Original Message- From: Andreas Metz [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 12:08 PM To: 'Tag Libraries Users List' (E-Mail) Subject: Problems by Compling JSP's Hi, i'm new in working with taglibs. Now i have a problem, which i cannot solve. I hope someone can help me. I have made a simple taglib example. Now i try to start it. In the case that i have a .class file and a .tld it works fine. If i packed these file to a .jar and try it again it will never work. The pathes are all correct. This is sure. The example compiles but i get following error again and again. java.lang.NoClassDefFoundError: netscape/ldap/LDAPException at ite.fokBeans.fokDB.(fokDB.java:25) at com.ite.util.taglib.db.GetLocalizedTag.(GetLocalizedTag.java:31) at _0002findex_0002ejspindex_jsp_0._jspService(_0002findex_0002ejspindex_js p_0.java:71) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at org.netbeans.modules.web.tomcat.JspServlet.service(JspServlet.java:91) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H ttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416 ) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49 8) at java.lang.Thread.run(Thread.java:484) There are some things i dont unterstand. The ite.fokBeans.fokDB class is not in my path, and i dont know why the compiler looks after that file or gives me a error. If i delete all tomcat files in the workfolder it will recompile and it gives me the same error. I dont know what i can do else, i have tried out many things. But it didnt work. I use Forte for Java and the Forte-tomcat. I hope it is enough information that someone can help me. Thanxs, Andreas Metz winmail.dat Description: application/ms-tnef -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Scrape
Has anyone successfully used the scrape tag library successfully other than the weather examples? If so could you post an explination of how to get them to work properly? I installed the jars in the proper path and followed the example only changing the url and none of the scrape appears on my jsp. HELP!
Re: c:if
Hi, I believe the following would be possible: c:if test=${request.moo != null} body content /c:if The EL uses 'implicit' objects to access attributes and parameters from various source objects. pageContext -- access to the PageContext object page-- access to page scoped attributes request -- access to request scoped attributes session -- access to session scoped attributes application -- access to application scoped attributes param -- access to the value of a single request parameter params -- access to all associated request parameter values associated with a particular name. The EL is described in Chapter 3 and Appendix A of the current Public Draft of the JSTL (JSR52) specification located here: http://jcp.org/aboutJava/communityprocess/review/jsr052/index.html I highly recommend this as its a great resource. -rl On Mon, 2002-03-18 at 06:39, John Baker wrote: Is this possible: if (request.getAttribute(moo != null) { } Using c:if Thanks. -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- 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]
Standard taglib - sql problem
I'm trying to get the following code to work, but I keep getting a java.lang.AbstractMethodError exception. I've tested the connection in the scriptlet and it works. As soon as I add the sql tag the Exception is thrown. I've also included the stack trace. %@ page import=javax.naming.*,javax.sql.* % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % % Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource)envCtx.lookup(jdbc/Intranet); pageContext.setAttribute(db,ds); % sql:query var=project dataSource=${db} SELECT * FROM user_task_project /sql:query type Exception reportmessage Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457) at org.apache.jsp.timesheet_0005fsummary$jsp._jspService(timesheet_0005fsummary$jsp.java:120) 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.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 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.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 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:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 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:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 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:1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) at java.lang.Thread.run(Thread.java:484) root cause java.lang.AbstractMethodError at javax.servlet.jsp.jstl.sql.ResultImpl$ResultMetaDataUtil.getMetaDataCache(ResultImpl.java:382) at javax.servlet.jsp.jstl.sql.ResultImpl$ResultMetaDataUtil.(ResultImpl.java:209) at javax.servlet.jsp.jstl.sql.ResultImpl.(ResultImpl.java:92) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:234) at org.apache.jsp.timesheet_0005fsummary$jsp._jspService(timesheet_0005fsummary$jsp.java:103) 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.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at
Re: Standard taglib - sql problem
Interesting. The AbstractMethodError is apparently coming from a call to the ResultSetMetaData object associated with your JDBC driver. The underlying issue may result from either a bug or a version incompatibility in the driver. But this issue raises a question of how JSTL should handle errors like this. (I'll raise a related issue to the spec lead.) Shawn On Mon, 18 Mar 2002, Brett Morgan wrote: I'm trying to get the following code to work, but I keep getting a java.lang.AbstractMethodError exception. I've tested the connection in the scriptlet and it works. As soon as I add the sql tag the Exception is thrown. I've also included the stack trace. %@ page import=javax.naming.*,javax.sql.* % %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; % % Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = (DataSource)envCtx.lookup(jdbc/Intranet); pageContext.setAttribute(db,ds); % sql:query var=project dataSource=${db} SELECT * FROM user_task_project /sql:query type Exception reportmessage Internal Server Error description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request. exception javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457) at org.apache.jsp.timesheet_0005fsummary$jsp._jspService(timesheet_0005fsummary$jsp.java:120) 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.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 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.java:201) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 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:2344) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 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:163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 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:1011) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) at java.lang.Thread.run(Thread.java:484) root cause java.lang.AbstractMethodError at javax.servlet.jsp.jstl.sql.ResultImpl$ResultMetaDataUtil.getMetaDataCache(ResultImpl.java:382) at javax.servlet.jsp.jstl.sql.ResultImpl$ResultMetaDataUtil.(ResultImpl.java:209) at javax.servlet.jsp.jstl.sql.ResultImpl.(ResultImpl.java:92) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:234) at org.apache.jsp.timesheet_0005fsummary$jsp._jspService(timesheet_0005fsummary$jsp.java:103) 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.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at
argh
What does this mean: Unable to convert string '%= myActivity %' to class com.teamenergy.libraries.activity.WebActivity for attribute activity: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager myActivity is an instance of WebActivity, declared as such. The tld spec looks like this: tag namereportConfigSetup/name tagclasscom.teamenergy.web.tags.ReportConfigSetupTag/tagclass attribute nameactivity/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute etc And the class has a setActivity(WebActivity) method. So ok, what's wrong? :) John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
More on c:if
I have a lot of this going on in my jsps: if (something) { // Some error message return; } Is there a way of supporting this without using embedded tags, ie: c:if test=!something c:if test=!somethingElse then do something Cheers! John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Scrape
Hi Peter, Here's an example (also weather - but different :-0): BR - BR scrp:page url=http://www.wpni.com/ac3/ContentServer?pagename=weatherforceDisplay=truezipcode=10012; time=11 scrp:scrape id=weather77 begin=/MAPDIV ALIGN end=/A/P/P/CENTER anchors=true/ /scrp:page scrp:result scrape=weather77/ BR - BR Looks like the begin/end don't like quotes/other characters, maybe you can escape them? Original Message Follows From: Peter Gales [EMAIL PROTECTED] Reply-To: Tag Libraries Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Scrape Date: Mon, 18 Mar 2002 08:17:11 -0500 Has anyone successfully used the scrape tag library successfully other than the weather examples? If so could you post an explination of how to get them to work properly? I installed the jars in the proper path and followed the example only changing the url and none of the scrape appears on my jsp. HELP! _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Scrape
That worked. The scripts I can't get to work look like: scrp:page url=http://www.fastlist.com/fastlist/ScrapeTest.html; time=1 scrp:scrape id=h1 begin=H1 end=/H1 anchors=true/ /scrp:page scrp:result scrape=h1/ I've tried others like this as well with no results. -Original Message- From: Bill Moss [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 11:36 AM To: [EMAIL PROTECTED] Subject: Re: Scrape Hi Peter, Here's an example (also weather - but different :-0): BR - BR scrp:page url=http://www.wpni.com/ac3/ContentServer?pagename=weatherforceDisplay=tru ezipcode=10012 time=11 scrp:scrape id=weather77 begin=/MAPDIV ALIGN end=/A/P/P/CENTER anchors=true/ /scrp:page scrp:result scrape=weather77/ BR - BR Looks like the begin/end don't like quotes/other characters, maybe you can escape them? Original Message Follows From: Peter Gales [EMAIL PROTECTED] Reply-To: Tag Libraries Users List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Scrape Date: Mon, 18 Mar 2002 08:17:11 -0500 Has anyone successfully used the scrape tag library successfully other than the weather examples? If so could you post an explination of how to get them to work properly? I installed the jars in the proper path and followed the example only changing the url and none of the scrape appears on my jsp. HELP! _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- 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]
My last annoying question of the day, promise.:-)
I'm busy digesting the jstl spec now (found an error in it, it says you can do c:url= and it should be c:url value=... :-), however I'm wondering if I can put an array of objects into a request and use c:if test= to test one. Ie: Blob[] blobs = new Blob[100]; // fill blobs request.setAttribute(blobs, blobs); now can I do: c:if test=${request.blobs[2].whatever ? Cheers! John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts Vs Taglibs
Hi All, Just a curiousity question. What is the advantages of using one over the other? For example, alot of the tags seem to be doing the same type of tasks. (ex. Foreach versus Iterate). Why would one pick one approach over another? -Tim -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: More on c:if
On Mon, 18 Mar 2002, John Baker wrote: I have a lot of this going on in my jsps: if (something) { // Some error message return; } Is there a way of supporting this without using embedded tags, ie: c:if test=!something c:if test=!somethingElse then do something Cheers! I'm not sure I understand exactly what you're asking. You can currently write c:if test=${not something and not somethingElse} ... /c:if and familiar boolean operatings (e.g., for and, || for or) will likely be added to the EL before it's done. If you're asking whether or not JSTL has a tag that aborts the current page, the answer is currently no. -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: More on c:if
On Monday 18 Mar 2002 17H:51 pm, you wrote: and familiar boolean operatings (e.g., for and, || for or) will likely be added to the EL before it's done. If you're asking whether or not JSTL has a tag that aborts the current page, the answer is currently no. Yep, that was what I was asking. I never did like the idea of a return in JSP code, however there is a lot of it about and I was wondering whether it could be done using JSTL. Glad you mentioned the fact that || and are not supported yet as I was just trying to use that ;-) But now I'm trying to figure out array and List objects. If I have a list or an array, I'd expect to be able to access an element via [x], ie: c:out value={$myList[5]} / would be equivelent to: out.write(myList.get(5)); but it seems this isn't the case ;-) -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: My last annoying question of the day, promise.:-)
On Mon, 18 Mar 2002, John Baker wrote: I'm busy digesting the jstl spec now (found an error in it, it says you can do c:url= and it should be c:url value=... :-), however I'm wondering if I can put an array of objects into a request and use c:if test= to test one. Ie: Blob[] blobs = new Blob[100]; // fill blobs request.setAttribute(blobs, blobs); now can I do: c:if test=${request.blobs[2].whatever ? Cheers! Yes, this should work. -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts Vs Taglibs
On Mon, 18 Mar 2002, Chen, Gin wrote: Just a curiousity question. What is the advantages of using one over the other? For example, alot of the tags seem to be doing the same type of tasks. (ex. Foreach versus Iterate). Why would one pick one approach over another? -Tim My impression is that Struts will eventually accommodate the standard taglib (JSTL) and integrate well with it. The other taglibs in Jakarta Taglibs are essentially just separate offerings from Struts, attempting to address different needs (or similar needs from a different perspective). -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: My last annoying question of the day, promise.:-)
On Monday 18 Mar 2002 18H:01 pm, you wrote: The error message was: Unable to find a value for 0 in object of class java.lang.String using operator [] Argh... Spot the difference between: c:set var=blobs value=whatever.someMethodThatReturnsList/ and c:set var=blobs value=${whatever.someMethodThatReturnsList}/ I'll have a better day tomorrow, I hope ;-) -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: My last annoying question of the day, promise.:-)
On Monday 18 Mar 2002 18H:07 pm, you wrote: Current time in milliseconds: c:out value=${page.dates[1].time}/ This prints out output like: Current time in milliseconds: 1016474790054 Hope you can use this as a basis to determine what's wrong with your page. Best, Yeah, sorry, I was just being dumb. I'm only on day three of the crash course in JSTL. I'm actually very impressed, the stuff I have got working is much nicer without all the: % // blah blah % Is this possible though? public class Moo { public static final String X = Hello; public static final int Y = 10; } c:param name=${Moo.X} value=something/ Evidence would suggest not, as this also doesn't work: c:if test=${someInteger == Moo.Y never seems to evalute to true when someInteger is 10, but replacing Moo.Y with '10' works fine :-) John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: My last annoying question of the day, promise.:-)
Just don't... ;-) Good Java style dictates that you keep everything as private as possible, certainly class variables and then use methods to get and set them, like getY and setY. Nicely enough, if you implement getY, you can directly use it in c:if test=${Moo.Y == someInteger} So, just define all the getter methods you need, and off you go! -Original Message- From: John Baker [mailto:[EMAIL PROTECTED]] Sent: Montag, 18. März 2002 19:31 To: Tag Libraries Users List Subject: Re: My last annoying question of the day, promise.:-) On Monday 18 Mar 2002 18H:07 pm, you wrote: Current time in milliseconds: c:out value=${page.dates[1].time}/ This prints out output like: Current time in milliseconds: 1016474790054 Hope you can use this as a basis to determine what's wrong with your page. Best, Yeah, sorry, I was just being dumb. I'm only on day three of the crash course in JSTL. I'm actually very impressed, the stuff I have got working is much nicer without all the: % // blah blah % Is this possible though? public class Moo { public static final String X = Hello; public static final int Y = 10; } c:param name=${Moo.X} value=something/ Evidence would suggest not, as this also doesn't work: c:if test=${someInteger == Moo.Y never seems to evalute to true when someInteger is 10, but replacing Moo.Y with '10' works fine :-) John -- John Baker, BSc CS. Java Developer, TEAM/Slb. http://www.teamenergy.com Views expressed in this mail are my own. -- 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: Struts Vs Taglibs
Struts contains several different tag libraries. Some, like the 'logic' taglib, will most likely be deprecated at some point, in favour of JSTL. Others, such as the 'html' taglib, integrate more tightly with the Struts framework, reducing the amount of work you have to do to hook your JSP pages up to your ActionForm and Action instances. If you're using Struts as your application framework, then it definitely makes sense to use the Struts 'html' taglib. It also makes sense to look at using JSTL for the less Struts related pieces of your pages. The two should work together without problems. -- Martin Cooper - Original Message - From: Chen, Gin [EMAIL PROTECTED] To: 'Tag Libraries Users List' [EMAIL PROTECTED] Sent: Monday, March 18, 2002 9:40 AM Subject: Struts Vs Taglibs Hi All, Just a curiousity question. What is the advantages of using one over the other? For example, alot of the tags seem to be doing the same type of tasks. (ex. Foreach versus Iterate). Why would one pick one approach over another? -Tim -- 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]
How to pass parameters to method in c:if
Hello, I'm writing a presentation of the latest JSTL, but I have a problem with one example. In JSP, I need something like c:if test=${securityBean.check(request, response) } but it doesn't work. How can I pass parameters? All examples use only simple getters. If someone knows the answer please reply ASAP because I have a presentation in two days. Thanks! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to pass parameters to method in c:if
On Mon, 18 Mar 2002, Trogrlic Zeljko wrote: Hello, I'm writing a presentation of the latest JSTL, but I have a problem with one example. In JSP, I need something like c:if test=${securityBean.check(request, response) } but it doesn't work. How can I pass parameters? All examples use only simple getters. If someone knows the answer please reply ASAP because I have a presentation in two days. Thanks! The JSTL expression language does not support method invocations on objects. You'll currently need to use a custom tag library or scriptlet code (with the former being recommended over the latter) if you want to access arbitrary methods and pass arguments to them. -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to pass parameters to method in c:if
On Monday 18 March 2002 02:43 pm, you wrote: c:if test=${securityBean.check(request, response) } The JSTL expression language does not support method invocations on objects. You'll currently need to use a custom tag library or scriptlet code (with the former being recommended over the latter) if you want to access arbitrary methods and pass arguments to them. So, from a non-current tag/etc. user does this mean that I'd either want a custom tag for All Things Like That (i.e., c:ifsecurecheck ...) or, perhaps more OOish, c:ifcheck param=MyBean and use reflection to call a common method for everything I'd ever want to .check? Just curious. Thanks for your time, Dave -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to pass parameters to method in c:if
On Mon, 18 Mar 2002, Dave Newton wrote: On Monday 18 March 2002 02:43 pm, you wrote: c:if test=${securityBean.check(request, response) } The JSTL expression language does not support method invocations on objects. You'll currently need to use a custom tag library or scriptlet code (with the former being recommended over the latter) if you want to access arbitrary methods and pass arguments to them. So, from a non-current tag/etc. user does this mean that I'd either want a custom tag for All Things Like That (i.e., c:ifsecurecheck ...) or, perhaps more OOish, c:ifcheck param=MyBean and use reflection to call a common method for everything I'd ever want to .check? Tags are a great mechanism for providing abstraction. If you want a facility to call arbitrary methods from within a JSP page, Java scriptlets (% %) provide this already. Scriplets' problems don't just stem from their syntax; they tend to make pages harder to maintain because they don't create any meaningful abstraction. Tags do. When you design tags, I simply recommend you choose the most convenient abstraction for your users. There's a theory in linguistic pragmatics (for actual human languages, not CS languages) that suggests language is a tradeoff between laziness and effectiveness; as a speaker, you want to be lazy, but as a listener, you want the speaker to provide as much information as is necessary. Since everyone is both a speaker and a listener, languages end up being balanced: not too verbose or too clipped, on average. Anyway, page authors and tag-library developers are in a similar relationship. For every environment, there's a particular level of verbosity that's appropriate; one isn't necessarily better than others. JSTL works well with either approach; it encourages good design when unambiguous, but otherwise tries to avoid preaching about how you must design your applications. -- Shawn Bayern Author, JSP Standard Tag Library http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]