Re: FormatNumberTag

2009-07-11 Thread Henri Yandell
Generally agreed. With public APIs I've learnt to be stronger on
making things private as it tends to only come back to bite you if you
try to over think it; and when it's public you have no ability to
identify all the use cases so you end up in legacy hell.

I just fix the bugs though - I wasn't an original developer :) I
suspect their focus was strongly on implementing the spec and less on
the implementation classes themselves.

Hen

On Sat, Jul 11, 2009 at 1:32 AM, Stuart Thielstuart.th...@gmail.com wrote:
 Hello Henri,

 Yes, that would solve my immediate problem. It is a bit of a one-off hack,
 though. The follow-through would be to take a look at all the classes and
 identify areas where hooks like that would be desirable.

 It is perhaps a difference in philosophies of programming, but my preference
 is generally to use protected methods instead of private methods (and avoid
 final methods at all costs), and that would be my preferred approach here (I
 don't know your direct involvement thusfar into how things are). However,
 consistency is also good to see in a project, and it's not my show, so I'm
 less inclined to prosthelytize on how to do it right. I'd be glad to go on
 at length as to why I think the protected methods approach would be best,
 but will only do so upon request.

 Stuart

 Henri Yandell wrote:

 I didn't explain myself well.

 Basically I would insert reconfigureFormatter(NumberFormat/DateFormat)
 inside doEndTag. By default it would nothing.

 On Fri, Jul 10, 2009 at 5:03 AM, Stuart Thielstuart.th...@gmail.com
 wrote:



 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: FormatNumberTag

2009-07-10 Thread Henri Yandell
I'm wondering if protected configureFormatter(NumberFormat) is best,
or if the better option is to have a protected void
reconfigureFormatter(NumberFormat) method that is invokved at the end
of that method.

So by default the configureFormatter is always run, and then the user
can hook in to do whatever they want to the NumberFormat. A similar
reconfigureFormatter(DateFormat) could be added to the
FormatDateSupport class.

What do you think?

On Wed, Jul 8, 2009 at 1:55 PM, Stuart Thielstuart.th...@gmail.com wrote:
 Hello,

 A number of useful methods seem to be private. It makes sub-classing the
 taglibs inconvenient.

 For example, I would like to extend FormatNumberTag so that I can change the
 grouping separator. If configureFormatter in
 org.apache.taglibs.standard.tag.common.fmt.FormatNumberSupport were
 protected, instead of private, I could simply wrap it up and extend it in a
 few lines of code and let polymorphism do its thing.

 As it stands, I'll need to duplicate most of the code from
 FormatNumberSupport.

 --
 Stuart Thiel


-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: Download of Taglibs - IO

2009-06-14 Thread Henri Yandell
Better to go ahead and write the Java. FTP - presumably Commons Net
(though I'm not 100% sure if it does FTP). HTTP/HTTPS to Apache
HttpComponents. XmlRpc probably just use the basic API and SOAP Apache
CXF or Apache Axis2 presumably have some kind of client?

Must admit to not knowing much on SOAP, but a Taglib probably isn't
the way to architect communication against it.

Hen

On Thu, Jun 11, 2009 at 10:20 AM, ramya.k.gr...@wellsfargo.com wrote:
 Thanks for the response!

 -Original Message-
 From: Rahul Akolkar [mailto:rahul.akol...@gmail.com]
 Sent: Thursday, June 11, 2009 12:56 PM
 To: Tag Libraries Users List
 Subject: Re: Download of Taglibs - IO

 On Thu, Jun 11, 2009 at 12:50 PM, ramya.k.gr...@wellsfargo.com wrote:
 If IO is deprecated then which tag should we be using for SOAP
 communication?
 snip/

 I haven't looked at the IO taglib in any detail. The fact that its
 deprecated does not necessarily mean that tags will always have
 identical (or close enough even) replacements that can be suggested --
 it means we don't anticipate any further development or releases of
 that taglib here.

 -Rahul



 Thanks

 -Original Message-
 From: Rahul Akolkar [mailto:rahul.akol...@gmail.com]
 Sent: Thursday, June 11, 2009 12:47 PM
 To: Tag Libraries Users List
 Subject: Re: Download of Taglibs - IO

 On Wed, Jun 10, 2009 at 8:59 AM, ramya.k.gr...@wellsfargo.com wrote:
 I would like to download the IO Taglibs to use to create a SOAP client
 for my web service.

 I checked all the download sites on Apache and its mirrors but
 couldn't
 find the binary download.

 Could someone help me by sending me a link to the correct site to
 download this.

 snip/

 The IO taglib was probably never released and has been deprecated
 (there will be no further work on it here and thus, no future releases
 as part of Jakarta Taglibs).

 If you want, you could try building the source yourself and testing it
 to determine if thats of any use for you. The source in SVN is here:

  http://svn.apache.org/repos/asf/jakarta/taglibs/deprecated/io/trunk/

 -Rahul


 Thanks





 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Taglibs deprecated

2009-06-07 Thread Henri Yandell
Random, DateTime and I18N taglibs have all been deprecated. In the
former case because it's not that interesting a taglib, and the latter
two because they offer only very little extra functionality on top of
JSTL.

Thanks,

Hen

-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: SEVERE: Servlet /rdc-examples threw load() exception - java.lang.ClassNotFoundException: org.apache.commons.collections.FastHashMap

2009-05-25 Thread Henri Yandell
Given that it would be a small delta, how about a 1.0.1 release with
the rdc example war fixed Rahul?

It would give us a chance to release from maven, which should be
educational, and we could also look at adding Cactus testing. I'm
happy to help out there - it would help me learn more about RDC - and
Hendy might be interested in helping with that too.

Hen

On Mon, May 25, 2009 at 5:39 PM, Rahul Akolkar rahul.akol...@gmail.com wrote:
 On Mon, May 25, 2009 at 2:35 PM, Hendy Irawan he...@rainbowpurple.com wrote:
 Thanks.

 Here are the artifacts I need to make it work:

   - commons-beanutils:commons-beanutils:1.7.0
   - xalan:xalan:2.7.1
   - xerces:xercesImpl:2.8.1
   - commons-el:commons-el:1.0

 My current rdc-examples/WEB-INF/lib :

 ceef...@caliva:/opt/tomcat/webapps/rdc-examples/WEB-INF/lib$ ls -la
 total 6036
 drwxr-xr-x 2 ceefour ceefour    4096 2009-05-26 01:29 ./
 drwxr-xr-x 3 ceefour ceefour    4096 2009-05-26 00:38 ../
 -rw-r--r-- 1 ceefour ceefour  188671 2009-05-26 00:32 commons-beanutils.jar
 -rw-r--r-- 1 ceefour ceefour  168446 2005-07-20 15:34 commons-digester.jar
 -rw-r--r-- 1 ceefour ceefour  112341 2009-05-26 01:29 commons-el-1.0.jar
 -rw-r--r-- 1 ceefour ceefour   38015 2005-07-20 15:34 commons-logging.jar
 -rw-r--r-- 1 ceefour ceefour   16630 2005-07-20 15:34 jstl.jar
 -rw-r--r-- 1 ceefour ceefour  315292 2005-07-20 15:34 standard.jar
 -rw-r--r-- 1 ceefour ceefour  526578 2005-07-20 15:34 struts.jar
 -rw-r--r-- 1 ceefour ceefour  359859 2005-07-20 15:34 taglibs-rdc.jar
 -rw-r--r-- 1 ceefour ceefour 3176148 2009-05-26 01:24 xalan-2.7.1.jar
 -rw-r--r-- 1 ceefour ceefour 1212965 2009-05-26 01:26 xercesImpl-2.8.1.jar

 I think it's helpful for others if the RDC binary distro can be updated to
 accommodate this.

 snip/

 The 1.0.0 distro was tested on Tomcat 5.0.x and JDK 1.4, for other
 combinations your list above will be useful :-)


 I actually want to play inside RDC, however the Ant based build and the
 build instructions intimidate me.. I've been used to Maven and a Maven-ready
 project would to be more easily reachable for outside developers like
 myself.

 snap/

 Aha, but we recently changed to m2 builds in Taglibs :-)

 Try this:

  svn co http://svn.apache.org/repos/asf/jakarta/taglibs/proper/rdc/trunk/ rdc
  cd rdc
  mvn package

 Feel free to play, and we'll be happy to get feedback, improvements
 and patches here. And check out the rdc-examples war out of the m2
 build, I suspect it'll have a fuller set of dependencies in place.

 -Rahul


 --
 Best regards,
 Hendy Irawan
 +62 81-2210-66622 :: +62 22-91853265
 http://www.hendyirawan.com/ :: he...@soluvas.com


 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: Problem while downloading i18n binary

2009-05-21 Thread Henri Yandell
Those are dead pages and not hooked to the site - but I'm guessing
Google still supplies them. I need to set some mod_rewrite rules up to
stop people getting to them.

There are no downloads for i18n - it was never released. You'll need
to build from subversion and build. On the plus side, the build is now
maven2 and not the somewhat obtuse shared Ant build that used to be
there so it should be much easier to do that.

Hope that helps,

Hen

On Wed, May 20, 2009 at 10:46 PM,  aditya.kulkar...@wipro.com wrote:
 Hi,
 I am trying to download i18n source/binary from following site,
 http://jakarta.apache.org/taglibs/doc/i18n-doc/intro.html
 But when I click on Jakarta-Taglibs Distribution
 http://jakarta.apache.org/builds/jakarta-taglibs/nightly   or
 Jakarta-Taglibs Source
 http://jakarta.apache.org/builds/jakarta-taglibs/nightly/src/  link,
 page not found error appears.

 Please do the needful sort out this problem. If possible send me
 i18n.jar or i18n.tld file on this id.
 Eagerly waining for your responce.

 Thanks and best regards,
 Aditya Kulkarni.
 India.

 Please do not print this email unless it is absolutely necessary.

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The company 
 accepts no liability for any damage caused by any virus transmitted by this 
 email.

 www.wipro.com


-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: Problem while downloading i18n binary

2009-05-21 Thread Henri Yandell
It's a source control system - equivalent to CVS, Perforce, Git,
Mercurial, VSS etc. You'll sometimes see it called 'SVN'. It's
available from:

http://subversion.org/

After installing you then run the following on the command line:

svn co http://svn.apache.org/repos/asf/jakarta/taglibs/proper/i18n/trunk/

There is also support in major IDEs (Eclipse, IDEA, NetBeans) and a UI
(TortoiseSVN if I recall correctly).

As i18n is unreleased and only available to its developers, you'll
have to wear the hat of a developer to get it.

Hen

On Thu, May 21, 2009 at 2:03 AM,  aditya.kulkar...@wipro.com wrote:
 Hi Hen,
 Thanks for your reply. What is subversion, if it is some kind of repository 
 then I don't have access to that.
 Please let me know from where I can get this project. Please send me some 
 link so that I can download this project.

 Regards,
 Aditya.

 -Original Message-
 From: Henri Yandell [mailto:flame...@gmail.com]
 Sent: Thursday, May 21, 2009 2:19 PM
 To: Tag Libraries Users List
 Subject: Re: Problem while downloading i18n binary

 Those are dead pages and not hooked to the site - but I'm guessing Google 
 still supplies them. I need to set some mod_rewrite rules up to stop people 
 getting to them.

 There are no downloads for i18n - it was never released. You'll need to build 
 from subversion and build. On the plus side, the build is now
 maven2 and not the somewhat obtuse shared Ant build that used to be there so 
 it should be much easier to do that.

 Hope that helps,

 Hen

 On Wed, May 20, 2009 at 10:46 PM,  aditya.kulkar...@wipro.com wrote:
 Hi,
 I am trying to download i18n source/binary from following site,
 http://jakarta.apache.org/taglibs/doc/i18n-doc/intro.html
 But when I click on Jakarta-Taglibs Distribution
 http://jakarta.apache.org/builds/jakarta-taglibs/nightly   or
 Jakarta-Taglibs Source
 http://jakarta.apache.org/builds/jakarta-taglibs/nightly/src/  link,
 page not found error appears.

 Please do the needful sort out this problem. If possible send me
 i18n.jar or i18n.tld file on this id.
 Eagerly waining for your responce.

 Thanks and best regards,
 Aditya Kulkarni.
 India.

 Please do not print this email unless it is absolutely necessary.

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The 
 company accepts no liability for any damage caused by any virus transmitted 
 by this email.

 www.wipro.com


 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org


 Please do not print this email unless it is absolutely necessary.

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The company 
 accepts no liability for any damage caused by any virus transmitted by this 
 email.

 www.wipro.com

 -
 To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
 For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: Taglibs

2008-06-30 Thread Henri Yandell
On Mon, Jun 30, 2008 at 12:25 PM, Rahul Akolkar [EMAIL PROTECTED] wrote:
 On 6/29/08, Aaron Freeman [EMAIL PROTECTED] wrote:

  Specifically I am considering using Mailer2 initially, but don't want to do
  that if it and/or the whole taglib project has been abandoned.

 snap/

 Mailer2 is currently listed as a deprecated sandbox library ( see LHS
 menu on home page [1] ) -- there is no current development with it at
 all AFAIK.

The download that people probably depend on was a nightly build that
has since been deleted.

 The Jakarta Taglibs project has slowed down considerably, though in
 terms of interest:

  * Few relatively recent fixes have been made to JSTL 1.2 (by Hen)

JSTL 1.1.

Few = 30 resolved items. 12 or so patches applied.

Robert Goff just offered up JSTL 1.2 as a patch, and once he's able to
send in a software grant then we can be looking at releasing both the
JSTL 1.1.3 release and a JSTL 1.2.0 release.

  * I'm still interested maintaining in the RDC taglib (addressing
 issues as they come)

I'm somewhat interested in merging various bits into an Unstandard
taglib, but wasn't sure if there was enough user interest in taglibs
nowadays.

 Finally, FWIW, since this is an all-volunteer effort, the development
 tempo can change if enough people still want to develop tag libraries
 here. In the past couple of years, we haven't seen much of that. For
 those interested, it might be best to:

  * Ping the dev list to see how much interest there is for the taglib
 in question
  * Post patches -- fixes, improvements -- if there is interest (you
 can post them otherwise too, but having a realistic chance of those
 being applied might mean something)

Yep.

If there are 404s, point them out and we'll fix them.

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mailer2 Taglib

2008-06-30 Thread Henri Yandell
On Fri, Jun 27, 2008 at 5:52 AM, Aaron Freeman [EMAIL PROTECTED] wrote:
 Couple issues re: the mailer2 taglib.

 1) Any idea when it might become supported?

Rahul's pointed this out in the other thread, but for the archives
I'll note that it's deprecated and we don't advise using this. In this
case I think it was because no one active thought sending emails from
jsp was a good idea (which given I'm all for SQL in prototype JSP is
quite impressive :) ).

 2) Also, the link on this taglib on it's main page isn't working.

I've updated the page to point out that you have to build it from
source and linked to SVN.

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XTags download

2008-04-14 Thread Henri Yandell
I think your only option is to check the code out from
http://svn.apache.org/repos/asf/jakarta/taglibs/deprecated/xtags/trunk/
using subversion.

I don't believe there was ever a release of xtags, and we've
subsequently deprecated it.

Hen

On Mon, Apr 14, 2008 at 5:32 AM, Vijay [EMAIL PROTECTED] wrote:
 Hi there,

  I am unable to download XTags i tried both these links
  http://people.apache.org/builds/jakarta-taglibs/nightly/src/
  http://people.apache.org/builds/jakarta-taglibs/nightly/
  i get page not found error.
  pls help me to download XTags.

  Thank you,
  Vijay.




  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where can I get a recent nightly build?

2008-01-07 Thread Henri Yandell
On Jan 7, 2008 9:42 AM, Kris Schneider [EMAIL PROTECTED] wrote:
 On Jan 7, 2008 12:22 PM,  [EMAIL PROTECTED] wrote:
 
  Hi there,
 
  We're currently trying to resolve an issue in our code which appears to be
  solved by the following bug patch:
 
  http://issues.apache.org/bugzilla/show_bug.cgi?id=31789
 
  It appears this has been incorporated into the latest snapshots in the
  source repository, but there don't appear to be any nightly builds from
  2007 on the Taglibs website. Is there anywhere I can get a nightly build,
  or do I have to point to SVN and build it myself?

 This is supposed to be the place:

 http://people.apache.org/builds/jakarta-taglibs/nightly/projects/standard/

 But you can see it's a bit outdated. Not sure what needs to happen to
 remedy the situation, but your best bet is probably the source at this
 point.

Yep - so old it's useless, so I've removed it (aka moved it to a
hidden place until I notice it again and delete it).

I don't expect us to have them running there again, though if any
taglib gets active enough to be mavenified, I could see it being put
in continuum.

In fact - I'm tempted to go ahead and do that on String Taglib. Yank
it out, mavenify. Learn etc.

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: NullPointerException from x:transform

2007-10-15 Thread Henri Yandell
Hi Rob,

Could you open that as a Bugzilla entry? Just to make sure it doesn't
get forgotten if there's no immediate reply here.

Hen

On 10/15/07, Rob Adamson [EMAIL PROTECTED] wrote:
 Hi,

 I may have discovered a bug in jakarta-taglibs-standard-1.1.2.

 The JSP code

 x:transform doc=${onlineevents_archiveDoc}
 xslt=${onlineevents_archiveXSLT}
 x:param name=order value=${order} /
 /x:transform

 is very occasionally causing a NullPointerException, with the
 following stack trace:

 java.lang.NullPointerException
 *** 
 org.apache.taglibs.standard.tag.common.xml.TransformSupport.addParameter(TransformSupport.java:221)
 *** 
 org.apache.taglibs.standard.tag.common.xml.ParamSupport.doEndTag(ParamSupport.java:74)
 *** 
 org.apache.jsp.onlineevents.archive.default_jsp._jspx_meth_x_param_0(default_jsp.java:546)
 *** 
 org.apache.jsp.onlineevents.archive.default_jsp._jspx_meth_x_transform_0(default_jsp.java:515)
 *** 
 org.apache.jsp.onlineevents.archive.default_jsp._jspService(default_jsp.java:206)
 *** org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 *** javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 *** 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 *** org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 *** org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 *** javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 *** 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 *** 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 *** 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 *** 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 *** 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 *** 
 org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
 *** 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 *** 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 *** 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 *** org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:425)
 *** 
 org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:452)
 *** org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
 *** java.lang.Thread.run(Thread.java:595)

 Looking at the source of TransformSupport, I see the offending method is:

public void addParameter(String name, Object value) {
t.setParameter(name, value);
}

 implying that instance variable 't' (of type
 javax.xml.transform.Transformer) is set to null - which suggests some
 kind of weird bug where it is either overwritten or not initialised
 properly.

 I'm a bit stuck as I can't reproduce this myself; it seems to be
 occurring at random several times a day on my production site.

 I had thought it was a concurrency issue and have tried wrapping the
 call to x:transform in a synchronized block, just in case, but it
 hasn't made any noticeable difference.

 I don't know enough about the taglib lifecycle and tag pooling to
 tackle this myself, so any help or insights would be appreciated!

 The server information is:
 Tomcat 5.5.17
 JVM: Sun 1.5.0_07-b03
 OS: SunOS 5.9
 Arch: sparc

 Cheers,
 Rob

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JNDI-taglib search tag returns null

2007-07-25 Thread Henri Yandell

On 7/24/07, Iikku Mattila [EMAIL PROTECTED] wrote:

I finally figured it out but only with good luck.

On Tue, 24 Jul 2007, Kris Schneider wrote:
 On 7/24/07, Iikku Mattila [EMAIL PROTECTED] wrote:
 jndi:search id=baz contextRef=test filter=uid=quux
 searchScope=subtree/

 Seems like it might be a filter thing. Try filter=(uid=quux).
Tried that, didn't help. What did help was creating an explicit end tag.

jndi:search id=baz contextRef=test filter=uid=pohjus
searchScope=subtree
/jndi:search

This seems a tad silly to me and took quite a few hours to come up with.
Well, works now!


Which server/server-version are you running it on?

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: spam

2007-07-17 Thread Henri Yandell

On 7/17/07, Antonio Petrelli [EMAIL PROTECTED] wrote:

2007/7/17, Henri Yandell [EMAIL PROTECTED]:

 On the plus side; it's kicked off a nice debate on infrastructure@ and
 after years of people there saying 'NONONO', there might be a small
 'yes' winnning through.



Henri, can you post the link to the thread, please?


Sadly no :(

I don't know if this is another long thread that happened over there,
but the [EMAIL PROTECTED] list doesn't seem to be archived.

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sourcecode

2007-07-17 Thread Henri Yandell

On 7/16/07, Rahul Akolkar [EMAIL PROTECTED] wrote:

On 7/16/07, Ortiz, Enrique Mauricio [EMAIL PROTECTED] wrote:
 hello

 im very impressed in your i18n taglig examples.
 can you please sentd to me the source files of the resources, the source
 of the org.apache.taglibs.standard.examples.i18n.Resources

snip/

Not sure what (Java?) package that is, but the latest source of the
I18N taglib is here (you will need a SVN client):

 http://svn.apache.org/repos/asf/jakarta/taglibs/proper/i18n/trunk/


Looks rather like it's JSTL's i18n rather than the i18n taglib.

So:

http://svn.apache.org/repos/asf/jakarta/taglibs/proper/standard/trunk/examples/src/org/apache/taglibs/standard/examples/i18n/

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: spam

2007-07-16 Thread Henri Yandell

No worries, you're not the first to ask for it. I get so much spam
that dealing with it is a daily acceptance rather than something I try
to fight.

On the plus side; it's kicked off a nice debate on infrastructure@ and
after years of people there saying 'NONONO', there might be a small
'yes' winnning through.

Hen

On 7/15/07, Trenton D. Adams [EMAIL PROTECTED] wrote:

Shouldn't the archives be mangling the email addresses, or not
displaying them?  I'm going to subscribe under an alias.  At least an
alias can be deleted. :)

Sorry, I was a little jumpy.  I should have expected this.

Henri Yandell wrote:
 Sorry Trenton, this is a public mailing list. There are multiple
 original archives (ie: not mirrors) across the internet.

 Presumably you also want the email you just sent removed. I'll cc this
 reply to [EMAIL PROTECTED] in case there's anything they can
 do.

 Hen

 On 7/14/07, Trenton D. Adams [EMAIL PROTECTED] wrote:
 I just received spam at one of my email addresses.  This email address
 has NEVER been exposed to the web.  Now it has been, by this user list.
 Get your act together for crying out loud guys.

 Please, remove my email address from this post, or delete the post.

 
http://mail-archives.apache.org/mod_mbox/jakarta-taglibs-user/200611.mbox/[EMAIL 
PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: spam

2007-07-15 Thread Henri Yandell

Sorry Trenton, this is a public mailing list. There are multiple
original archives (ie: not mirrors) across the internet.

Presumably you also want the email you just sent removed. I'll cc this
reply to [EMAIL PROTECTED] in case there's anything they can
do.

Hen

On 7/14/07, Trenton D. Adams [EMAIL PROTECTED] wrote:

I just received spam at one of my email addresses.  This email address
has NEVER been exposed to the web.  Now it has been, by this user list.
Get your act together for crying out loud guys.

Please, remove my email address from this post, or delete the post.

http://mail-archives.apache.org/mod_mbox/jakarta-taglibs-user/200611.mbox/[EMAIL
 PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a recent release of taglibs standard?

2007-06-29 Thread Henri Yandell

On 6/21/07, Kris Schneider [EMAIL PROTECTED] wrote:

Quoting Klotz, Leigh [EMAIL PROTECTED]:



 Confused Questions:

 Is Jakarta Taglibs Standard still being developed?

Yes, but there hasn't been much activity lately.

 Is there a release planned that incorporates the existing bug fixes?

You might be interested in this page:

http://wiki.apache.org/jakarta-taglibs/Standard_1%2e1%2e3

We (taglibs-dev) have talked on and off about pulling things together for a new
release, but there isn't a firm schedule in place.


My aim is to get moving again in a months time, then push aggressively
for a release by pushing various other ones off into the future.

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updated log taglib?

2007-02-20 Thread Henri Yandell

On 2/20/07, Gaurav Arora [EMAIL PROTECTED] wrote:

I feel really stupid after reading your reply. The two import statements in 
LoggerTag.java should
have given me a clue as to its implementation. No wonder it didn't work, I 
wasn't using it right!

Now that I think about it, this implementation might be the way to go about it. 
But then again, how
often does one switch loggers. If it needs to be changed, i'd be happy to do it.


It's less about the switching and more about making it so the Log
taglib would work with the new JDK logging and not having two
versions.


And i'm going to take you up on your offer Hen, I could use some mentoring with 
the taglibs. :)


Heh - I meant more with the Apache/open-source bits - releasing,
making sure commits are good etc.


My first question, in the case of the c:out tag in the standard taglib, if a 
variable is passed to be
printed in the format ${x}, does it need to be handled by the library 
explicitly or is it
automatically converted to its value before being sent for processing?


Memory is very fuzzy. I seem to recall that in the latest spec
implementations it's all magic, but that there was a midway point
where in one spec implementation (the jstl 1.0.x one) you had to do a
chunk of pain to get the ${x} to work correctly. I remember trying to
add that to the String taglib, though not sure if I did or not in the
end.

Nowadays I imagine we'd just focus on JSTL 1.1.x/1.2.x support
(whatever the jsp spec is for that).

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Updated log taglib?

2007-02-19 Thread Henri Yandell

I don't know if it's valid, but the current trunk of the log taglib
uses commons-logging [so it can sit on top of log4j, jdk logging etc].
It seemed like a good idea N years ago [best intentions and all], but
it can be rolled back if it's problematic.

I'm quite happy to mentor someone if they want to work on the log taglib. :)

Hen

On 2/18/07, Gaurav Arora [EMAIL PROTECTED] wrote:

The project I am working on may need to use the taglib. I will definitely try 
my best to patch it and send the patch on the list. I was thinking of patching 
the benchmark taglib as well to use a variable instead of printing the time.

I haven't contributed to the ASF projects(mainly because I come from the 
scripting world) before so I was wondering if there is a process that needs to 
be followed. Should patches and such be discussed with other developers on the 
dev mailing list first?

Thanks,
Gaurav

On Sun, 18 Feb 2007 15:48:19 +0100, Martin van den Bemt [EMAIL PROTECTED] 
wrote:
 I don't think anyone is currently working on that..
 We are always interested in patches however :)

 Mvgr,
 Martin

 [EMAIL PROTECTED] wrote:
 I was wondering if there was an updated Log taglib available somewhere.
 The one
 which is up for download on the official site is quite old because it
 still
 uses the old Log and category classes. Is it still being worked on
 actively?

 Gaurav Arora


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Are there plans for a Jakarta implementation of the JSTL 1.2 spec

2006-10-31 Thread Henri Yandell

Cool - license wise it's a case of us being able to ship the Glassfish
binaries but not the source. I can't see that being a problem in the
Java world - except that it means Geronimo are committting themselves
to something they can't fork later.

Hen

On 10/31/06, Joe Bohn [EMAIL PROTECTED] wrote:

Thanks Henri ... I think others would find it helpful to have that info
on the site too.

As far as Geronimo goes, I personally don't know of any license issues
but I've been meaning to ask on the Geronimo dev list to see if anybody
else has more detailed knowledge (thanks for the nudge).  I have
expressed the idea of using Glassfish on the dev list (sans explicit
discussion of the license) and so far there have been no objections.

If somebody raises an issues I'll post again on this list.

Thanks for the help,
Joe


Henri Yandell wrote:
 I'll look into putting something up on the site to that effect.

 Any idea if that's a problem for Geronimo Joe? Are you going to be
 able to reuse the CDDL'd Glassfish or is it something that's more
 preferable to have rewritten under AL 2.0?

 Hen

 On 10/17/06, Joe Bohn [EMAIL PROTECTED] wrote:

 Thank you for the prompt response Martin.

 Joe



 Martin Cooper wrote:
  On 10/17/06, Joe Bohn [EMAIL PROTECTED] wrote:
 
 
 
  Is there currently work underway on a Jakarta implementation of the
 JSTL
  1.2 spec (JSR 52, JEE5 requirement)?
 
 
 
  There isn't currently, and there isn't likely to be. JSTL
 development now
  happens over in the Glassfish project.
 
  --
  Martin Cooper
 
 
  Assuming there is (or soon will be), does somebody have a
 guesstimate on
 
  when that might be available?
 
  Thanks,
  Joe
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Are there plans for a Jakarta implementation of the JSTL 1.2 spec

2006-10-30 Thread Henri Yandell

I'll look into putting something up on the site to that effect.

Any idea if that's a problem for Geronimo Joe? Are you going to be
able to reuse the CDDL'd Glassfish or is it something that's more
preferable to have rewritten under AL 2.0?

Hen

On 10/17/06, Joe Bohn [EMAIL PROTECTED] wrote:

Thank you for the prompt response Martin.

Joe



Martin Cooper wrote:
 On 10/17/06, Joe Bohn [EMAIL PROTECTED] wrote:



 Is there currently work underway on a Jakarta implementation of the JSTL
 1.2 spec (JSR 52, JEE5 requirement)?



 There isn't currently, and there isn't likely to be. JSTL development now
 happens over in the Glassfish project.

 --
 Martin Cooper


 Assuming there is (or soon will be), does somebody have a guesstimate on

 when that might be available?

 Thanks,
 Joe


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: URL for String TagLib source code

2005-07-15 Thread Henri Yandell
On 7/15/05, Robert Taylor [EMAIL PROTECTED] wrote:
 Thanks Martin, but at the risk of sounding ignorant.
 
 The last source link is labeled archives... (not very intuitive)
 I clicked on it and then downloaded the file:
 jakarta-taglibs-string-current.zip 
 
 This appears to be a binary distribution.

Yeah, I can't find a source distribution for any of the taglibs I
randomly clicked on, either in archives or on the main mirrors. Seems
bad.

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: URL for String TagLib source code

2005-07-15 Thread Henri Yandell
On 7/15/05, Martin Cooper [EMAIL PROTECTED] wrote:
 On 7/15/05, Robert Taylor [EMAIL PROTECTED] wrote:
  Thanks Martin, but at the risk of sounding ignorant.
 
  The last source link is labeled archives... (not very intuitive)
  I clicked on it and then downloaded the file:
  jakarta-taglibs-string-current.zip 
 
 Sorry, I hadn't realised that what I wrote could be parsed differently
 from how I was thinking about it. ;-) I was trying to say oh, you
 _would_ have to go and choose the _last_ link, wouldn't you??,
 meaning that, of the three links with Source in them in the
 Downloads section, the last one is the only one that does _not_ work!
 The other two do work, as Rahul has mentioned rather more clearly than
 I did.

While I'm on a slightly different topic:

* we really don't release source when we release code?

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JVM Crashed because of taglibs

2005-03-04 Thread Henri Yandell
On Thu, 3 Mar 2005 19:45:38 +0530, Vivek Kumar Gupta
[EMAIL PROTECTED] wrote:
 Hi Hen,
 
 today I have done some analysis about the JVM Crash:
 1. Jakarta Taglibs are using the Sun XML parser.

Rather than the Sun XML parser, it's probably the Apache variants of
such jars. Ones very much like them were found in Sun's JDK 1.4.

 2. Now on AIX Machine only IBM Java will run, which in turn will use XML4J
 i.e. ibm xml java parser.

75% sure of the below:

W3C XML spec jars. 

thirdparty/jakarta-taglibs/standard-1.0.2/lib/dom.jar: 
thirdparty/jakarta-taglibs/standard-1.0.2/lib/sax.jar:  

Sun parser itself. Problem probably in here.

thirdparty/jakarta-taglibs/standard-1.0.2/lib/jaxp-api.jar:  

These two are XPath implementations which sit on top of the other jars.

thirdparty/jakarta-taglibs/standard-1.0.2/lib/jaxen-full.jar: 
thirdparty/jakarta-taglibs/standard-1.0.2/lib/saxpath.jar: 

 
 Conclusion : So something is happening due to Sun XML parser.

Sounding much more likely, at least we're getting lower in the
technology stack and closer to the things that can blow up :)

 3. question due to curiosity why Taglibs is not using consolidated xml java
 parser.

Probably due to version considerations. I can't recall exactly which
version of Java that the JSTL 1.0 spec targets, but I suspect it's
J2SE 1.2 and consolidated xml parsers weren't there in 1.2.

 if can guide something to avoid this JVM Crash please do suggest.

Not got a lot, my AIX experience is limited to figuring out how to
make an ftp server work.

Are you able to identify the snippet of JSTL in question which is
causing the crash? If so, then you can either post that here or dig
into the source code and extract the XML parsing code in question,
then get it running outside of a servlet container and hopefully have
a nice tight example of the bug with which to post about on Sun or
IBM's site.

Assuming it is the XML (and doubt is your best friend in these
situations), this list probably lacks the knowledge to help at that
stage, but we can help get there.

Hen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JVM Crashed because of taglibs

2005-03-03 Thread Henri Yandell
Wow :)

How sure are you that it's the Standard taglib? Seems unlikely for it
to be causing JVM crashes, especially a compile.

I'd advise trying to remove bits from the breaking system until you've
reduced the problem a bit more. Might be you're just hitting bugs in
the 64-bit compiler? (no clue about 64-bit compiling).

Hen

On Thu, 3 Mar 2005 14:03:44 +0530, Vivek Kumar Gupta
[EMAIL PROTECTED] wrote:
 Hi everybody,
 
 I am new to Jakarta Taglibs.
 I am facing following problem:
 
 Used Jakarta Taglibs  on linux AS3.0 it is working fine. But on AIX 5.3 IBM 
 machine it is getting crashed.
 I am using IBM Java 1.4.2, 64bit.
 
 Here is log for JVM Crash:
 
 ===
 compile_files:
 [echo] 
 build/common/java:build/server/java:thirdparty/tomcat/5.0.12/common/lib/jasper-compiler.jar:thirdparty/tomcat/5.0.12/common/l
 ib/jasper-runtime.jar:thirdparty/tomcat/5.0.12/server/lib/catalina.jar:thirdparty/jakarta-taglibs/standard-1.0.2/lib/dom.jar:thirdpar
 ty/jakarta-taglibs/standard-1.0.2/lib/jaxen-full.jar:thirdparty/jakarta-taglibs/standard-1.0.2/lib/jaxp-api.jar:thirdparty/jakarta-tagli
 bs/standard-1.0.2/lib/jdbc2_0-stdext.jar:thirdparty/jakarta-taglibs/standard-1.0.2/lib/jstl.jar:thirdparty/jakarta-taglibs/standard-1
 .0.2/lib/sax.jar:thirdparty/jakarta-taglibs/standard-1.0.2/lib/saxpath.jar:thirdparty/jakarta-taglibs/standard-1.0.2/lib/standard.jar
 [javac] Compiling 668 source files to /home/qatest/vivek/build/server/java
 JVMDG217: Dump Handler is Processing a Signal - Please Wait.
 JVMDG315: JVM Requesting Heap dump file
 ...JVMDG318: Heap dump file written to 
 /home/qatest/vivek/heapdump315594.1109669355.txt
 JVMDG303: JVM Requesting Java core file
 ===
 
 Regards
 Vivek Kumar Gupta
 Dept.: Switching
 Network Programs (I) Ltd.
 B-1-C, Sector -10, Noida.
 Email: [EMAIL PROTECTED]
 Tel: +91-120-2536622/2544781 Ext: 1160
 
 Network Programs is a SEI-CMM Level 5  ISO 9001: 2000 Certified Company
 
 The information contained in this communication (including any attachments) is
 intended solely for the use of the individual or entity to whom it is 
 addressed
 and others authorized to receive it. It may contain confidential or legally
 privileged information. If you are not the intended recipient you are hereby
 notified that any disclosure, copying, distribution or taking any action in
 reliance on the contents of this information is strictly prohibited and may be
 unlawful. If you have received this communication in error, please notify us
 immediately by responding to this email and delete it from your system.
 Network Programs (India) Limited is neither liable for the proper and complete
 transmission of the information contained in this communication nor for any
 delay in its receipt.
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embed picture in HTML email

2004-04-06 Thread Henri Yandell

Would hopefully be the same for the Mailer taglib. It's cool that Mozilla
supports the cid stuff, maybe it's even some kind of published standard
out there, and things like Notes and Groupwise might support it too [must
think who I can mail to test *grin*].

Hen

On Mon, 5 Apr 2004, Jason Lea wrote:

 Here is an example of how to do it with JavaMail API (not as an jsp tag)

 http://java.sun.com/developer/onlineTraining/JavaMail/exercises/MailHtml/

 It seems mail clients like Outlook and Mozila Mail/Thunderbird (and
 probably other email clients that display html) can use the img
 src=cid:myattachmentname; instead of the server etc.  It will look for
 the attachment with the Content-ID of 'myattachmentname' and display that.


 Henri Yandell wrote:

 You can't embed pictures in emails. You can have img src=foo etc in
 them, but the picture will be obtained from a server of some kind.
 
 Some mail clients [okay, Outlook is the only one I know of] allow for some
 proprietary xml-ish tags to be in your emails which will load resources
 from attachments.
 
 I usually send from Outlook to Pine to see this, but I'm sure there are
 ways to see what the html really looks like in Outlook. Save it or
 something. Anyway, you'll see lots of special tags that exist. I've never
 really played with them though.
 
 I'd definitely be interested in seeing any info which details the
 pseudo-library of extra tags that Outlook converses in, but have never
 really gone looking for them. Maybe it's possible to write a Java library
 for creating Outlook-HTML pages and then sending it as a mime-type that
 only Outlook responds to (?). We could then send 3 versions of every mail,
 plain-text, html and outlook-html.
 
 Just some thoughts...
 
 Hen
 
 On Mon, 5 Apr 2004, Edsard Vegter wrote:
 
 
 
 Hi,
 
 Using the JSP mailer tags, I can send an HTML emails. Now I'd like to to
 go one step further and have a picture in the email as well. Is it
 possible to embed a jpg of gif  in the message???  And if so, how do I do
 this
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


 --
 Jason Lea



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embed picture in HTML email

2004-04-04 Thread Henri Yandell

You can't embed pictures in emails. You can have img src=foo etc in
them, but the picture will be obtained from a server of some kind.

Some mail clients [okay, Outlook is the only one I know of] allow for some
proprietary xml-ish tags to be in your emails which will load resources
from attachments.

I usually send from Outlook to Pine to see this, but I'm sure there are
ways to see what the html really looks like in Outlook. Save it or
something. Anyway, you'll see lots of special tags that exist. I've never
really played with them though.

I'd definitely be interested in seeing any info which details the
pseudo-library of extra tags that Outlook converses in, but have never
really gone looking for them. Maybe it's possible to write a Java library
for creating Outlook-HTML pages and then sending it as a mime-type that
only Outlook responds to (?). We could then send 3 versions of every mail,
plain-text, html and outlook-html.

Just some thoughts...

Hen

On Mon, 5 Apr 2004, Edsard Vegter wrote:

 Hi,

 Using the JSP mailer tags, I can send an HTML emails. Now I'd like to to
 go one step further and have a picture in the email as well. Is it
 possible to embed a jpg of gif  in the message???  And if so, how do I do
 this


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP development environments

2004-03-25 Thread Henri Yandell

Is there a free trial for MyEclipse with Eclipse 3.0 yet? Colleagues have
bought it and liked it, but we've not started a new project with it yet as
we're mopping up the last project so I can't verify if it works well over
time.

For all the people saying 'jbuilder, netbeans, eclipse' etc, I'd like to
hear if any particular one tackles the problem in a radically different
and better way. Or if it just gives them colour coding. Eclipse' support
is mainly through plugins, so do plugins exist for the other IDEs, or are
they all just the stock features that come with the IDE? How about the
Websphere IDE?

Dreamweaver obviously tackles it differently as it approaches it from the
side of a website and not just the front end of Java code. However,
Dreamweaver is not JSP only so you're stuck with ASP/PHP generalities in
the general concept of the application which might mean there are nice
features you might not be getting.

Does Struts Studio contain any JSP stuff, or solely Struts based? [Ooo,
they have a JSF Studio coming soon...and this all plugs into Eclipse].

Hen



On Thu, 25 Mar 2004, Lorenzo Sicilia wrote:

 Zachary Hartley wrote:

  Hello,
 
  I've just started a web project that aims to be pure JSP. Unfortunately,
  I'm very new to all of this and have not found a satisfactory
  environment in which to develop JSP pages. Normally, I use Eclipse for
  my day to day Java programming, but I've found the various plugins for
  Eclipse to be somewhat lacking so far (Lombez, MyEclipse, et al).

 The best solution is MyEclipse with Eclipse. With the last release 2.7
 there is a lot of improvements about jsp, jstl and ear/war application.
 There is a free trial.

 In my opinion in the future will be two IDE:
 - eclipse
 - .Net studio

 Than I think is better choose the right IDE, today ;)

 Regards Lorenzo Sicilia

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP development environments

2004-03-25 Thread Henri Yandell

You might find this painful by the way. I've done things the pure JSP
way [and like it], but still find myself having to write beans to contain
data.

I'm unsure why that was. Need to check if JSTL-EL will work with Maps or
not. Xephyrus' collections taglib is useful if you try to go no-beans.

Apart from that, a pure JSP site is a joy to create and very fast. I still
advise doing things from an MVC point of view. The Model is your map/beans
structure, the View are lots of jsp pages which submit to your Controllers
which are other jsp pages that DO NOT display content to the user, they
merely do things to the structure and redirect.

I recommend a naming convention of _addFoo.jsp and add_foo.jsp, where the
first is the controller that does the adding and the latter is the html
form the user enters the foo data into.

By being pure JSP, you can take advantage of a rapid feedback cycle as you
can edit the JSP live on the development server. No deploys, restarts,
just a magical old system we 90's coders like to call the browser refresh.

Lastly, remember to use your Request scope majority of the time and not
your Session scope. That's a maxim that most JSP I've seen could do with
more adherence to.

Hen

On Thu, 25 Mar 2004, Zachary Hartley wrote:

 Martin Cooper wrote:
  What, exactly, do you mean by pure JSP? If you mean that you'll have

 I didn't want to use any servlets or beans, just jsp pages. By the way,
 thanks to everyone for their feedback, it looks like I'll be giving
 Dreamweaver a go, as my school apparently has some sort of licensing
 deal such that students get to use freely. Thanks!

 Zachary Hartley
 --
 [EMAIL PROTECTED]
 http://www.ramensaurus.org

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP development environments

2004-03-24 Thread Henri Yandell

Heh, is JBuilder that stunning for JSP? In the non-'enterprise' edition?
Above and beyond the other Java IDEs I mean.

I usually use either Vim or Eclipse and for JSP I've played at using
Dreamweaver. It seems to have a lot of the right things, but the previous
version just didn't seem to feel natural to me. The tag-completion seemed
to be hit and miss as to when it would work.

They've since released a new version, so this might be improved. Generally
the JSP support was worth a 7/10.

One nice plus of using something like Dreamweaver over a Java IDE is that
you are practicing good separation of the jsp from the java. Just because
you're doing 2 roles doesn't mean you have to do them in the same tool.

One downside is that Dreamweaver support for typical coding SCMs is quite
limited. It does MS VSS and its own proprietary basic scm. Otherwise you
have to do the cvs/svn/perforce/whatever in a separate tool.

Hen

On Thu, 25 Mar 2004, Ananth R wrote:

 Hello,

 You can use JBuilder.

 Ananth

 On Thu, 25 Mar 2004, Zachary Hartley wrote:

  Hello,
 
  I've just started a web project that aims to be pure JSP. Unfortunately,
  I'm very new to all of this and have not found a satisfactory
  environment in which to develop JSP pages. Normally, I use Eclipse for
  my day to day Java programming, but I've found the various plugins for
  Eclipse to be somewhat lacking so far (Lombez, MyEclipse, et al). I was
  wondering if anybody had found an IDE-ish environment to work with on
  JSP web applications. Or do mos people just use a text editor (vim,
  emacs, et al) from a commandline, coupled with ant et al? Thanks for any
  feedback on the subject!
 
  Zach Hartley
  --
  [EMAIL PROTECTED]
  http://www.ramensaurus.org
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 --

 A N A N T H. R



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ANN: JSTL Quick Reference

2004-03-18 Thread Henri Yandell

I've always used the appendix to Shawn Bayern's JSTL in Action. What does
this have above and beyond that? Is it JSTL 1.1 specific?

Hen

On Thu, 18 Mar 2004 [EMAIL PROTECTED] wrote:

 I noticed that there seems to be demand for a JSTL Quick Reference.  When I was 
 learning JSTL a couple of months ago I put together such a document and I thought 
 others might find it of use.  It can be downloaded from 
 http://www.jadecove.com/jstl-quick-reference.pdf.  The only downside about the 
 document is that you have to make a book out of it yourself.  I call this 
 self-binding :)  All feedback is most appreciated and if anyone would like to 
 assist in publishing this document I will be glad to talk about it.

 Bill Siggelkow
 Jade Cove Solutions
 www.jadecove.com
 [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ANN: JSTL Quick Reference

2004-03-18 Thread Henri Yandell

Looks very good. A while back, Hans Bergsten asked about whether people
want a JSTL Pocket Reference or a larger JSP one, so O'Reilly are
obviously vaguely in this area.

This is pretty much what I'd hope for if Hans has gone ahead and worked on
a JSTL PockRef, so I'll be printing it tomorrow morning :)

Thanks.

[What tool did you use to create this?]

Hen

On Thu, 18 Mar 2004, Bill Siggelkow wrote:

 Henri,
I learned JSTL from Shawn's book as well as the spec -- the guide I
 wrote is more of a deskside quick guide.  Kind of like the foldout chart
 that comes with the O'Reilly HTML  -- only more verbose than that.
 Basically, I was looking for something I could easily hold in my lap and
 quickly flip through.  In addition to what Shawn have my doc provides a
 short example demonstrating the tag (when needed) -- In addition I cover
 EL and EL functions (JSTL 1.1) ... I also provide listing of some useful
 XPath functions.

 Henri Yandell wrote:
  I've always used the appendix to Shawn Bayern's JSTL in Action. What does
  this have above and beyond that? Is it JSTL 1.1 specific?
 
  Hen
 
  On Thu, 18 Mar 2004 [EMAIL PROTECTED] wrote:
 
 
 I noticed that there seems to be demand for a JSTL Quick Reference.  When I was 
 learning JSTL a couple of months ago I put together such a document and I thought 
 others might find it of use.  It can be downloaded from 
 http://www.jadecove.com/jstl-quick-reference.pdf.  The only downside about the 
 document is that you have to make a book out of it yourself.  I call this 
 self-binding :)  All feedback is most appreciated and if anyone would like to 
 assist in publishing this document I will be glad to talk about it.
 
 Bill Siggelkow
 Jade Cove Solutions
 www.jadecove.com
 [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: date taglib help

2004-03-06 Thread Henri Yandell

Providing an example might help.

It sounds like you're talking about intervals, ie) the amount of time
between two points in time. The Java API only really handles points in
time and sucks at intervals.

Maybe we need to get a formatting taglib for JODA Time, http://joda.sf.net

Hen

On Sat, 6 Mar 2004, chekuri raju wrote:

 hello everybody

 can anyone help me find a tag for dispaying dates between any two  dates  based on 
 interval like day,week,month..
 i did search
 thanks
 srinivas



 -
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free web site building tool. Try it!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:out tag silently fails

2004-03-03 Thread Henri Yandell

Just to check, does Thomas even want to use JSP 2.0?

No one's asked if he's using a JSP 2.0 compliant server.

Hen

On Wed, 3 Mar 2004, Adam Hardy wrote:

 Thomas,
 use the default= attribute to force it to output something on error or
 when the value is null.

 As for your output, the EL is obviously not being evaluated. Have you
 got the setting in your web.xml to affect this? Check out the JSP2.0
 spec from Sun. Section 3.3.2 - deactivating EL evaluation. Worth the
 read, definitely. It's el-ignored

 Adam

 On 03/02/2004 11:31 PM Thomas McDonald wrote:
  How come this tag is outputing nothing, i.e., it
  doesn't render the value of 'i'.  Is this an jstl
  expression language bug?
 
  I can't get an error to troubleshoot!  Obviously the
  tags are working, otherwise it wouldn't have looped,
  right?
 
 
  code:
 
  %@ taglib uri=http://java.sun.com/jstl/core;
  prefix=c%
  html
  body
  brtime: %=new java.util.Date() %
  br
  c:forEach var=i begin=1 end=10 step=1
  c:out value=${i} /
  br /
  /c:forEach
  /body
  /html
 
 
 
  output:
 
  time: Tue Mar 02 17:11:53 EST 2004
  ${i}
  ${i}
  ${i}
  ${i}
  ${i}
  ${i}
  ${i}
  ${i}
  ${i}
  ${i}
 
 
  __
  Do you Yahoo!?
  Yahoo! Search - Find what you’re looking for faster
  http://search.yahoo.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 struts 1.1 + tomcat 5.0.16 + java 1.4.2
 Linux 2.4.20 Debian


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Q] Performance of SQL tags?

2004-02-05 Thread Henri Yandell

Just guessing, but I doubt it will be faster performance-wise, just faster
to develop. It lets you treat JSP as a scripting language and remove the
compile/deploy stage.

Hen

On Thu, 5 Feb 2004, Riaan Oberholzer wrote:

 Is the SQL tags (in JSTL) performance acceptable?

 I'm populating tables and was wondering if it would be
 better to read the data in normal Java code and then
 populate the table with

 td%= row.getItem1() %/td
 td%= row.getItem2() %/td

 etc.

 I'm not too worried about trying to keep java code out
 of jsp's, I really want the fastest solution if it can
 make a significant difference.


 __
 Do you Yahoo!?
 Yahoo! Finance: Get your refund fast by filing online.
 http://taxes.yahoo.com/filing.html

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tag to Unescape an HTML String?

2004-01-26 Thread Henri Yandell

Commons Lang 2.0+ contains a StringEscapeUtils which has an escapeHtml and
unescapeHtml that handle the 's etc. I can look to adding these to the
String Taglib as it depends on Lang anyway, is easy to code and is in need
of an update to fit Lang 2.0.

Still waiting for JSP 2.0 to be a bit more out there before trying to
decide what future String Taglib really has for me.

Hen

On Mon, 26 Jan 2004, Martin van Dijken wrote:

 Hey Jim and Dan,

 The URLDecoder.decode method decodes a URLEncoding. This is the encoding
 browsers do when you type for instance a spacechar in the location bar,
 the browser replaces it with %20. This is definitely not the same thing
 as HTML encoding in which you would replace the char  by amp;.
 URLDecoding is definitely not a solution for your current issue. I've
 never found a generic solution, but that is not to say there isn't one.

 Concerning your page layout issues, I'd definitely advise you to take a
 look at Tiles. It works very well with struts as a plugin, but as I
 understand it can function standalone as well.

 http://jakarta.apache.org/struts/userGuide/dev_tiles.html

 Good luck!

 Martin van Dijken

  -Original Message-
  From: James Watkin [mailto:[EMAIL PROTECTED]
  Sent: zaterdag 24 januari 2004 2:01
  To: Tag Libraries Users List
  Subject: RE: Tag to Unescape an HTML String?
 
 
  A little while ago I tried the Apache Jakarta String TagLib
  str:decodeUrl. It gave me the following error: URLDecoder:
  Illegal hex
  characters in escape (%) pattern - For input string: a. As
  you suggest,
  maybe the length of my body HTML String was too long to be
  passed as a param.
 
  - Jim
 
  At 04:45 PM 1/23/2004 -0800, you wrote:
  java.net.URLDecoder.decode() will decode such a string.
  You could create a simple tag that called the method
  if you want.  Be aware that some servers are unhappy with really big
  URLs.
  - Dan
  
-Original Message-
From: James Watkin [mailto:[EMAIL PROTECTED]
Sent: Friday, January 23, 2004 2:47 PM
To: [EMAIL PROTECTED]
Subject: Tag to Unescape an HTML String?
   
   
I have a question regarding the following problem and proposed
solution: Within a JSP, what would be the most efficient way to
unescape an HTML
string? The Regexp tag library? I've managed to avoid
  writing regular
expressions for a long time.
   
Problem:
I'm creating some reusable JSP templates that are chained
  together
with c:import. I'm trying to solve the well known problem of
having to create
two new JSPs for every new page -- one for the new page body,
the other to
import the master page layout and pass the URL of the new
page body JSP.
   
Proposed Solution:
Rather than pass the master page layout a URL for the body JSP, I
can eliminate the body JSP by passing in the body as a
  String. If my
master page layout is within the same container, then I can use
c:set and not
have to worry about unescaping the body String. However, I'd
prefer (I
think) to have the master page layout live outside the container,
especially since the JSTL spec notes that foreign context
access within the
same container might not be supported by all containers. If
the master page
layout JSP is outside the container of the importing JSP,
then the body
HTML String has to be passed with c:param, which escapes
the string. So
I'll need to unescape it be I can use it.
   
- Jim
   
__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
   Fax: 1-310-825-4835
__
   
   
   
  
-
To unsubscribe, e-mail:
  [EMAIL PROTECTED]
For additional commands, e-mail:
  [EMAIL PROTECTED]
   
   
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  __
  James Watkin
  ACIS Software Development
  The Anderson School at UCLA
  [EMAIL PROTECTED]
  Voice: 1-310-825-5030
 Fax: 1-310-825-4835
  __
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] JavaServer Pages, 3rd Edition (O'Reilly)

2003-12-23 Thread Henri Yandell

How about a JSTL pocket reference Hans?

You're with the right publisher and it sounds like the book has the
content in it to make it easy.

Hen

On Tue, 23 Dec 2003, Hans Bergsten wrote:

 K.C. Baltz wrote:
  Does you book have a quick-reference/cheatsheet for JSTL?  The one from
  Manning's book (appendix A) isn't really quick enough for me (Too many
  pages).  I find I'd really like a 1-2 page summary of EL and the JSTL
  tags.  I keep meaning to do one up myself, but of course work projects
  keep taking priority.

 I'm not sure what you'd like to see covered by a 1 - 2 page summary,
 but in terms of summaries, my book has 3 page overview of the JSP EL
 (with tables for all operators and implicit variables) in one chapter,
 a 3 page intro to JSTL in another chapter, plus appendixes with
 concice descriptions of all JSTL custom tags and classes and the JSP
 EL syntax, variables, and type conversion rules.

 The EL and JSTL tags are also used extensively in realistic examples
 throughout the book.

 Hans

  Hans Bergsten wrote:
 
  I'm proud to announce that the 3rd Edition of my JavaServer Pages book
  is now available at Amazon.com, BarnesAndNoble.com and other online
  stores, as well as in most regular book stores.
 
  The 3rd edition covers all the great new features added in JSP 2.0 and
  JSTL 1.1, such as tag files (custom tags as JSP pages), the Expression
  Language, the new, simplified tag handler API, XML syntax enhancements,
  new configuration options, and a lot more.
 
  For more information, a sample chapter and the updated examples, please
  visit the book web site:
 
http://www.thejspbook.com/
 
  Hans


 --
 Hans Bergsten[EMAIL PROTECTED]
 Gefion Software   http://www.gefionsoftware.com/
 Author of O'Reilly's JavaServer Pages, covering JSP 2.0 and JSTL 1.1
 Details athttp://TheJSPBook.com/


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: sql:query to an ArrayList

2003-10-04 Thread Henri Yandell

You can use the Xephryus Data Structures Taglib here, rather than dropping
down into Java.

http://www.xephyrus.com/taglib-datastructs/

I've been very happily using it on a simple JSP-only system [well,
JSP-only and JavaBeans because JSTL cannot treat Maps as beans
*grumblegrumble*].

If interested, I can send the example code of taking sql into lists next
week [code is at work].

Hen

On Sat, 4 Oct 2003, Serge Knystautas wrote:

 Why do you need it as an ArrayList?  Generally it's bad practice to
 reference objects by interface, not implementation.  But anyway, to get
 to List...

 c:set var=rows value=${rs.rows} /
 %
 Object[] rows = (Object[]) pageContext.findAttribute(rows);
 List testList = Arrays.asList(rows);
 %

 --
 Serge Knystautas
 President
 Lokitech  software . strategy . design  http://www.lokitech.com
 p. 301.656.5501
 e. [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  HI all,
  I am trying to figure out how to go from sql:query var=rs
  scope=page dataSource=${conn} ... to an ArrayList that I need to
  feed to another taglib.  I've looked through the Hans' JavaServer
  Pages book and found something that looked like it should work:
 
  %
ArrayList testList = new ArrayList();
  %
 
  c:forEach items=${rs.rows} var=row varStatus=status
c:set var=partNum value=${row.PartNumber}/
%
  String partNumber = (String) pageContext.getAttribute(partNum);
  testList.add( partNumber );
%
  /c:forEach
 
  %
request.setAttribute( testList, testList );
  %
 
  display:table name=testList class=its/
 
  However, the page is truncated before it even appears to run this
  code (last line is td8)?  If I delete the scriptlet in the
  middle of the forEach loop the page displays properly with display
  tag saying that it is empty...  I also tried using:
 
jsp:useBean id=partNum class=java.lang.String/
%
  testList.add( partNum );
%
 
  and got the same weird truncation.
 
  I'd appreciate some help on going from the sql tag's row collection
  to an ArrayList.




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL startup times - is caching going on?

2003-09-20 Thread Henri Yandell

The JSP spec for Tomcat 4.1 does say that a container may cache Tag
objects between page runs. It sounds like this could be what's happening
here. I've no idea whether it would cache across sessions etc. Up to the
server and not the taglib.

On the speed issue. What are you using to create the SVG? And where does
it get the data?

Off-topic: I've been having fun with the Cewolf JFreeChart library and
it's pretty nifty.

Hen

On Sat, 20 Sep 2003, Richard Mixon (qwest) wrote:

 I am having an issue with large startup times the first time one of my
 pages runs that uses JSTL mostly the core library. Subsequent requests
 (even for different users on different data) take much, much less time.

 Here is a little more detail. Any ideas are much appreciated. My ISP is
 pretty irate because we suck up huge amounts of CPU each time it
 happens.

 We are using Tomcat 4.1.24, Java 1.4.1 and Struts 1.1.

 OK, the page uses a couple of nested foreach loops to generate a
 grid/chart of SVG markup language. It also uses a couple of small
 foreach loops to generate tick marks on an axis. It looks something
 like:

   Chart  page
 embed tag
 include JSP/JSTL page to generate footer.
 include JSP/JSTL page to generate x and y axis
 JSTL markup to generate main body of chart
 include JSP/JSTL page to generate footer.

 The request takes a half second to build the Java objects that the JSTL
 code uses to render on the page. But the rendering takes 45 second on a
 650MHZ Sun SPARC III machine and almost that long on a fast Windows
 machine (2500 MHZ).

 The second and subsequent times the chart rendering drops down to less
 than 200 milliseconds. Then about five minutes later, if the chart is
 requested again, it takes the 45 seconds to generate, then 200
 milliseconds for subsequent requests.

 Thanks - Richard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get the size of a java.util.List object in EL?

2003-09-17 Thread Henri Yandell

This has been on the list before I think. The recommended solution appears
to be to replace your List class with a ListBean which contains a getSize
method. Would probably be useful if Taglib project could have these
classes available for download. Anyone implemented these and feel like
offering them up?

Another option is to have a tag to get it. Maybe Xephyrus could add it to
their datastruct taglib:

http://www.xephyrus.com/taglib-datastructs/reference.html

Hen

On Wed, 17 Sep 2003, Adam Hardy wrote:

 Hi Billy,

 I don't know about this one. Maybe someone more guru-like will step up
 with an answer 8-)

 I'm not quite sure why EL doesn't like this but I think it's because the
 List class is not a javabean - presumably EL looks for getSize() rather
 than the actual size(), but that doesn't explain why it's complaining
 about an integer.


 Adam


 On 09/17/2003 02:19 AM Billy Bacon wrote:
  I need to get the size (as an int) of a java.util.List I have. The following
  doesn't work
 
  c:out value=Size = ${browseForm.map.colInfoList.size}/
 
  It gives me the following exception...
 
  ServletException in:/jsp/browseQueueBody.jsp] An error occurred while
  evaluating custom action attribute value with value Size =
  ${browseForm.map.colInfoList.size}: The . operator was supplied with an
  index value of type java.lang.String to be applied to a List or array, but
  that value cannot be converted to an integer. (null)'
 
  Does anyone know how I could get the size of the List?
 
  - Billy -
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 --
 struts 1.1 + tomcat 4.1.27 + java 1.4.2
 Linux 2.4.20 RH9


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL in Action

2003-09-07 Thread Henri Yandell

I've not seen any Manning books on Safari. I presume this is a
big-business thing and not related to a specific book. Manning are quite
into eBooks, so maybe they're seen as Safari competitors.

Hen


On Sun, 7 Sep 2003, Rick Ross wrote:

 Any chance of getting that onto Safari?

 I know I sound like broken record here, but I love it and I think it's a
 good deal for the writer/publisher as well.

 R.

 Shawn Bayern wrote:

 Hi there (from law school)!  :)
 
 As I take a break from reading about civil rights in California, I just
 wanted to point out that I just found out JSTL in Action is back in
 stock at Amazon.com.  (Some people here had pointed out that it was sold
 out for a while, but Amazon's stock is now replenished.)
 
 Hope that helps,
 
 Shawn
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: concatenate strings

2003-08-26 Thread Henri Yandell

Just do:

c:setl var=varSum value=${variable1}${variable2} / ??


Think that would work.

Hen

On 26 Aug 2003, James Norman wrote:

 Hi All,
 I have two variables that I set using the c:set tags.

 c:set var=variable1 value=someValue /
 c:set var=variable2 value=1 /

 And I want to concatenate the two and store the value in another var.
 c:setl var=varSum value=${variable1 + variable2} /

 But this blows up with an error message.  Any ideas?

 Thanks,
 James Norman


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:forEach items=${%=CONSTANT.MY_C%}...

2003-07-26 Thread Henri Yandell


On Sat, 26 Jul 2003, Eric W Hauser wrote:

 If you want to use constant fields, check out the archives for this
 list...There have been some good posts in the last couple of weeks on how
 to accomplish this...JSTL does not provide a mechanism for retrieving
 constant values from classes...Of course, there is a tag for it in the
 unstandard library...But something about an unstandard library as part of
 a standard library just gives me a headache...So, I would stay away from
 that and use solutions based on the J2EE spec...

The reason why I make sure people are aware of the unstandard-library
approach is that they may not have Actions or Servlets. The Java community
has a very bad habit of assuming that every situation requires Java
coding. This is pretty bad for a web-designer who doesn't understand Java
but is quite happy with tags.

Unstandard taglib exists primarily for people who do not have a Servlet or
use one of the Model-2 MVC setups. Something I do plan to add is a more
powerful un:bindAll tag which will bind all constants in a class/interface
into the session.

I seem to recall that Java web containers also have the ability to run a
class on startup (?) so another approach might be to have something nice
tucked in there.

Hen



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need Help Getting Taglibs Working

2003-07-15 Thread Henri Yandell


On Tue, 15 Jul 2003, C F wrote:

 Thanks for your response Henri.  I have or have tried things similar to
 what you are suggesting below and I believe all of my URIs are correct.
 So I have two questions for you

  1)  Are both the jars *and* the tld's required?  I thought I read that
 only the jars are now required.

I've always put both in. I know jars are meant to be able to have tld's
in, but it's not a practice I've used very often.

 2)  Are you telling me that 'logging' and 'string' taglibs are required for the 
 standard taglib or were you just showing me an example of what you had?

Just an example. At work, so wanted to pass the information over speedily.

Do you want to try mailing your web.xml to the list? Just in case
something looks dodge to someone?

Hen

 Henri Yandell [EMAIL PROTECTED] wrote:

 WEB-INF/ should look akin to:
 c.tld fmt.tld log4j.properties sql.tld taglibs-string.tld x.tld
 classes lib taglibs-log.tld web.xml

 WEB-INF/lib should look akin to:

 commons-lang-1.0.jar jdbc2_0-stdext.jar saxpath.jar xalan.jar
 dom.jar jstl.jar standard.jar xercesImpl.jar
 jaxen-full.jar log4j-1.2.7.jar taglibs-log.jar
 jaxp-api.jar sax.jar taglibs-string.jar

 taglibs-string pulls in the commons-lang requirement and taglibs-log pulls
 in the log4j requirement, but I thought I'd include them as good marketing :)

 web.xml should contain bits like:




 javax.servlet.jsp.jstl.sql.dataSource


 jdbc/TimeTrackerDS





 http://jakarta.apache.org/taglibs/string-1.0
 /WEB-INF/taglibs-string.tld




 http://java.sun.com/jstl/core
 /WEB-INF/c.tld


 I think the taglib-uri's change for jstl 1.1.

 Hen

 On Tue, 15 Jul 2003, C F wrote:

  Hello,
  I tried for many hours to get Taglibs working with Tomcat. I'm at my wit's 
  end! Hopefully someone here can help.
 
  I'm using Tomcat tomcat-4.1.24 and jakarta-taglibs-20030713 nightly build. I'm 
  trying to get the standard JSTL 1.0 tags working.
  When I copy the jars from standard-1.0\lib into my WEB-INF\lib. I get a bunch of 
  errors starting up when Tomcat (partial stack trace at the bottom of this message).
  When I don't do the jars and I just copy the tld files from standard-1.0\tld into 
  my WEB-INF directory and put the entries into the web.xml I don't get any 
  errors at Tomcat startup but when I try to use the JSTL tags such as , I get a 
  message saying that it can't find the out class!
  I've seen about 3 or 4 different versions of installations directions floating 
  around for TagLibs and I think I've tried every combination of all of them. I'm 
  out of ideas. Help! Thanks!!!
 
  ===
 
 
 
 
 
  Using CATALINA_BASE: C:\tomcat
  Using CATALINA_HOME: C:\tomcat
  Using CATALINA_TMPDIR: C:\tomcat\temp
  Using JAVA_HOME: C:\j2sdk1.4.1_02
  Jul 14, 2003 11:55:10 PM org.apache.commons.modeler.Registry loadRegistry
  INFO: Loading registry information
  Jul 14, 2003 11:55:11 PM org.apache.commons.modeler.Registry getRegistry
  INFO: Creating new Registry instance
  Jul 14, 2003 11:55:12 PM org.apache.commons.modeler.Registry getServer
  INFO: Creating MBeanServer
  Jul 14, 2003 11:55:15 PM org.apache.coyote.http11.Http11Protocol init
  INFO: Initializing Coyote HTTP/1.1 on port 8080
  Starting service Tomcat-Standalone
  Apache Tomcat/4.1.24
  Jul 14, 2003 11:55:31 PM org.apache.commons.digester.Digester error
  SEVERE: Parse Error at line 6 column 19: Document root element taglib, must 
  match DOCTYPE root null.
  org.xml.sax.SAXParseException: Document root element taglib, must match DOCTYPE 
  root null.
  at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
  Source)
  at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
  at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source)
  at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
  at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown 
  Source)
  at 
  org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown
   Source)
  at 
  org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
   Source)
  at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
  Source)
  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
  at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  at org.apache.commons.digester.Digester.parse(Digester.java:1618)
  at org.apache.catalina.startup.ContextConfig.tldScanStream(ContextConfig.java

Re: Displaying SQL being executed

2003-07-15 Thread Henri Yandell

P6Log at: http://www.p6spy.com/

can do this for you.

Hen

On Tue, 15 Jul 2003, Narayan, Anand wrote:

 Is there any way to tell the SQL tags to show/log all the sql statements
 being executed.

 Thanks
 Anand


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing static variables

2003-07-02 Thread Henri Yandell

The unstandard taglib provides a way to get at these static variables:

http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html

On Wed, 2 Jul 2003, Capr1ce wrote:


 I'd just like to agree that this is quite annoying. If I have any static
 variables that I need to access from JSP pages, I set them as application
 scope variables in a load on startup servlet. Annoying, but it's not a bad
 work around.



 At 10:47 PM 01/07/2003 -0500, you wrote:
 I searched through the archives, and I couldn't find a good answer for
 this question.  Is there a reason why there is not a JSTL tag to expose
 the static final variables for a class? You can obviously do this by
 importing the class and using %= MyClass.STATICVAR %, or by specifying
 it as an attribute in the session or request scope.
 
 I don't believe it would be too difficult to code the necessary tag, but I
 was first curious as to why this was keep out of the specification.  My
 guess would be that someone was trying to say that it is best to keep
 string literals out of source code, and that they could be better defined
 in a properties file.  However, a web application framework I use makes
 use of String literals in the source files, so I was looking for a way to
 access them without scriptlets.
 
   ---
 Eric Hauser
 [EMAIL PROTECTED]
 (317) 679-4766
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [string] Unable to find setter method for attribute 'newlineToken'

2003-04-04 Thread Henri Yandell

My first guess is the rather simple thought that you've not got 1.0.1
installed properly on the Linux machine.

Either you're using a 1.0 tld file, or you've got the jar in the classpath
more than once?


Hen

On Fri, 4 Apr 2003, Matt Raible wrote:

 The following works fine on Windows, but not on Linux - any ideas?  I'm using
 String 1.0.1.

 s:replace replace=NL with=br /NL newlineToken=NLc:out
 value=${changeRequestFormEx.notes}//s:replace

 Thanks,

 Matt

 NOTE: I tried using lt;br /gt; instead of br /, but this did not work - it
 rendered lt;br /gt; instead of br /.



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What is the default datasource?

2003-03-25 Thread Henri Yandell



On Tue, 25 Mar 2003, aps olute wrote:


 Hi,
   What is the default datasource used if one uses sql:query,
 sql:update and sql:transaction without the dataSource attribute? or
 no sql:dataSource ... /

The one set in your web.xml as:

context-param
param-namejavax.servlet.jsp.jstl.sql.dataSource/param-name
param-valuejdbc/NameOfResourceInServeXmlDS/param-value
/context-param


[and have mentioned at the bottom of the web.xml as a resource]

At least that's how I have it working by default.


   How about if one has this on the top of jsp page:
  5 %@ page import=javax.servlet.jsp.jstl.core.Config %
  6  %
 Config.set(session,javax.servlet.jsp.jstl.sql.dataSource,jdbc:mys
 ql://192.168.100.1:3306/menagerie,com.mysql.jdbc.Driver,mysql); %
  7 %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
 I didnt have user and password setup on the above, is the dataSource
 set-up properly? and how does the sql tags refers to this dataSource?
I am using tomcat 4.1.18 + jdk1.4.0_01. Someone has configuration to
 setup the datasource correctly with tomcat? I always had this issue and
 was never ever able to resolve tomcat datasource issue.

There are three steps to setting up JNDI [for JSTL anyway] in Tomcat:

the first is to put:

context-param
param-namejavax.servlet.jsp.jstl.sql.dataSource/param-name
param-valuejdbc/TimeTrackerDS/param-value
/context-param

at the top of your web.xml [under the web-xml tag]

The second is to put:

resource-ref
  description
Our datasource.
  /description
  res-ref-namejdbc/TimeTrackerDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

at the bottom of your web.xml [but put it above a
security-constraint/login-config tag if you have those. I'm assuming not
at the moment. The order of web.xml is very important]

Then in your server's server.xml, you need to add a Resource to your
Context, much like:

Context path=/timetracker docBase=timetracker debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_timetracker_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/TimeTrackerDS auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/TimeTrackerDS
parameternameuser/namevaluetimetk/value/parameter
parameternamepassword/namevaluehuckleberry/value/parameter
parameternamedriverClassName/name
  valueorg.gjt.mm.mysql.Driver/value/parameter
parameternamedriverName/name
  valuejdbc:mysql://machinename.flamefew.net/timetk/value
/parameter
  /ResourceParams
/Context


Lastly, place the Jar for your driver [ie mm.mysql..jar] in your
common/lib directory of the Tomcat server.

I find that given all these [and make sure you didn't install the LE,
light-edition of tomcat] that things work.


Hen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Basic EL Use Help

2003-03-23 Thread Henri Yandell

One thing to check is that you have a Struts version that supports EL [or
you're using JSP 2.0]. Your EL looks good.

Hen

On Sun, 23 Mar 2003, Adam Sherman wrote:

 I think I must have missed something.

 If a servlet, in my case a Struts Action, contains:

 request.setAttribute( ca.tritus.tmailer.CONFIRM_ACTION, confirmBean );

 And the Action forwards to a JSP page that contains:

 html:form action=${ca.tritus.tmailer.CONFIRM_ACTION.action}

 The tag should see the value of confirmBean.getAction(), correct?

 Thanks,

 A.

 --
 Adam Sherman
 Tritus CG Inc.
 http://www.tritus.ca/
 +1 (613) 797-6819

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Java constants as attribute values

2003-03-11 Thread Henri Yandell

Nice trick :)

On Tue, 11 Mar 2003, Serge Knystautas wrote:

 Karr, David wrote:
  The JSTL EL references JavaBeans properties, collections, and maps.  That's it.  
  If you want to reference a constant, you'll have to have your business or setup 
  logic put the constant into a JavaBean property, collection, or map.

 What we did was create a servlet context listener that using reflection
 to inspect a Constants object and store these values as application
 scope attributes.  This allowed...

 session.getAttribute(Constant.BLAH)

 to be equivalent to

 $sessionScope[BLAH]

 The dynamic reflector meant we had no extra work to expose these
 constant values to EL as we added them for our Java code.

 --
 Serge Knystautas
 President
 Lokitech  software . strategy . design  http://www.lokitech.com
 p. 301.656.5501
 e. [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:out

2003-03-02 Thread Henri Yandell

I'm just guessing, based on frequent other answers to the list, but have
you tried:

${sessionScope['com.symbol.mobilecommerce.analysis.SESSION_USER'].firstName}


Hen

On Sun, 2 Mar 2003, Sloan Seaman wrote:

 I have a variable in the session named:
 com.symbol.mobilecommerce.analysis.SESSION_USER

 I want to get the object via c:out and use it in a JSP page.
 When I have the variable just named SESSION_USER it works fine.
 Example (note core:out = c:out)
 Greetings
 core:out value=${sessionScope.SESSION_USER.firstName}/
 core:out value=${sessionScope.SESSION_USER.lastName}/.

 But if I try:
 Greetings
 core:out
 value=${sessionScope.com.symbol.mobilecommerce.analysis.SESSION_USER.firstN
 ame}/
 core:out
 value=${sessionScope.com.symbol.mobilecommerce.analysis.SESSION_USER.lastNa
 me}/.

 It doesn't work.

 I know this is because c:out is trying to call the object com and then the
 getter symbol and so on.

 How do I get around this so that it works?

 Thanks!


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jakarata taglibs and JSTL

2003-03-01 Thread Henri Yandell

I did it a little bit back, but it could have been on Dev list.

I believe that currently my obvious toolset would be:

JSTL, Log, Regexp, String.
[also Iterators in the sandbox by its description]

Each of these are generic enough to be something I'd expect to be
available to me in any JSP page, and I'd expect them to be complimentary.

The nightly String build does allow EL-ization. Doing the same for Log and
Regexp is on my todo list.

The next set are the overlapping [which to all extents and purposes I
believe will be overriding and see no more development on the Jakarta
taglibs]:

Application
DateTime
DBTags
I18N
Page
Request
Response
Session
XTags

While they may have functionalities not in JSTL, it's a typical example of
a weaker standard being better than a stronger proprietary solution.

Next there are the alsoUnique set, which I interpret as being outside the
scope and range of a web designer's normal usage [which is JSTL's scope]:

IO
JMS
Cache
Benchmark
BSF
Mailer
Scrape

Generally I view these as being a way of handling small programming tasks
in the JSP rather than hidden away in Java. I would not expect these to be
in a JSP environment but would expect them to be architectual choices.

Bear in mind that I'm only actively involved in 2 of these tags [I wrote
String and I maintain Log]. There's also some work underway into a JUTL to
complement JSTL [unstandard instead of standard] which may pull the pieces
of functionality that the deprecated [someday] taglibs had that JSTL
doesn't. Tim O'Brien has added an instanceof and ignore-case-equals tag to
it and I'm working on a couple.

Hen

On Sat, 1 Mar 2003, Hanasaki JiJi wrote:

 Anyone care to share thoughts on which taglibs from jakarta are
 overlapping/complimentary/justUnique with respect to JSTL?

 Thanks
 --
 =
 = Management is doing things right; leadership is doing the =
 =   right things.- Peter Drucker=
 =___=
 = http://www.sun.com/service/sunps/jdc/javacenter.pdf   =
 =  www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone  =
 =


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JCE Taglib

2003-03-01 Thread Henri Yandell

This looks like a pretty useful taglib:

http://jcetaglib.sourceforge.net/


Just thought I'd mention it :)

Hen



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to look for substrings

2003-02-20 Thread Henri Yandell

regexp taglib?

On 20 Feb 2003, Felipe Schnack wrote:

   Hey all
   How can I include the body of a tag (much like an if) when a
 substring is found using JSTL? Basically, I would like to do this:

 c:if test=${param.name like '%smith%'}
   it works!
 /c:if

   But I see there isn't a like operator :-)

 --

 Felipe Schnack
 Analista de Sistemas
 [EMAIL PROTECTED]
 Cel.: (51)91287530
 Linux Counter #281893

 Centro Universitário Ritter dos Reis
 http://www.ritterdosreis.br
 [EMAIL PROTECTED]
 Fone/Fax.: (51)32303341


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: EL Functions

2003-02-16 Thread Henri Yandell

From what little I know, JSP 2.0 introduces the concept of functions to
EL. I doubt these equate to ECMAScript, but is rather the ability to
define your own functions. I'v eno clue if there will be standard-ised
functions, though I'd expect JSTL might be the one to determine those.

[Sorry, I'm quite clueless but there might be some nuggets there to help
you move on, like reading the JSP 2.0 spec]

Hen

On Sun, 16 Feb 2003, David Goodenough wrote:

 I notice in the source of Taglibs that there are what appear to be EL
 functions, but these do not appear in the JSTL reference material.

 Is there a definition of these functions?  Or can we assume that all
 the functions in JavaScript (EcmaScript) exist in EL?

 David

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problem with empty key word on a collection.

2003-02-14 Thread Henri Yandell

It's mainly a set of ideas at the moment. People come to this list a lot
asking for features in JSTL. Rather than send them away unsatisified, the
idea is to implement them in the Unstandard taglib and have happy users.

Additionally, it would provide an interesting research ground for the JSTL
people and provide some way in which Users can really force home the fact
that the c:systemExit/ tag is essential.

We set things up for it last week, the developer list has a chunk about it
in the mail archives. Tim's put a bit of code in there and Glenn and I
have setup the infrastructure for it, but I'm focusing on String 1.0.1
first at the moment.

Website to come.

Hen

On Fri, 14 Feb 2003, Jerome Jacobsen wrote:

 I'll bite.  What's the Unstandard Taglib?  Is there a website for this?

  -Original Message-
  From: O'brien, Tim [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 14, 2003 11:45 AM
  To: 'Tag Libraries Users List'
  Subject: RE: Problem with empty key word on a collection.
 
 
   -Original Message-
   From: James Cook [mailto:[EMAIL PROTECTED]]
   Sent: Friday, February 14, 2003 8:17 AM
   To: Tag Libraries Users List
   Subject: Re: Problem with empty key word on a collection.
  
  
  
   On Thursday, February 13, 2003, at 05:04 PM, Pierre Delisle wrote:
  
The change that Jeff is proposing, although of interest, would
unfortunately break compatibility with the spec. (sorry
   guys, but the
Expert Group ain't perfect)
   
  
   Why would extending the empty keyword to support Collections break
   compatibility with the spec?
  
 
  Modifying the empty keyword to support Collections doesn't
  break anything
  per se, but it does exceed the definition of empty in Section
  A.3.8 in the
  JSTL 1.0 specification.  I believe that the JSPA talks about
  adhering to the
  spec in independent implementations of a JSR.
 
  I'm very uninterested in starting a flamewar about JCP, but it is
  important
  to note that adhering to the spec allows for portability over multiple
  implementations of JSTL and EL.
 
  I've already submitted a patch to commons-jexl to make empty work with
  Collection, but it won't be of any help to anyone using the
  current Standard
  Taglib and JSTL 1.0.  I think this is what the nascent Unstandard Taglib
  what meant for, providing functionality for little bits of functionality
  that might have been inadvertently overlooked by the first rev of
  JSTL in a
  way that doesn't conflict with existing JCP specs.
 
  
  Tim O'Brien
 
 
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problem with empty key word on a collection.

2003-02-13 Thread Henri Yandell


On Thu, 13 Feb 2003, Schnitzer, Jeff wrote:

  From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
 
   Why not implement the empty keyword on all collections?  The method
   isEmpty is available in the Collection interface.  Was there some
 sort
   of argument against that when the spec was defined?
 
  I believe so; I don't remember the details of the debate, but I think
 the
  justification is that the EL doesn't deal with Collections in general
 in
  any other situation.

 ??  I'm pretty sure I can do a forEach across a Collection.

 This seems entirely inane.  Would someone patch the Jakarta
 implementation to allow the empty operator on Collection?  We don't use
 specifications, we use software.

For Tomcat, I imagine the answer would be a flat no, but Jeff has a point
here. Standard Taglib isn't the RI anymore is it? Doesn't that come from
Sun?

So can't Standard Taglib add patches like this that are natural and
right?

Hen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: ELSE for JSTL

2003-02-08 Thread Henri Yandell


On Sat, 8 Feb 2003, Mirko Nasato wrote:

 Henri Yandell wrote:

 On Fri, 7 Feb 2003, Ivonne Barrantes wrote:
 
 
 ? When we'll be able to enjoy the beneficts of our beloved  ELSE for JSTL ?
 
 I know we have the c:choose tag, but it takes more code lines then a
 simple c:else
 
 What do you think about it Shawn?
 
 
 
 Shawn mentioned it in a post a week back or so I think. Unsure if it was
 on Dev or Users. Basically the problem with c:else is that there's no
 container tag:
 
 c:if..
 /c:if
 c:else
 /c:else
 
 so it's probably a pain to implement.
 
 
 Why not something like:

 c:if test=...
   foo
   c:else
   bar
   /c:else
 /c:if

Why not:

c:if test=...
  c:do
foo
  /c:do
  c:else
bar
  /c:else
/c:if

?? Just to make it a bit nicer in xml look and feel.

Which of course is synonymous to choose I think :)

Hen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: ELSE for JSTL

2003-02-07 Thread Henri Yandell


On Fri, 7 Feb 2003, Ivonne Barrantes wrote:


 ¿ When we'll be able to enjoy the beneficts of our beloved  ELSE for JSTL ?

 I know we have the c:choose tag, but it takes more code lines then a
 simple c:else

 What do you think about it Shawn?

Shawn mentioned it in a post a week back or so I think. Unsure if it was
on Dev or Users. Basically the problem with c:else is that there's no
container tag:

c:if..
/c:if
c:else
/c:else

so it's probably a pain to implement.

However, it's probably worth trying outside of JSTL to see if it's
possible :) Any interest in working on an else tag? Either one that worked
with c:if or had its own xx:if tag would be a good way to show the
JSTL JSR group that such a thing is possible.

I'll add it to the list I've started compiling of useful tags to code to
compliment the JSTL.

Hen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: accessing static fields/methods from a static class using jstlel

2003-02-05 Thread Henri Yandell


On Wed, 5 Feb 2003, Pierre Delisle wrote:

 Henri,

  Not being able to use static properties is a bit crappy. Who do we go kick
  to get them? JSTL JSR? Shawn? JSP JSR?

 As of JSP 2.0/JSTL 1.1, the Expression Language is owned by the JSP spec.
 The above issue as well as support for method invocation in the EL has been
 the center of hot debates in JSR-152 (JSP 2.0).

 The tradeoff for JSP 2.0 has been to extend the EL to support declared
 functions. See JSP 2.0 Proposed Final Draft
 (http://jcp.org/aboutJava/communityprocess/first/jsr152/index.html)
 for more details, and send your comments
 to [EMAIL PROTECTED] if you'd like to voice your opinion.

Thanks Pierre,

For the JSTL and JSP JSR's [as the chief ones I'm interested in], do you
know of any archive online which lists the comments which have been sent
in? It'd be even better to see the replies, but i understand that these
are probably covered by NDAs.

Being able to see what comments have been submitted would help with a lot
of things:

*) Know what's already been done to death
*) Help create new ideas in my head
*) Help collate a separate taglib with extensions to the spec
*) Have a vague clue as to what the JSRs are deliberating over

Thanks,

Hen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Non Java Developers, programmers using JSTL and taglibs

2003-02-04 Thread Henri Yandell


On Tue, 4 Feb 2003, Jerome Jacobsen wrote:

 What does Javadoc document?  Java.  I think it is too much to ask most page
 designers to understand JavaBeans which means understanding Java types
 (primitive, wrappers, Collections, Maps).  And then they'd need to
 understand this Expression Language and its type conversion/coercion rules.

I like this statement. What it shows is that there is no standard way in
which the Java developers can document the parts of a system that are
availble for the JSP designer.

There ought to be some way in which I can tell the JSP designer that on
these pages, they have this variable, which has these sub-variables. ie)

All pages except for login.jsp have a user variable which has
user.name, user.role [for use with the contains tag] and
user.birthday, which is a Date.

I'd define a sub-type of Java's types:

Text, Number, Date, Variable.

Variable's have Sub-variables. These are of the type of one of the above.
I'd also need to define MultiVariable.

Certain JSTL tags [and custom tags, and Jakarta tags] may be used with
certain JSP-types.

So the problem is not so much JSTL, as that people are teaching JSTL and
JSP as some form of Java and not as a completely new language/concept.
With a standard way in which to Java and JSP people can communicate, and a
new set of concepts with which JSP designers can understand JSP without
being aware of the Java underneath, things would be a lot easier I think.

Hen


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException(Bug#15321)

2003-01-28 Thread Henri Yandell

Nope. I'll get on it now. Sorry about that.

Hen

On Tue, 28 Jan 2003, Robert Taylor wrote:

 Has anyone addressed this bug yet?

 robert

 -Original Message-
 From: Robert Taylor [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 12, 2002 11:58 AM
 To: Tag Libraries Users List
 Subject: RE: String TagLib 1.0 wordWrap
 StringIndexArrayOutOfBoundsException


 Okay. I entered it as a bug. See bug #15321.

 robert

 -Original Message-
 From: Henri Yandell [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 12, 2002 11:24 AM
 To: Tag Libraries Users List
 Subject: Re: String TagLib 1.0 wordWrap
 StringIndexArrayOutOfBoundsException



 Hey Robert,

 This is my fault, I need to somehow document that the wordWrap method is a
 bit suss. Certain combinations of characters in different positions can
 make it blow up, while the rest of the time it sails on through. It's
 definitely nothing you are doing but just dodginess in the underlying
 word-wrapping code.

 If you could push this into bugzill as a bug, hopefully it'll help kick me
 into refactoring and unit-testing that method.

 Most of String-taglib is in Commons Lang now [the underlying code], so
 it's well unit-tested there, but wordWrap and a couple of other methods
 are not.

 [quoteRegularExpression, wordWrap and truncateNicely]
 [metaphone and soundex are in Commons Codec, but not released there yet]
 [xml functions are not in Commons Lang]

 Sorry for the bugs, coder's fault.

 Hen

 On Thu, 12 Dec 2002, Robert Taylor wrote:

  I just downloaded the String Tag Lib 1.0 binaries and started using the
  wordWrap functionality.
 
  It seems to be blowing up if the tag attempts to wrap a string that
  contains a newline character as the 81st character. It will not blow up
  if the 81st character is not a new line character.
 
  This is my usage:
  string:wordWrapbean:write name=form property=body
  ignore=true//string:wordWrap
 
  Partial stack trace:
  2120: java.lang.StringIndexOutOfBoundsException: String index out of
 range:
  80
  2120:   at java.lang.String.charAt(String.java:455)
  2120:   at
 org.apache.taglibs.string.util.StringW.wordWrap(StringW.java:181)
  2120:   at
  org.apache.taglibs.string.WordWrapTag.changeString(WordWrapTag.java:159)
  2120:   at
 
 org.apache.taglibs.string.StringTagSupport.doEndTag(StringTagSupport.java:13
  5)
 
  Has anyone else had this problem. I search bugzilla and didn't find any
 bugs
  mentioned.
 
 
  robert
 
 
  --
  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: FW: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException(Bug#15321)

2003-01-28 Thread Henri Yandell

Okay, was an odd bug :) It occured on the 80th, 155th, 259th, 497th,
591st... element. Which might just be dependent on the random string i was
throwing into it.

Anyways, I've protected against it, and after I commit it'll go into
tonight's nightly build. I've only tested the underlying Java util class,
but it's there where the real bug is. The taglib should reflect the fix
fine.

wordWrap is one of those methods I know I should have done with far more
beauty, but it's managed to evolve to pretty much do what it's meant to. I
overestimated the pain of this bug I think :)

Let me know if this fixes things for you tomorrow,

Hen

On Tue, 28 Jan 2003, Robert Taylor wrote:

 No worries. Thanks for a very useful tag library!

 robert

 -Original Message-
 From: Henri Yandell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 28, 2003 5:41 PM
 To: Tag Libraries Users List
 Subject: Re: FW: String TagLib 1.0 wordWrap
 StringIndexArrayOutOfBoundsException (Bug#15321)



 Nope. I'll get on it now. Sorry about that.

 Hen

 On Tue, 28 Jan 2003, Robert Taylor wrote:

  Has anyone addressed this bug yet?
 
  robert
 
  -Original Message-
  From: Robert Taylor [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, December 12, 2002 11:58 AM
  To: Tag Libraries Users List
  Subject: RE: String TagLib 1.0 wordWrap
  StringIndexArrayOutOfBoundsException
 
 
  Okay. I entered it as a bug. See bug #15321.
 
  robert
 
  -Original Message-
  From: Henri Yandell [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, December 12, 2002 11:24 AM
  To: Tag Libraries Users List
  Subject: Re: String TagLib 1.0 wordWrap
  StringIndexArrayOutOfBoundsException
 
 
 
  Hey Robert,
 
  This is my fault, I need to somehow document that the wordWrap method is a
  bit suss. Certain combinations of characters in different positions can
  make it blow up, while the rest of the time it sails on through. It's
  definitely nothing you are doing but just dodginess in the underlying
  word-wrapping code.
 
  If you could push this into bugzill as a bug, hopefully it'll help kick me
  into refactoring and unit-testing that method.
 
  Most of String-taglib is in Commons Lang now [the underlying code], so
  it's well unit-tested there, but wordWrap and a couple of other methods
  are not.
 
  [quoteRegularExpression, wordWrap and truncateNicely]
  [metaphone and soundex are in Commons Codec, but not released there yet]
  [xml functions are not in Commons Lang]
 
  Sorry for the bugs, coder's fault.
 
  Hen
 
  On Thu, 12 Dec 2002, Robert Taylor wrote:
 
   I just downloaded the String Tag Lib 1.0 binaries and started using the
   wordWrap functionality.
  
   It seems to be blowing up if the tag attempts to wrap a string that
   contains a newline character as the 81st character. It will not blow up
   if the 81st character is not a new line character.
  
   This is my usage:
   string:wordWrapbean:write name=form property=body
   ignore=true//string:wordWrap
  
   Partial stack trace:
   2120: java.lang.StringIndexOutOfBoundsException: String index out of
  range:
   80
   2120:   at java.lang.String.charAt(String.java:455)
   2120:   at
  org.apache.taglibs.string.util.StringW.wordWrap(StringW.java:181)
   2120:   at
   org.apache.taglibs.string.WordWrapTag.changeString(WordWrapTag.java:159)
   2120:   at
  
 
 org.apache.taglibs.string.StringTagSupport.doEndTag(StringTagSupport.java:13
   5)
  
   Has anyone else had this problem. I search bugzilla and didn't find any
  bugs
   mentioned.
  
  
   robert
  
  
   --
   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]




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: about EL-based JSTL

2003-01-19 Thread Henri Yandell


On Sun, 19 Jan 2003, Kishi Mikio wrote:

 But, because expression language is available in only JSTL,
 it is inconvenience. Also, expression language has some problems.

The nightly build of the String taglib ought to work in an EL environment.
I can add the same feature to the Log taglib's nightly build.

Would be interesting to hear which taglibs you'd want EL-ized.

 So, I have considered the use of not EL-based JSTL but RT-based JSTL
 in all JSP parts .
 Has it made a mistake in this strategy ?

[Have?]

I don't think so. You're just using the JSTL in the same style as all
taglibs have been used before. Nothing wrong there.

 Is it better to use EL-based JSTL ?

I think it's an architectual rather than technical decision. JSP 2.0 will
be EL-ised by default [as far as I know] so by using the EL-based JSTL now
you might get better forward compatibility. Then again, turning off the EL
is just a config option in the web.xml so it won't be very hard.

[I'm slowly putting together the JSP 2.0 world in my mind, so I may be way
off]

Hen


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




[ANN] Apache Jakarta Log Taglib release

2003-01-13 Thread Henri Yandell

The Apache Jakarta Taglibs project would like to announce the release of
the Log Taglib. Version 1.0 of the Log Taglib is compiled against the
latest version of Apache's Log4j project [version 1.2.7] and provides
access for JSP developers to write to application logs.

More information may be obtained at the Log Taglib homepage:

http://jakarta.apache.org/taglibs/doc/log-doc/intro.html

More information on Log4j may be obtained at:

http://jakarta.apache.org/log4j/


For users not using Log4j as their logging framework, the CVS HEAD version
of the Log Taglib is being upgraded to support Apache Jakarta Commons
Logging instead of Log4j. More information on this can be obtained on the
Jakarta Taglibs Users mail list [EMAIL PROTECTED].


Henri Yandell


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: String TagLib 1.0 wordWrap StringIndexArrayOutOfBoundsException

2002-12-12 Thread Henri Yandell

Hey Robert,

This is my fault, I need to somehow document that the wordWrap method is a
bit suss. Certain combinations of characters in different positions can
make it blow up, while the rest of the time it sails on through. It's
definitely nothing you are doing but just dodginess in the underlying
word-wrapping code.

If you could push this into bugzill as a bug, hopefully it'll help kick me
into refactoring and unit-testing that method.

Most of String-taglib is in Commons Lang now [the underlying code], so
it's well unit-tested there, but wordWrap and a couple of other methods
are not.

[quoteRegularExpression, wordWrap and truncateNicely]
[metaphone and soundex are in Commons Codec, but not released there yet]
[xml functions are not in Commons Lang]

Sorry for the bugs, coder's fault.

Hen

On Thu, 12 Dec 2002, Robert Taylor wrote:

 I just downloaded the String Tag Lib 1.0 binaries and started using the
 wordWrap functionality.

 It seems to be blowing up if the tag attempts to wrap a string that
 contains a newline character as the 81st character. It will not blow up
 if the 81st character is not a new line character.

 This is my usage:
 string:wordWrapbean:write name=form property=body
 ignore=true//string:wordWrap

 Partial stack trace:
 2120: java.lang.StringIndexOutOfBoundsException: String index out of range:
 80
 2120:   at java.lang.String.charAt(String.java:455)
 2120:   at org.apache.taglibs.string.util.StringW.wordWrap(StringW.java:181)
 2120:   at
 org.apache.taglibs.string.WordWrapTag.changeString(WordWrapTag.java:159)
 2120:   at
 org.apache.taglibs.string.StringTagSupport.doEndTag(StringTagSupport.java:13
 5)

 Has anyone else had this problem. I search bugzilla and didn't find any bugs
 mentioned.


 robert


 --
 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: JSTL

2002-12-11 Thread Henri Yandell

JSTL is a specification.

JSP Standard Tag Library is the meaning of that acronym.

Jakarta Standard Tag Library is the Jakarta implementation of JSTL.

Hen

On Wed, 11 Dec 2002, Timothy Fisher wrote:

 JSTL, stands for JSP Standard Tag Library

 I believe they are one and the same.

 Tim

 -Original Message-
 From: Christian Avril [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 11, 2002 12:22 PM
 To: [EMAIL PROTECTED]
 Subject: JSTL


 Hi ,

 Can You tell me what's the difference between
 JSTL andJSP Standard Tag Library
 I Just use Struts and I use the tag ( html , logic ...bean )

 I see information about JSTL . ( c for core ...etc )
 But , please what's  difference with JSP Tag Library.

 Let's see...
 perhaps JSTL is for Apache jakarta and JSP TL for Sun ?
 or JSP Standard Tag Library  when  JSTL ( core, xml,database )  is not
 enough  ?

 I know, when we don't know , It's confused

 Thank's

 Chris




 --
 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: ?? Using Taglib JARs Across Multiple Contexts ??

2002-12-09 Thread Henri Yandell

I think this came up a while ago. If I recall correctly, the only solution
was to use symbolic links, and there is no solution if you are packaging
your code in WARs.

This obviously only works on platforms that support sym links fully, and I
don't think Windows platforms do.

I believe the thread was on this mail list [rather than Developers] so you
might be able to find something on it by going to an archive and having a
search. I may be misrepresenting the summary from it.

I agree with you, it's a fair bit of a pain. I'd also like to see some way
to have a config file for a WAR which is outside the WAR. Maybe if I put
myProd.war.conf.xml or some such in the webapps or deploy directory, then
it would automatically merge it in with the unpacked WAR file.

Hen


On Mon, 9 Dec 2002, Tony LaPaso wrote:

 Hello all,

 Although I'm using Tomcat v4.1.12 with Apache's JSTL Taglib, this issue
 really applies to *all* taglibs, not just JSTL:

 I'm finding that if I have several webapps (i.e., several Contexts), all
 using JSTL, I need to replicate the taglib JARs (jstl.jar and standard.jar)
 to the WEB-INF/lib directories of *each* webapp using JSTL. Of course,
 this means that each webapp loads its own copy of the classes contained in
 those JARs. That seems a bit wasteful.

 I would much rather put the JARs in a common directory, (e.g., Tomcat's
 common/lib) thereby allowing all webapps to share the same JARs.
 Unfortunately, this technique does not work. When I move the JARs to
 Tomcat's common/lib directory I receive an error when I try to run a JSP
 containing a JSTL tag. The error message indicates the JAR (jstl.jar) cannot
 be found.

 My TLD resides in \WEB-INF. I do *not* have taglib elements in web.xml.
 One suggestions I received was to include taglib elements in web.xml but
 that will not work since the taglib-location element cannot refer to a
 location outside the current context.

 Does anyone have an idea about this -- how to share taglib JARs across
 contexts?



 Thanks...


 --
 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: JSTL Bug - requestScope[var] not working

2002-11-21 Thread Henri Yandell

I get pretty stupid with JSTL sometimes, but aren't you trying to treat
requestScope as a map?

ie) it should be requestScope.var?

Other useful things that took me a while to get:

request.getParameter(Xxx) is available as:

param.Xxx

and the request itself can be got to via:

pageContext.request.remoteUser


[jsut trying to help until one of the real JSTL guys shows up :) ]

Hen

On Thu, 21 Nov 2002, Scott Goldstein wrote:

 I think this may have already been posted, but I don't recall the
 answer.

 Aren't the following two snippets identical?

 %
 String value = foo;
 %

 c:out value=${requestScope[value]}/

 and

 %= request.getAttribute(value) %

 The first is returning null and the second is returning the appropriate
 attribute value.  I looked in the JSTL spec and it looks like the first
 should work.

 Is this a bug?

 Thanks.

 Scott


 --
 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: JSTL Bug - requestScope[var] not working

2002-11-21 Thread Henri Yandell

I seem to have a wonderful ability to not see Shawn's replies. Sorry
Shawn.

On Thu, 21 Nov 2002, Henri Yandell wrote:


 I get pretty stupid with JSTL sometimes, but aren't you trying to treat
 requestScope as a map?

 ie) it should be requestScope.var?

 Other useful things that took me a while to get:

 request.getParameter(Xxx) is available as:

 param.Xxx

 and the request itself can be got to via:

 pageContext.request.remoteUser


 [jsut trying to help until one of the real JSTL guys shows up :) ]

 Hen

 On Thu, 21 Nov 2002, Scott Goldstein wrote:

  I think this may have already been posted, but I don't recall the
  answer.
 
  Aren't the following two snippets identical?
 
  %
  String value = foo;
  %
 
  c:out value=${requestScope[value]}/
 
  and
 
  %= request.getAttribute(value) %
 
  The first is returning null and the second is returning the appropriate
  attribute value.  I looked in the JSTL spec and it looks like the first
  should work.
 
  Is this a bug?
 
  Thanks.
 
  Scott
 
 
  --
  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: Question for Bergsten

2002-11-21 Thread Henri Yandell


On Thu, 21 Nov 2002, Hans Bergsten wrote:

 To answer your question, the deprecated method is encodeRedirectUrl()
 (note the mixed case in Url), replaced with encodeRedirectURL() (note
 URL in all caps). This change was done for consistency with other
 methods that contains URL in their names.

I wonder if Sun will ever get around to dumping the acronym-rule bit from
their coding standard. Or is it already gone?

[as in, URL is wrong by the Java Coding Standard, but Url is right]

Hen


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Jakarta Mailer

2002-11-15 Thread Henri Yandell


On Fri, 15 Nov 2002, Stefan wrote:

 Hi,

 Thans for the info. I will spend a bit more time reading the docs next time!

 BTW: I found that it atleast supports some EL. I was able to use c:out and
 it took.

Yeah, usually no-EL support means that the hack for Jakarta Standard
taglib hasn't been put in so that the attributes in the taglib can use the
${...}.

Apart from this, I think all taglibs should work with JSTL.

Hen


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: Whitespace generated by JSTL tags

2002-11-13 Thread Henri Yandell
really stupid answer

but you could try wrapping it all in a string taglib which search and
replaced for whitespace :)

Hen

On Wed, 13 Nov 2002, Corby Jacobs wrote:

 I am investigating an issue with a JSP page which, under certain circumstances, 
generates a 22.4 MB file to send back to the client.  Turns out, a substantial 
portion of this page is whitespace.  As I see it, the whitespace is coming from two 
places:

 1) whitespace the developer added to make the JSP more readable seems to be repeated 
in the HTML sent to the client (and duplicated if it's inside a c:forEach tag)

 and

 2) the tags themselves are generating extra newline characters

 To address issue 1, I edited the JSP file, changed all tabs to one blank space, and 
removed all empty lines.  This reduced the size of the file from 22.4MB to 4.1MB.  
Then, within the triple-nested c:forEach loops, I made the code all one line -- 
very ugly, but reduced the size of the HTML file to 367kB.

 To confirm my suspicions on issue 2, I re-wrote a small excerpt of the page to use 
scriptlets instead of c:forEach and c:if tags.  The loop is used to generate a 
select with options whose value depend on the iteration through the loop.  As you 
can see in the excerpt from the view page source sent to the client, the version 
generated with the core JSTL tags has extra whitespace between the options.  
Imagine doing this for a menu of 100 options, 3 times, and you can see where all 
the whitespace is coming from.  I tested this with both Tomcat and Weblogic as the 
web server.

 My question is this:  Is there any way to avoid all this whitespace caused by core 
JSTL tags?



 table
 tr
 td align=left bgcolor=#ff
 This selection menu was generated using standard JSTL tags lt;c:ifgt;, 
lt;c:forEachgt;, and lt;c:outgt;.
 /td
 /tr
 tr
 td align=left bgcolor=#ff
 select name=termselector



  option value=wordNode_1 testID=option_wordNode_1 
  HELP
  /option



  option value=wordNode_2 testID=option_wordNode_2 
  USER
  /option



  option value=wordNode_3 testID=option_wordNode_3 
  WRITE
  /option



  option value=wordNode_4 testID=option_wordNode_4 
  QUERY
  /option


 /select
 /td
 /tr
 tr
 td align=left bgcolor=#ff
 This selection menu was generated using scriptlets instead of standard JSTL tags.
 /td
 /tr
 tr
 td align=left bgcolor=#ff
 select name=termselector

  option value=wordNode_1  testID=option_wordNode_1 
  HELP
  /option

  option value=wordNode_2  testID=option_wordNode_2 
  USER
  /option

  option value=wordNode_3  testID=option_wordNode_3 
  WRITE
  /option

  option value=wordNode_4  testID=option_wordNode_4 
  QUERY
  /option

 /select
 /tr
 /td
 /table


 Thanks,

 Corby Jacobs
 [EMAIL PROTECTED]
 Convera Corporation
 11000 Broken Land Pkwy
 Columbia, MD 21044

 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: String Taglib and NewlineToken

2002-11-11 Thread Henri Yandell


On Sun, 10 Nov 2002, Calvin Lau wrote:

 I think I've figured out why I've been having a problem
 replacing newlines using str:replace.  When I use a web
 form's textarea to submit add a chunk of text to my
 database (mysql), it stores the linebreaks as carriage
 returns rather than newlines.  When I use str:replace on
 it, it doesnt detect those carriage returns.  I've tried
 entering text with linebreaks directly in mysql and the
 linebreaks show up fine.  I've tried using wrap=hard and
 wrap=physical for the textarea but the linebreaks are still
 saved in the same format, which is currently not detected
 by str:replace.

 Any ideas?

Mainly just that I think that String Taglib needs to recognise the
carriage returns as newlines. I'll throw in some over-the-top solutions
tonight and see how that goes for you tomorrow [I think if I hurry I can
make the nightly build :) ]

I'll aim to make it consider a newline to be:
\n
\r\n
\r

which is similar to how LineNumberInputStream works.

+

Okay. Change made. It compiles. I'm going to have to leave it for you to
test when the nightly build is done [around 2:10 am Pacific time]. So a
couple of hours away. Let me know how it goes...

Hen



--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: EL in String Taglib 1.0

2002-11-10 Thread Henri Yandell

On Fri, 1 Nov 2002, Travis McCauley wrote:

 Hello,

 I apologize if this has been covered recently. I'm trying to find out
 how to  use EL expressions in the 'with' attribute of a str:replace
 tag. I'm using the 10/8/02 1.0 Release Version.


If you grab the latest nightly build [tonights, which should get created
in about an hour or two], then it should support EL expressions in all
attributes [except the var attribute] of all tags.

I've not tested it heavily, my test page is at the bottom of this email,
and I think it shows that things are generally working.

To use the latest nightly jar you'll need to have the standard.jar and all
its accompanying jars available, which is also available from the Jakarta
Taglibs project as the JSTL Standard implementation. Hopefully you're on
this already.

If you use another JSTL implementation, then with help I should be able to
make the String taglib support that.

Hen

% taglib prefix=c uri=http://java.sun.com/jstl/core; %
% taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str %
% taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; %

c:forTokens var=token items=a,e,i delims=,
  str:replace replace=o with=${token}I am a bong/str:replace
/c:forTokens

c:set var=poo value=pooh/
ul
liI am a str:capitalizec:out value=${poo}//str:capitalize of little 
brains/li
liI am a str:upperCasec:out value=${poo}//str:upperCase of little brains/li
liI am a str:lowerCasec:out value=${poo}//str:lowerCase of little brains/li
/ul

c:set var=cot value=4/
c:set var=cot2 value=2/
pSix tiggers, or four plus two: str:repeat count=${cot+cot2}Tigger 
/str:repeat/p



--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: String Taglib and NewlineToken

2002-11-07 Thread Henri Yandell

Good call on using the same text in an article, was about to transfer
suspicion to the piece of text in the article :)

So.. that suggests something odd in bean:write. As a quick check, because
I've got it setup, the following does work:

%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str %

str:replace replace=NL with=br newlineToken=NLc:out value=this is a t
est of newlines//str:replace

[newline between t and est]

so it's not simply a problem with a tag inside the tag. If you have the
time and JSTL installed, then running the above would be good to rule that
out. I'll aim to get struts setup next and use bean:write instead.

Hen

On Wed, 6 Nov 2002, Calvin Lau wrote:

 Wow, that's strange.  The test works but when the body
 comes from the bean:write, it does not.  See this page:
 http://agentnet.blitzdevelopment.com/public/articleSingle.do?articleID=4

 It comes from the following:
 textarea name=articleBody cols=50 rows=5
 wrap=phsyicalbean:write name=article
 property=articleBody//textarea
 br
 bFrom bean:write/bbr
 str:replace replace=NL with=br newlineToken=NL
  bean:write name=article property=articleBody/
 /str:replace
 brbr
 bFrom string typed out in JSP/bbr
 str:replace replace=NL with=br
 newlineToken=NLthis is a t
 est of newlines/str:replace
 brbr

 I noticed that in the first example it does add one extra
 br at the beginning but stops after that.

 Calvin

 --- Henri Yandell [EMAIL PROTECTED] wrote:
 
  Well, some good news :)
 
  Could you try to run the following as a tiny JSP page:
 
  
  %@ taglib
  uri=http://jakarta.apache.org/taglibs/string-1.0;
  prefix=str
  %
 
  str:replace replace=NL with=br
  newlineToken=NLthis is a t
  est of newlines/str:replace
  
 
  With a newline between the t and the est, and see if a
  br gets put in.
  If you look at:
 
  http://orinoco.flamefew.net:8013/jstltest/testnewline.jsp
 
  You can see it working, but that's on tomcat 4.0.4, so I
  need to upgrade
  or somesuch to check it still works.
 
  What OS platform are you on? And Java version/provider?
 
  Thanks,
 
  Hen
 
 
  On Wed, 6 Nov 2002, Calvin Lau wrote:
 
   The good news is, I got str:replace to work.  It was
  the
   missing commons-lang.jar.  Bad news is, still can't
  detect
   the newlines.  The following didn't work but replacing
   regular characters works fine.
  
   str:replace replace=NL with=br
  newlineToken=NL
 bean:write name=article property=articleBody/
   /str:replace
  
   Calvin
  
   --- Calvin Lau [EMAIL PROTECTED] wrote:
I dont have the commons-lang jar =P
   
I guess this is something new...it was a year and a
  half
ago that I was last working on this.
   
Thanks.
   
--- Henri Yandell [EMAIL PROTECTED] wrote:

 Just to check, the nightly build now should name
  things
 taglib-string and
 not string. So I'm a little unsure of how you
  changed
 things out. When I
 had to do it recently I had to make sure I removed
  the
 string.* stuff [got
 a weird error], put the taglib-string.* stuff in,
  and
 changed the web.xml
 accordginly [got another weird error].

 I may have been building myself and not via the
  nightly
 build, so I'll
 check that tomorrow.

 Just to check, do you have the commons-lang 1.0 jar
  in
 your webapp as
 well? The error is suspicious of something that
  either
 died in there, or
 couldn't find that jar.

 Hen

 On Wed, 6 Nov 2002, Calvin Lau wrote:

  Thanks Henri.  I cant seem to get str:replace to
  work
 at
  all, in the nightly build and the latest release
 version.
 
  I tried using str:encodeURL in these two versions
  and
 that
  worked fine but whenever I try str:replace (even
  a
 simple
  case without newlines) I get the error pasted
  below.
I
  still have the very old versions of string.tld
  and
  string.jar that I had been using, and after
  switching
 back
  to those old files, str:replace worked again
  (just
not
 with
  newlines).
 
  Has anyone been able to use str:replace?  BTW,
  all I
 did
  was replace the old string.jar and string.tld
  with
the
 new,
  and restart tomcat. web.xml didnt need changing
  since
I
 had
  already been using the tag library.
 
  The error I get when using str:replace
  ===
  2002-11-06 23:29:28 ApplicationDispatcher[]
  Servlet.service() for servlet jsp threw exception
  org.apache.jasper.JasperException:
  org/apache/commons/lang/StringUtils
  at
 

   
  
 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
  at
 

   
  
 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289

Re: Tag for uploading

2002-11-07 Thread Henri Yandell


On Thu, 7 Nov 2002, Stefan wrote:

 Well I know one thing for sure, uploading files is standard 'out of the box'
 with ASP.net. That is one thing that makes me scratch my head about the Java
 platform, there are many common things that are used constantly in web
 programming that are not directly addressed in a reasonable manner:

 Uploading files
 Simple implementation of JavaMail (I used Java mail as is but a facade
 should have been put in place on top of it.)
 Paging of collections
 Rich Calendar
 Client and server side validations
 Auto-formatting of collections on the page.
 Keeping state of form widgets

Definitely. Why not make a list of this, call it your '.Net equivalency
demands' or something, stick it up somewhere and we can try to fill in the
gaps.

For example, there are JavaMail facades, just not from Sun. Often I think
open source Java-ites are too close to the trees to see all the trees
they're missing in the other forest. A nice list is the kind of way to
galvanise them.

 I know some if not all are being addressed in various places, I just would
 have thought that SUN and the JCP would have had this stuff out already as
 part of the core features of Java. Now we have to run all over the place to
 put stuff together ...

Yeah. I've been thinking for sometime that there needs to be a site that
handles distributions [like linux distributions]. So you could say 'I'm a
Java web programmer. I want help with presentation details on the server,
like a calendar taglib', and it gives you a nice zip with all the
licences, docs, source and code for a string of libraries.

 This is especially interesting when all this is addressed in the competition
 (.NET) for well over a year (Beta 2 had all this and Beta 2 is pretty
 representative of the final release.)

Legacy. It's one of the reasons C#/.Net have got a lot of things down
better than Java at the moment, because they're not in the middle of a
product cycle but at the start of it.

Equally, there are other things they've failed to pick up on. Like why no
generics in .Net? Java has been trying to ease them in for ages so it
should be pretty obvious to .Net that they should have launched with that.

Hen


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: String Taglib and NewlineToken

2002-11-07 Thread Henri Yandell

Okay, next attempt Calvin :)

%@ taglib prefix=bean uri=/WEB-INF/struts-bean.tld %
%@ taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str %
%
  session.setAttribute(foo, new java.util.EventObject(ga\nar) );
%

str:replace replace=NL with=br newlineToken=NLbean:write name=foo 
property=source//str:replace

This works for me. Does it work for you?

I'm on latest version of Struts, 1.0.2.

Hen

On Thu, 7 Nov 2002, Henri Yandell wrote:


 Good call on using the same text in an article, was about to transfer
 suspicion to the piece of text in the article :)

 So.. that suggests something odd in bean:write. As a quick check, because
 I've got it setup, the following does work:

 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 %@ taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str %

 str:replace replace=NL with=br newlineToken=NLc:out value=this is a t
 est of newlines//str:replace

 [newline between t and est]

 so it's not simply a problem with a tag inside the tag. If you have the
 time and JSTL installed, then running the above would be good to rule that
 out. I'll aim to get struts setup next and use bean:write instead.

 Hen

 On Wed, 6 Nov 2002, Calvin Lau wrote:

  Wow, that's strange.  The test works but when the body
  comes from the bean:write, it does not.  See this page:
  http://agentnet.blitzdevelopment.com/public/articleSingle.do?articleID=4
 
  It comes from the following:
  textarea name=articleBody cols=50 rows=5
  wrap=phsyicalbean:write name=article
  property=articleBody//textarea
  br
  bFrom bean:write/bbr
  str:replace replace=NL with=br newlineToken=NL
   bean:write name=article property=articleBody/
  /str:replace
  brbr
  bFrom string typed out in JSP/bbr
  str:replace replace=NL with=br
  newlineToken=NLthis is a t
  est of newlines/str:replace
  brbr
 
  I noticed that in the first example it does add one extra
  br at the beginning but stops after that.
 
  Calvin
 
  --- Henri Yandell [EMAIL PROTECTED] wrote:
  
   Well, some good news :)
  
   Could you try to run the following as a tiny JSP page:
  
   
   %@ taglib
   uri=http://jakarta.apache.org/taglibs/string-1.0;
   prefix=str
   %
  
   str:replace replace=NL with=br
   newlineToken=NLthis is a t
   est of newlines/str:replace
   
  
   With a newline between the t and the est, and see if a
   br gets put in.
   If you look at:
  
   http://orinoco.flamefew.net:8013/jstltest/testnewline.jsp
  
   You can see it working, but that's on tomcat 4.0.4, so I
   need to upgrade
   or somesuch to check it still works.
  
   What OS platform are you on? And Java version/provider?
  
   Thanks,
  
   Hen
  
  
   On Wed, 6 Nov 2002, Calvin Lau wrote:
  
The good news is, I got str:replace to work.  It was
   the
missing commons-lang.jar.  Bad news is, still can't
   detect
the newlines.  The following didn't work but replacing
regular characters works fine.
   
str:replace replace=NL with=br
   newlineToken=NL
  bean:write name=article property=articleBody/
/str:replace
   
Calvin
   
--- Calvin Lau [EMAIL PROTECTED] wrote:
 I dont have the commons-lang jar =P

 I guess this is something new...it was a year and a
   half
 ago that I was last working on this.

 Thanks.

 --- Henri Yandell [EMAIL PROTECTED] wrote:
 
  Just to check, the nightly build now should name
   things
  taglib-string and
  not string. So I'm a little unsure of how you
   changed
  things out. When I
  had to do it recently I had to make sure I removed
   the
  string.* stuff [got
  a weird error], put the taglib-string.* stuff in,
   and
  changed the web.xml
  accordginly [got another weird error].
 
  I may have been building myself and not via the
   nightly
  build, so I'll
  check that tomorrow.
 
  Just to check, do you have the commons-lang 1.0 jar
   in
  your webapp as
  well? The error is suspicious of something that
   either
  died in there, or
  couldn't find that jar.
 
  Hen
 
  On Wed, 6 Nov 2002, Calvin Lau wrote:
 
   Thanks Henri.  I cant seem to get str:replace to
   work
  at
   all, in the nightly build and the latest release
  version.
  
   I tried using str:encodeURL in these two versions
   and
  that
   worked fine but whenever I try str:replace (even
   a
  simple
   case without newlines) I get the error pasted
   below.
 I
   still have the very old versions of string.tld
   and
   string.jar that I had been using, and after
   switching
  back
   to those old files, str:replace worked again
   (just
 not
  with
   newlines).
  
   Has anyone been able to use str:replace?  BTW,
   all I
  did
   was replace the old string.jar and string.tld
   with
 the
  new,
   and restart tomcat. web.xml didnt need changing

JSTL snippet

2002-11-07 Thread Henri Yandell
Apologies if this is in one of the books on JSTL, I've only got Shawn's
and it's not in there afaik.

It's a little JSTL snippet which dumps a database table to the screen.
Such things in Java are easy enough to write, but I felt that one in JSTL
would be educational [for myself]. Posting here just in case it's of use
to anyone:

[Call as:   http://www.example.com/example/dumpTable.jsp?table=Users
 to dump the table named Users in the default dataSource ]

% taglib prefix=c uri=http://java.sun.com/jstl/core; %
% taglib prefix=sql uri=http://java.sun.com/jstl/sql; %

sql:query var=result
  SELECT * FROM c:out value=${param.table}/
/sql:query
table border=1
 tr
  c:forEach items=${result.columnNames} var=hdr
thc:out value=${hdr}//th
  /c:forEach
 /tr
 c:forEach items=${result.rowsByIndex} var=row
  tr
   c:forEach items=${row} var=field
tdc:out value=${field}//td
   /c:forEach
  /tr
 /c:forEach
/table


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




[jstl] if/when not working with param.xxx

2002-11-07 Thread Henri Yandell

Given the following code:

% taglib prefix=c uri=http://java.sun.com/jstl/core; %

c:if test=${param.one}
FOOO
/c:if

c:choose
 c:when test=${param.two}
   c:out value=BING/
 /c:when
 c:when test=${param.one}
   c:out value=BONG/
 /c:when
 c:otherwise
   c:out value=BANG/
 /c:otherwise
/c:choose

I was kind of hoping that I might be able to test whether a parameter was
passed in. So if I call that code as:

http://orinoco.flamefew.net:8013/timetracker/testIf.jsp?one=one

I get an output of BANG, and not FOOOBONG as I'd expect.
I've just upgraded from standard 1.0 to 1.0.2, and am using tomcat 4.0.4,
so figure it must be something I'm missing about jstl.

[On the offchance, I also tried with just ${one}/${two}.
 I don't quite get why the Request couldn't have been in the lookup-path
 for a normal variable. Well maybe I do, seem to recall parameters aren't
quite as mutable as an attribute is. ]

Hen


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: [jstl] if/when not working with param.xxx

2002-11-07 Thread Henri Yandell


On 7 Nov 2002, David M. Karr wrote:

 Shouldn't it be the following instead?

  c:if test=${!empty param.one}
  FOOO
  /c:if

  c:choose
   c:when test=${!empty param.two}
 c:out value=BING/
   /c:when
   c:when test=${!empty param.one}
 c:out value=BONG/
   /c:when
   c:otherwise
 c:out value=BANG/
   /c:otherwise
  /c:choose

Ah, classic empty-string vs null in request parameter thing. Thanks for
setting me straight David.

Hen


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: [jstl] jsp:forward ideas

2002-11-07 Thread Henri Yandell


On 7 Nov 2002, David M. Karr wrote:

 Just use different quotes at the other level:

  jsp:forward page=somePage.jsp
jsp:param name=id value='c:out value=${param.id}/'/
  /jsp:forward

Nope, not happy. I had:

jsp:forward page='c:out value=${param.goto}/'
  jsp:param name=id value='c:out value=${param.id}/'/
/jsp:forward

[which was working as:
c:redirect url=${param.goto}
  c:param name=id value=${param.id}/
/c:redirect
]

and I get an error of:

message /c:out value=${param.goto}/
description The requested resource (/c:out value=${param.goto}/) is not available.

So it's not parsing the inside of page attribute for jstl I guess. [I
flipped the ' and  just in case. Figured it wouldn't hurt :) ]

Hen


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: String Taglib and NewlineToken

2002-11-06 Thread Henri Yandell

Hi Calvin,

Try doing:

str:replace replace=NL with=br newlineToken=NL
  bean:write name=article property=articleBody/
/str:replace

Let me know if that works, if not then I'll get 4.1 installed and try it
out myself.

Also be suspicious of the br in case it needs to be gt;brlt; in the
new version. [Not that I'm saying it will be, just stating the obvious :)]

Hen

On Wed, 6 Nov 2002, Calvin Lau wrote:

 Can someone give me an example of how I would use
 string:replace to change all the newlines in a chunk of
 text to br tags?  I had been using the following:

 str:replace replace=
  with=br
 bean:write name=article property=articleBody/
 /str:replace

 However, after moving to a new server and upgrading to
 Tomcat4.1, and this is no longer working.  I wanted to give
 the newlineToken nightly build a try.

 Thanks,

 Calvin


 On Fri, 25 Oct 2002, Henri Yandell wrote:
 ===
 So I've now implemented a new attribute named newlineToken
 which is a special token to replace the forced newline. So
 you can do:

 str:replace replace=hNL with=j:NL:y
 newlineToken=NLih
 huw/str:replace

 and will match the newline. Also note that the same
 newlineToken may be used in the with attribute.


 __
 Do you Yahoo!?
 U2 on LAUNCH - Exclusive greatest hits videos
 http://launch.yahoo.com/u2

 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: String Taglib and NewlineToken

2002-11-06 Thread Henri Yandell

Just to check, the nightly build now should name things taglib-string and
not string. So I'm a little unsure of how you changed things out. When I
had to do it recently I had to make sure I removed the string.* stuff [got
a weird error], put the taglib-string.* stuff in, and changed the web.xml
accordginly [got another weird error].

I may have been building myself and not via the nightly build, so I'll
check that tomorrow.

Just to check, do you have the commons-lang 1.0 jar in your webapp as
well? The error is suspicious of something that either died in there, or
couldn't find that jar.

Hen

On Wed, 6 Nov 2002, Calvin Lau wrote:

 Thanks Henri.  I cant seem to get str:replace to work at
 all, in the nightly build and the latest release version.

 I tried using str:encodeURL in these two versions and that
 worked fine but whenever I try str:replace (even a simple
 case without newlines) I get the error pasted below.  I
 still have the very old versions of string.tld and
 string.jar that I had been using, and after switching back
 to those old files, str:replace worked again (just not with
 newlines).

 Has anyone been able to use str:replace?  BTW, all I did
 was replace the old string.jar and string.tld with the new,
 and restart tomcat. web.xml didnt need changing since I had
 already been using the tag library.

 The error I get when using str:replace
 ===
 2002-11-06 23:29:28 ApplicationDispatcher[]
 Servlet.service() for servlet jsp threw exception
 org.apache.jasper.JasperException:
 org/apache/commons/lang/StringUtils
   at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
   at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
   at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
   at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)



 --- Henri Yandell [EMAIL PROTECTED] wrote:
 
  Hi Calvin,
 
  Try doing:
 
  str:replace replace=NL with=br newlineToken=NL
bean:write name=article property=articleBody/
  /str:replace
 
  Let me know if that works, if not then I'll get 4.1
  installed and try it
  out myself.
 
  Also be suspicious of the br in case it needs to be
  gt;brlt; in the
  new version. [Not that I'm saying it will be, just
  stating the obvious :)]
 
  Hen
 
  On Wed, 6 Nov 2002, Calvin Lau wrote:
 
   Can someone give me an example of how I would use
   string:replace to change all the newlines in a chunk of
   text to br tags?  I had been using the following:
  
   str:replace replace=
with=br
   bean:write name=article property=articleBody/
   /str:replace
  
   However, after moving to a new server and upgrading to
   Tomcat4.1, and this is no longer working.  I wanted to
  give
   the newlineToken nightly build a try.
  
   Thanks,
  
   Calvin
  
  
   On Fri, 25 Oct 2002, Henri Yandell wrote:
   ===
   So I've now implemented a new attribute named
  newlineToken
   which is a special token to replace the forced newline.
  So
   you can do:
  
   str:replace replace=hNL with=j:NL:y
   newlineToken=NLih
   huw/str:replace
  
   and will match the newline. Also note that the same
   newlineToken may be used in the with attribute.
  
  
   __
   Do you Yahoo!?
   U2 on LAUNCH - Exclusive greatest hits videos
   http://launch.yahoo.com/u2
  
   --
   To unsubscribe, e-mail:
  mailto:taglibs-user-unsubscribe;jakarta.apache.org
   For additional commands, e-mail:
  mailto:taglibs-user-help;jakarta.apache.org
  
  
 
 
  --
  To unsubscribe, e-mail:
  mailto:taglibs-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail:
  mailto:taglibs-user-help;jakarta.apache.org
 


 __
 Do you Yahoo!?
 U2 on LAUNCH - Exclusive greatest hits videos
 http://launch.yahoo.com/u2

 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: String Taglib and NewlineToken

2002-11-06 Thread Henri Yandell

Well, some good news :)

Could you try to run the following as a tiny JSP page:


%@ taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str
%

str:replace replace=NL with=br newlineToken=NLthis is a t
est of newlines/str:replace


With a newline between the t and the est, and see if a br gets put in.
If you look at:

http://orinoco.flamefew.net:8013/jstltest/testnewline.jsp

You can see it working, but that's on tomcat 4.0.4, so I need to upgrade
or somesuch to check it still works.

What OS platform are you on? And Java version/provider?

Thanks,

Hen


On Wed, 6 Nov 2002, Calvin Lau wrote:

 The good news is, I got str:replace to work.  It was the
 missing commons-lang.jar.  Bad news is, still can't detect
 the newlines.  The following didn't work but replacing
 regular characters works fine.

 str:replace replace=NL with=br newlineToken=NL
   bean:write name=article property=articleBody/
 /str:replace

 Calvin

 --- Calvin Lau [EMAIL PROTECTED] wrote:
  I dont have the commons-lang jar =P
 
  I guess this is something new...it was a year and a half
  ago that I was last working on this.
 
  Thanks.
 
  --- Henri Yandell [EMAIL PROTECTED] wrote:
  
   Just to check, the nightly build now should name things
   taglib-string and
   not string. So I'm a little unsure of how you changed
   things out. When I
   had to do it recently I had to make sure I removed the
   string.* stuff [got
   a weird error], put the taglib-string.* stuff in, and
   changed the web.xml
   accordginly [got another weird error].
  
   I may have been building myself and not via the nightly
   build, so I'll
   check that tomorrow.
  
   Just to check, do you have the commons-lang 1.0 jar in
   your webapp as
   well? The error is suspicious of something that either
   died in there, or
   couldn't find that jar.
  
   Hen
  
   On Wed, 6 Nov 2002, Calvin Lau wrote:
  
Thanks Henri.  I cant seem to get str:replace to work
   at
all, in the nightly build and the latest release
   version.
   
I tried using str:encodeURL in these two versions and
   that
worked fine but whenever I try str:replace (even a
   simple
case without newlines) I get the error pasted below.
  I
still have the very old versions of string.tld and
string.jar that I had been using, and after switching
   back
to those old files, str:replace worked again (just
  not
   with
newlines).
   
Has anyone been able to use str:replace?  BTW, all I
   did
was replace the old string.jar and string.tld with
  the
   new,
and restart tomcat. web.xml didnt need changing since
  I
   had
already been using the tag library.
   
The error I get when using str:replace
===
2002-11-06 23:29:28 ApplicationDispatcher[]
Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException:
org/apache/commons/lang/StringUtils
at
   
  
 
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at
   
  
 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at
   
  
 
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at
   
  
 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   
   
   
--- Henri Yandell [EMAIL PROTECTED] wrote:

 Hi Calvin,

 Try doing:

 str:replace replace=NL with=br
   newlineToken=NL
   bean:write name=article
  property=articleBody/
 /str:replace

 Let me know if that works, if not then I'll get 4.1
 installed and try it
 out myself.

 Also be suspicious of the br in case it needs to
  be
 gt;brlt; in the
 new version. [Not that I'm saying it will be, just
 stating the obvious :)]

 Hen

 On Wed, 6 Nov 2002, Calvin Lau wrote:

  Can someone give me an example of how I would use
  string:replace to change all the newlines in a
   chunk of
  text to br tags?  I had been using the
  following:
 
  str:replace replace=
   with=br
  bean:write name=article
  property=articleBody/
  /str:replace
 
  However, after moving to a new server and
  upgrading
   to
  Tomcat4.1, and this is no longer working.  I
  wanted
   to
 give
  the newlineToken nightly build a try.
 
  Thanks,
 
  Calvin
 
 
  On Fri, 25 Oct 2002, Henri Yandell wrote:
  ===
  So I've now implemented a new attribute named
 newlineToken
  which is a special token to replace the forced
   newline.
 So
  you can do:
 
  str:replace replace=hNL with=j:NL:y
  newlineToken=NLih
  huw/str:replace
 
  and will match the newline. Also note that the
  same
  newlineToken may be used in the with attribute.
 
 
 
  __
  Do

Re: EL in String Taglib 1.0

2002-11-01 Thread Henri Yandell

Hi Travis,

String Taglib [and all the Jakarta taglibs to my knowledge] are not ELized
yet.

JSP 2.0 will make all taglibs ELized, so the question on whether to add
hacked in support for ELs to the taglibs is a bit up in the air depending
on when JSP 2.0 is released, and how long this is going to be before it's
released [I thought it would be soon, but hard to tell sometimes].

The current nightly builds are pretty similar to your version, the only
difference being a big bug-fix for using the taglib inside a loop
[probably only occurs in certain servers] and the addition of a new
attribute to the Replace tag [for handling newlines].

Sorry for the negative reply,

Hen

On Fri, 1 Nov 2002, Travis McCauley wrote:

 Hello,

 I apologize if this has been covered recently. I'm trying to find out
 how to  use EL expressions in the 'with' attribute of a str:replace
 tag. I'm using the 10/8/02 1.0 Release Version.

 Thanks,
 Travis



 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: EL in String Taglib 1.0

2002-11-01 Thread Henri Yandell


On Fri, 1 Nov 2002, Karr, David wrote:

  -Original Message-
  From: Henri Yandell [mailto:bayard;generationjava.com]
  Sent: Friday, November 01, 2002 11:21 AM
 
  On Fri, 1 Nov 2002, Karr, David wrote:
 
   If there's interest in EL-izing certain non-ELed tag libraries,
   without changing the library (so the original library can
  still work in
   Servlet 2.2 environments), and you don't want to wait for
  JSP 2.0, you
   might consider using the strategy I used in building the
  Struts-EL tag
   library.
 
  I was thinking of a strategy that basically did a:  Is this class
  [ExpressionEvaluator or whatever it is] in the classpath. If so, then
  cache this result statically [in my StringTagSupport] and
  make sure that
  ELizing happens.
 
  Any reason this would fail?
 
  String taglib has a pretty simple design, there's only one
  actual taglib
  class, all the rest just do String transformations and not
  tag stuff, so
  it can be nice and easy to upgrade :)

 You're intending to store the class name as a string somewhere,
 determine whether you can load it, and then call the methods of the
 class through Reflection?  I suppose that would work.  You'll have to
 rip out that code when you move to JSP 2.0.  If you used a subclass, you
 would just remove the subclass.

Kinda. Will play with it a while, see if it'll work.

Hen


--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: EL in String Taglib 1.0

2002-11-01 Thread Henri Yandell

There is that, but in terms of project management for the Jakarta Taglibs,
it'll turn each ELized version into a new project, or a branch or
somewhat. Unless we declare org.apache.taglibs.name.el to be special
perhaps, and output two jars, one with and one without the el sub-package.

Will ask Glenn.

Hen

On Fri, 1 Nov 2002, Karr, David wrote:

 My goal is to not change the existing library at all, either at the
 source level or the deployment level.  If you put the new classes in the
 old jar, then people deploying the old taglib will get those extra
 classes.  Those shouldn't cause any conflicts, but I don't like to
 introduce changes that very likely won't have any effect.

  -Original Message-
  From: Henri Yandell [mailto:bayard;generationjava.com]
  Sent: Friday, November 01, 2002 12:31 PM
 
  On Fri, 1 Nov 2002, Karr, David wrote:
 
   All the tag classes in the Struts-EL tag library are
  subclasses of the
   corresponding class in the Struts tag library, and all of them look
   almost identical.  In each one, the doStartTag() method
  calls a method
   called evaluateExpressions(), which just has one block of almost
   identical code for each property of the tag, which just passes the
   current value of the property through the EL parser and into the
   setter method for the property.  The only exception to
  this relatively
 
  Okay. I'm convinced :) Will work on getting a 1.1 release out
  which has an
  EL'd component. Any reason it has to be a different jar? Or
  just one jar
  with them all and a different tld?

 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




Re: c:out and \n

2002-10-22 Thread Henri Yandell

So I've been thinking on this.

My favourite idea atm:

str:replace replace=hellNEWLINo jim with=hi bob
newlineToken=NEWLIN.../str:replace

Any thoughts on that?

Such as would I need a separate token for replace and with?

Hen
On Tue, 17 Sep 2002, Henri Yandell wrote:


 I'm not sure. There's nothing really 'html'y about the problem of 'we want
 to replace \n'. It's only the with bit that gets htmly. So I'm just
 grumbling about the name :)

 I was aiming to have a future:

 escape type=html tag, so your extra options will need to fit in there
 maybe.

 How about just overriding the replace attribute of the replace tag with:

 replaceNewline
 replaceTab
 replaceHardspace

 etc??

 On Tue, 17 Sep 2002, Hans Bergsten wrote:

  Because of all the escaping problems, I think a separate action is the
  best solution for this instead of trying to do some tricks with the
  replace action. How about something like this:
 
 str:htmlEscape
   [nls=true|false]
   [blanks=true|false]
   [tabs=true|false [tabLength=noOfChars]]
   text to be converted
 /str:htmlEscape
 
 nls:   replace all \n with br
 blanks:replace multiple blanks with nbsp;, but leave single
blanks alone
 tabs:  replace tabs with a number of nbsp;
 tabLength: how many characters a tab represents (default is 8)
 
  The blanks and tabs replacements make it possible to handle simple
  formatted (indented) text. Other replacements are possible, of course,
  such as * to li, but this is a start.
 
  Hans
 
  Henri Yandell wrote:
  
   On Tue, 17 Sep 2002, zze-JEANJEAN S ext FTRD/DMI/SOP wrote:
  
  
  Is there a tag to convert \n to br/ ??
  
  You should be able to use the String Taglib or the Regexp Taglib.
  
  
  The str:replace tag is not easy to use : in the replace propertie the \n
  is not understood :(( You have to put in this propetie a real new line,
  so the code is not really readable :(
  For instance :
  ...
  str:replace replace=
   with=BR/c:out
  value=${requestScope[theKey].address1}//str:replace
  ...
  
  
   Yeah. This needs to be solved doesn't it.
  
   Solutions:
  
   Make replace accept \n as being a newline. This would be doable, but what
   if someone wanted to replace a \n sequence? Is it acceptable to make
   'tabs' illegal in the replace etc. Probably not.
  
   Add a replaceJava attribute, for specifying the replace tag as a Java
   attribute. Would want a withJava attribute too.
   Or maybe this is an encoding=java attribute.
  
   Have a replaceNewline tag. A bit weak as you won't be able to replace
   something with a newline in. Also has weaknesses as I'm trying to collate
   similar functionality and not create more tags.
  
   
   I seem to recall that there are no XML character entities that work
   there, but possible I could make one work. Whether this would be
   cross-server though, I don't know.
  
   Most people will want \n to work I imagine, and won't care that they have
   to do \\n to replace a \ and a n. If I change it so that all
   String attributes get unescaped for Java entities, and maybe even all
   content as well. I wonder if this will hurt anything...
  
   If not, I'll aim for this feature to be in a 2.0 release. My apologies for
   not being able to get it in sooner.
  
   Hen
  
  
   --
   To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
   For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
  
 
  --
  Hans Bergsten   [EMAIL PROTECTED]
  Gefion Software http://www.gefionsoftware.com
  JavaServer Pageshttp://TheJSPBook.com
 
 
  --
  To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
  For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org
 
 


 --
 To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:taglibs-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:taglibs-user-help;jakarta.apache.org




RE: utility taglib, basic looping

2002-10-16 Thread Henri Yandell


Hey Thomas,

JSTL is a new Java standard. JSR, JCP all that official jazz. The
reference implementation [or one of two] is hosted at Jakarta Taglibs and
called 'standard'. [Shawn was the implementation lead]

It's JSP 1.2 however. It does deprecate many of the Jakarta Taglibs
somewhat in functionality [though isn't always a complete replacement],
however those taglibs are kept around for their JSP 1.1 support.

Improving the documentation on each 'deprecated' 1.1 taglib to mention the
JSTL is probably a good idea. Will see if I can push such a thing along.

Hen

On Wed, 16 Oct 2002, Thomas Delnoij wrote:

 Hi Shawn.

 I am using the utility taglib of the jakarta project. Isn't it part of JSTL?

 If I understand you right, JSTL is your project? Where can I find the
 online documentation?

 Bye

 Thomas Delnoij
 Internet Engineer
 IMN - SSE Baarn

 Mobile: +31 6 144 300 14
 EMail: [EMAIL PROTECTED]

 -Original Message-
 From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
 Sent: woensdag 16 oktober 2002 15:06
 To: Tag Libraries Users List
 Subject: Re: utility taglib, basic looping
 
 
 The Utility Taglib is old and out of date; it may contain bugs, and it
 isn't maintained any longer.  I strongly recommend looking at a more
 modern offering like JSTL; our project's Standard Taglib provides a
 compliant JSTL implementation.
 
 --
 Shawn Bayern
 JSTL in Action   http://www.jstlbook.com
 
 On Wed, 16 Oct 2002, Thomas Delnoij wrote:
 
  Good morning.
 
  I am using OC4J on Windows 2000.
 
  This jsp:
 
  ?xml version = '1.0' encoding = 'windows-1252'?
  jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2
xmlns:ut=http://jakarta.apache.org/taglibs/utility;

   jsp:directive.page contentType=text/html;charset=windows-1252/
   html
  head
 meta HTTP-EQUIV=Content-Type CONTENT=text/html;
  charset=windows-1252/
 titletest/title
  /head
  body
ut:for iterations=13 begin=3 varName=counter 
  jsp:expression counter /jsp:expressionbr /
/ut:for
/body
/html
  /jsp:root
 
  ...generates this output:
 
  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  11
  12
 
  I would have expected:
 
  3
  4
  5
  6
  7
  8
  9
  10
  11
  12
  13
  14
  15
 
  I am puzzled. Any suggestions?
 
  Kind regards.
 
  Thomas Delnoij
  Internet Engineer
  IMN - SSE Baarn
 
  Mobile: +31 6 144 300 14
  EMail: [EMAIL PROTECTED]
 
 
  --
  To unsubscribe, e-mail:
 mailto:taglibs-user-[EMAIL PROTECTED]
  For
 additional commands,
 e-mail: mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:taglibs-user-[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: utility taglib, basic looping

2002-10-16 Thread Henri Yandell

Sorry for repeating a lot of what Shawn said. Usual early morning failure
to focus properly.

On Wed, 16 Oct 2002, Henri Yandell wrote:


 Hey Thomas,

 JSTL is a new Java standard. JSR, JCP all that official jazz. The
 reference implementation [or one of two] is hosted at Jakarta Taglibs and
 called 'standard'. [Shawn was the implementation lead]

 It's JSP 1.2 however. It does deprecate many of the Jakarta Taglibs
 somewhat in functionality [though isn't always a complete replacement],
 however those taglibs are kept around for their JSP 1.1 support.

 Improving the documentation on each 'deprecated' 1.1 taglib to mention the
 JSTL is probably a good idea. Will see if I can push such a thing along.

 Hen

 On Wed, 16 Oct 2002, Thomas Delnoij wrote:

  Hi Shawn.
 
  I am using the utility taglib of the jakarta project. Isn't it part of JSTL?
 
  If I understand you right, JSTL is your project? Where can I find the
  online documentation?
 
  Bye
 
  Thomas Delnoij
  Internet Engineer
  IMN - SSE Baarn
 
  Mobile: +31 6 144 300 14
  EMail: [EMAIL PROTECTED]
 
  -Original Message-
  From: Shawn Bayern [mailto:[EMAIL PROTECTED]]
  Sent: woensdag 16 oktober 2002 15:06
  To: Tag Libraries Users List
  Subject: Re: utility taglib, basic looping
  
  
  The Utility Taglib is old and out of date; it may contain bugs, and it
  isn't maintained any longer.  I strongly recommend looking at a more
  modern offering like JSTL; our project's Standard Taglib provides a
  compliant JSTL implementation.
  
  --
  Shawn Bayern
  JSTL in Action   http://www.jstlbook.com
  
  On Wed, 16 Oct 2002, Thomas Delnoij wrote:
  
   Good morning.
  
   I am using OC4J on Windows 2000.
  
   This jsp:
  
   ?xml version = '1.0' encoding = 'windows-1252'?
   jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2
 xmlns:ut=http://jakarta.apache.org/taglibs/utility;
 
jsp:directive.page contentType=text/html;charset=windows-1252/
html
   head
  meta HTTP-EQUIV=Content-Type CONTENT=text/html;
   charset=windows-1252/
  titletest/title
   /head
   body
 ut:for iterations=13 begin=3 varName=counter 
   jsp:expression counter /jsp:expressionbr /
 /ut:for
 /body
 /html
   /jsp:root
  
   ...generates this output:
  
   0
   1
   2
   3
   4
   5
   6
   7
   8
   9
   10
   11
   12
  
   I would have expected:
  
   3
   4
   5
   6
   7
   8
   9
   10
   11
   12
   13
   14
   15
  
   I am puzzled. Any suggestions?
  
   Kind regards.
  
   Thomas Delnoij
   Internet Engineer
   IMN - SSE Baarn
  
   Mobile: +31 6 144 300 14
   EMail: [EMAIL PROTECTED]
  
  
   --
   To unsubscribe, e-mail:
  mailto:taglibs-user-[EMAIL PROTECTED]
   For
  additional commands,
  e-mail: mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:taglibs-user-[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]




[JSTL] fmt tag

2002-10-14 Thread Henri Yandell

As this is a suggestion from my using JSTL I thought it'd be better here.

Has the following been considered:

fmt:formatNumber value=424.233 maxFractionDigits=-1/

which outputs 420

Doesn't seem to work for me [I had wild hopes] and it seems surprisingly
hard to find a standard way to do this. I can't fathom a way to do it
using NumberFormat, and there's nothing leaping out in java.lang.Math.
Both would be a pain anyway as I want it as a formatting attribute in JSP.

Am I missing something obvious?

Hen


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Is there a way to call java.lang.String.substring on a c: out ?

2002-10-13 Thread Henri Yandell

Ack. Sorry Stefan. Hadn't noticd this thread becoming a String taglib one.

The only problem you should get when commenting out initAttributes should
be that the following will happen:

[test is an optional attribute]

str:foo/   test is default
str:foo test=blah/   test is blah
str:foo/   test is blah [assuming container chooses to reuse same Tag]

I'll look into the bug tonight and try and get a fix in the nightly build
by end of the weekend.

Thanks,

Hen

On Sat, 12 Oct 2002, Stefan wrote:

 Hi,

 I downloaded the source and I made the changes to the StringTagSupport.java
 as you speficified. Now when I try to use the taglib my Resin gives me this
 error:

 java.lang.NoSuchMethodException:
 org.apache.taglibs.string.SubstringTag.doStartTag()

 So I looked at the StringTagSupport.java again and noticed there is no
 doStartTag() method ... seems strange. I don't know much about coding
 taglibs so I am lost as to why this error is showing up when all I did was
 comment out the line initAttributes() from doEndTag().

 Any ideas?

 Stef




 - Original Message -
 From: Martin Cooper [EMAIL PROTECTED]
 To: 'Tag Libraries Users List' [EMAIL PROTECTED]
 Sent: Friday, October 11, 2002 8:43 PM
 Subject: RE: Is there a way to call java.lang.String.substring on a c: ou t
 ?


  FYI, I've submitted a bug report (Bugzilla #13563) for this.
 
  --
  Martin Cooper
 
 
   -Original Message-
   From: Martin Cooper [mailto:[EMAIL PROTECTED]]
   Sent: Friday, October 11, 2002 2:52 PM
   To: 'Tag Libraries Users List'
   Subject: RE: Is there a way to call
   java.lang.String.substring on a c:
   ou t ?
  
  
  
  
-Original Message-
From: Stefan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 10:52 PM
To: Tag Libraries Users List
Subject: Re: Is there a way to call
java.lang.String.substring on a c:
ou t ?
   
   
Hi,
   
I have a weird behavior using the jakarta tag-lib with the
JSTL forEach tag
where when I apply the substring tag to a c:out  tag the
substring tag only
works on the first iteration?
   
   
c:forEach items=${r.rows} var=value varStatus=status 
   
 tr align='center' 
  tdc:out value=${value.sex}/nbsp;/td
   tdc:out value=${value.name}/nbsp;/td
  tdstr:substring start=0 end=4c:out
value='${value.lastName}'//str:substring/td
   /tr
 /c:forEach
/table
   
Any ideas?
  
   There's a bug in the String taglib which will cause this to
   happen whenever
   you're running in a container which reuses tag handler instances. The
   problem will show up with other tags in this taglib as well.
  
   The bug is actually in StringTagSupport.java, where
   initAttributes() is
   being called from within doEndTag(). Since the container is
   not required to
   reinitialise the attributes if they have the same values -
   which they do in
   your loop - you'll get incorrect results after the first
   call. (In your
   case, I think what you'll see is the entire string, instead
   of the substring
   you expected.)
  
   The fix is simply to remove the call to initAttributes() from
   doEndTag().
  
   --
   Martin Cooper
  
  
   
   
- Original Message -
From: Martin Cooper [EMAIL PROTECTED]
To: 'Tag Libraries Users List' [EMAIL PROTECTED]
Sent: Friday, October 11, 2002 1:31 AM
Subject: RE: Is there a way to call
java.lang.String.substring on a c: ou t
?
   
   
 As the documentation for the String taglib states, it is
built on the
 Commons Lang component. The error you are seeing suggests
that you have
not
 included Commons Lang in your web app.

 --
 Martin Cooper


  -Original Message-
  From: Stefan [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, October 10, 2002 9:46 PM
  To: Tag Libraries Users List
  Subject: Re: Is there a way to call
  java.lang.String.substring on a c:
  out ?
 
 
  Hi,
 
  I just installed the string  taglib and tried the simple
  example as found in
  the docs:
 
  str:substring start=4 end=8The tree is
green./str:substring
 
  And I get this error:
 
  org/apache/commons/lang/NumberUtils
 
  I am using Resin 2.1.4 and placed the string.jar file
   into the web
  applications WEB-INF\lib folder and added the
   discriptor file to:
 
  WEB-INF\classes\tlds
 
  And finally I added this to the web.xml file:
 
  taglib
 
 
   
   taglib-urihttp://jakarta.apache.org/taglibs/string-1.0/taglib-uri
taglib-location/WEB-INF/string.tld/taglib-location
  /taglib
 
 
  Any ideas what I am doing wrong?
 
  Thanks
 
  - Original Message -
  From: Tim Kettering [EMAIL PROTECTED]
  To: Tag Libraries Users List [EMAIL PROTECTED]
  Sent: Friday, October 11, 2002 12:17 AM
  Subject: Re: Is there a way to call

JSTL in Java Was: Is there a way to call java.lang.String.substringon a c: ou t ?

2002-10-13 Thread Henri Yandell



On Sat, 12 Oct 2002, Stefan wrote:

 I just decided recently to finally look at using taglibs. For the last
 couple of years I have been fine with using %= % that processed bean
 methods that return strings. But now seeing how many taglibs there are out
 there, I decided it was time to jump in. Now if I can figure out why I can't
 use the results of a taglib as an arguement for a method in a Java bean?

 Example:

 %= my.myMehtod(c:out value='${value.location}'/);%

Effectively what you have here is a piece of the JSTL inside Java scope.
%= ... % has the ... being Java code, not JSP. At least that's how I
look at it, the bug in String taglib shows that I've still got some
understanding to do on the Taglib lifecycle.

I'd not thought of the order in which scriptlets/taglibs are executed, I
think because I tennd to use them by instinct/experience and don't think
of the why's etc. Hopefully someone else knows the spec and
realities better.

 What I have noticed is that scriptlets seem to get ouputted before taglibs
 ... or the reverse, I forget which way. What ever it may be, the above
 sample code would have the tag been passed as a string; that is c:out
 value='${value.location}'/ instead of the output of the tag. So I guess
 scriptlets gets process before, right?

 Thanks again,

 Stef



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Is there a way to call java.lang.String.substring on a c: out ?

2002-10-13 Thread Henri Yandell

Looking back I see that I can't easily replicate your code.

If that has a problem, try using the code snippet I sent to see if that
works/doesn't work. Might help to separate the issue from the surrounding
code etc.

Hen

On Sun, 13 Oct 2002, Henri Yandell wrote:




 On Sat, 12 Oct 2002, Stefan wrote:

  Henri,
 
  Thanks for looking into it,  I would like to use the string taglib in loops.
 

 I've commited the commented out line to StirngTagSupport. Running the
 following code snippet:

 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 %@ taglib uri=http://jakarta.apache.org/taglibs/string-1.0; prefix=str
 %

 c:forTokens var=token items=oneoneone,twotwotwo,three delims=,
   str:substring start=2 end=5c:out value=${token}//str:substring
 /c:forTokens

 works in both versions, so I'll hunt back and find your actual code to see
 if I can get that to break in Tomcat [all I have to hand at the moment].

 Sorry for taking a few days to do what Martin suggested :) I had a
 misunderstanding to get right in my head [Thanks Shawn/Hal].

 Let me know how that goes. It _should_ go in the nightly build, but if it
 doesn't, grab a jar from:

 http://orinoco.flamefew.net:8013/jstltest/string.jar

 Hen



 --
 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: Sorted Select values

2002-10-01 Thread Henri Yandell

Jakarta Commons Collection's SequencedHashMap would be my choice of use.
TreeMap has irritating issues with equal objects.

Hen

On Tue, 1 Oct 2002, Shawn Bayern wrote:

 On Tue, 1 Oct 2002, Holly, Michael wrote:

  Is there not a method of sorting these to the way they were entered?

 HashMap does not guarantee any order.  You can use TreeMap for lexical
 ordering (or LinkedHashMap in JDK 1.4 for order preservation).

 --
 Shawn Bayern
 JSTL in Action   http://www.jstlbook.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]




RE: can't make string taglibs work!

2002-09-18 Thread Henri Yandell


Yeah, seems so :)

Could you send your entire test page to the list [by entire, I assume it
only contains the str: tag and the necessary bits at the top. If it's
bigger, try making a simple test one first]?

The other option is to try the samples. If the samples work, then compare
their web.xml and jsp with yours.

http://www.generationjava.com:8013/string-examples/index.html

is an example url of a slightly out of date version running. [it doesn't
have the truncateNicely tag iin it].

So you should just have to place the string-examples.war in your webapps
directory and goto:

http://yourdomain.com:yourport/string-examples/index.html

Let us know how that goes,

Hen

On Wed, 18 Sep 2002, [iso-8859-1] Xavier Prélat wrote:

 Henri,

 I did add the commons-lang jar to my server lib ??

 did not try the samples...but i just try to execute this :

 str:replace replace=e with=AA sentence Hopefully./str:replace

 quite simple!!

 Xavier

 XP -Message d'origine-
 XP De : Henri Yandell [mailto:[EMAIL PROTECTED]]
 XP Envoyé : mercredi 18 septembre 2002 13:10
 XP À : Tag Libraries Users List
 XP Objet : Re: can't make string taglibs work!
 XP
 XP
 XP
 XP
 XP On Wed, 18 Sep 2002, [iso-8859-1] Xavier Prélat wrote:
 XP
 XP  Hi,
 XP 
 XP  I am trying to use string taglibs and I can't get something
 XP else than HTTP
 XP  : 500 unhandled expression while playing with a simple replace tag!
 XP 
 XP  I am using session, datetime and others taglibs, so I did
 XP copy jar file into
 XP  the server directory, modified web.xml the usual way, is
 XP there something I
 XP  forgot!
 XP
 XP Are you able to get the examples war working at all? I find
 XP this is often
 XP the easiest way to confirm that taglibs are working.
 XP
 XP Have you downloaded the beta of commons-lang? [I can provide url if you
 XP haven't. Bit early in morning atm].
 XP
 XP Have you had any taglib working in that container yet? Any Jakarta one I
 XP mean.
 XP
 XP Hen
 XP
 XP
 XP --
 XP 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: c:out and \n

2002-09-17 Thread Henri Yandell



On Tue, 17 Sep 2002, zze-JEANJEAN S ext FTRD/DMI/SOP wrote:

   Is there a tag to convert \n to br/ ??
 
  You should be able to use the String Taglib or the Regexp Taglib.
 
 The str:replace tag is not easy to use : in the replace propertie the \n
 is not understood :(( You have to put in this propetie a real new line,
 so the code is not really readable :(
 For instance :
 ...
 str:replace replace=
  with=BR/c:out
 value=${requestScope[theKey].address1}//str:replace
 ...

Yeah. This needs to be solved doesn't it.

Solutions:

Make replace accept \n as being a newline. This would be doable, but what
if someone wanted to replace a \n sequence? Is it acceptable to make
'tabs' illegal in the replace etc. Probably not.

Add a replaceJava attribute, for specifying the replace tag as a Java
attribute. Would want a withJava attribute too.
Or maybe this is an encoding=java attribute.

Have a replaceNewline tag. A bit weak as you won't be able to replace
something with a newline in. Also has weaknesses as I'm trying to collate
similar functionality and not create more tags.


I seem to recall that there are no XML character entities that work
there, but possible I could make one work. Whether this would be
cross-server though, I don't know.

Most people will want \n to work I imagine, and won't care that they have
to do \\n to replace a \ and a n. If I change it so that all
String attributes get unescaped for Java entities, and maybe even all
content as well. I wonder if this will hurt anything...

If not, I'll aim for this feature to be in a 2.0 release. My apologies for
not being able to get it in sooner.

Hen


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Dynamic string replacement?

2002-09-11 Thread Henri Yandell


Yep. Basically this is what we talk about when we discuss JSTLizing the
String library. I would hook up the JEL thingy to the input.

To be honest, I think it would simply involve:

1) Find the code needed in JSTL to implement this
2) Change StringTagSupport. Then all String tags are JEL'd.
3) Figure out which jar is needed to get the JEL code.

JSP 2.0 will invalidate the need for this, but I suspect it's a ways off.
So I'm happy for the String taglib to go ahead and have this and will
implement it if a patch doesn't appear at some point :)

My focus at the moment is to rearrange the tags themselves and commit the
changes all at once [after a notice of upcoming changes to the Users
list] so I don't irritate everyone with a changing library.

Any suggestions here are welcomed :) Possibly I should release a
stable-prior-to-changes-something.jar before breaking things. Will see if
that has approval on the dev list.

Hen

On Wed, 11 Sep 2002 [EMAIL PROTECTED] wrote:

 Hi all

 It looks like I found something to implement in the String Tag Library  :-)

 What I'm trying to do is to create links within a text, i.e. replacing 'the
 text' with 'a href=...the text/a'. The problem is that both the text
 and the link are dynamic.
 However, the String Tag Library won't let me replace things dynamically.

 Consider this:

 c:set var=a value=This will be replaced/
 c:set var=b value=The new text/
 c:out value=${a}/br
 c:out value=${b}/br
 str:replace replace=This will be replaced with=The new textAnd he
 said: This will be replaced!./str:replace

 will show

 This will be replaced
 The new text
 And he said: The new text!.

  - works like a charm! However,

 c:set var=a value=This will be replaced/
 c:set var=b value=The new text/
 c:out value=${a}/br
 c:out value=${b}/br
 str:replace replace=${a} with=${b}And he said: This will be
 replaced!./str:replace

 won't replace anything:

 This will be replaced
 The new text
 And he said: This will be replaced!.


 And

 c:set var=a value=This will be replaced/
 c:set var=b value=The new text/
 c:out value=${a}/br
 c:out value=${b}/br
 str:replace replace=c:out value=${a}/ with=c:out
 value=${b}/And he said: This will be replaced!./str:replace

 even gives me an exception:

 javax.servlet.ServletException: /jsp/test.jsp(206,40) Attribute ${a} has no
 value


 This would be very, very handy if it worked... actually for all of the
 String tag library.

 Thanks  regards,
 Eric


 --
 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]




  1   2   >