Client/Server Side Validation for Struts 1.1

2001-06-01 Thread David Winterfeldt

I'd like to get a discussion started on the
client/standard validations for Struts 1.1.  I thought
it would be good to talk about what basic features it
would include and implementation.  Here are the
descriptions from the To Do list for 1.1.

Standard Validations. 
Add the ability to configure standard validations on
particular properties to be enforced by the controller
servlet automatically. Where feasible, client-side
JavaScript validations may also be generated based on
the same configuration rules. 

Client Side Validation. 
Add the ability to automatically generate optional
JavaScript code to perform client-side validations for
things like required fields, numeric fields,
dates/times/timestamps, and so on. The required
validation should mesh with validation enhancements
provided in the controller servlet itself.

Nic Hobbs and I have both volunteered for the Standard
(Server Side) Validations and Ted Husted, Nic Hobbs,
Spencer Smith and I have volunteered for the Client
Validations (JavaScript).  Ted has been using a
validation framework I've done on a project (I'm not
sure what version).  It lets you define your
validation rules in an xml file.  It supports
internationalized rules for a form and
internationalized messages.  It has basic support for
creating JavaScript methods that can do what a server
side method does. The code, documentation, and example
webapps are posted here.  And of course Struts is
welcome to the source code if everyone thinks that
what I've done so far is good foundation to start on.
http://home.earthlink.net/~dwinterfeldt/

If any of the other volunteers have started something,
I'd like to see it and I'm sure everyone has ideas for
the design.  I'd go into more detail about everything
I've done, but it is probably easier for anyone
interested to go to my site and read the documentation
and javadocs posted there.

David Winterfeldt
http://home.earthlink.net/~dwinterfeldt/

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Re: Struts 1.0 Release Planning

2001-06-01 Thread Craig R. McClanahan



On Fri, 1 Jun 2001, Martin Cooper wrote:

> +1. Getting tight for us, but this will work. Anything I can do to help at
> this stage?
> 

Pound the heck out of "beta 3" when I post it tomorrow, and report any
bugs you find to  :-).

If you've been monitoring the Bugzilla reports and watched which ones I'm
fixing, the *only* things going into 1.0 at this point are bug fixes.  I
don't want to introduce anything new and risk the stability we've reached
so far.

Craig


> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 01, 2001 2:12 PM
> Subject: Struts 1.0 Release Planning
> 
> 
> > I *really* wanted to have a 1.0 final release in time for JavaOne.  But
> > the recent events on the Apache server (a cracker got in), plus the fact
> > that rebuilding things took Bugzilla down for a while, has made that
> > basically impossible :-(.
> >
> > Instead, what I would like to propose is to cut a Beta 3 release this
> > weekend, and give people a week to pound on it.  The target date for a 1.0
> > final release would be June 15 (a week after JavaOne).
> >
> > Does that sound like a satisfactory plan to everyone?
> >
> > Craig
> >
> >
> 
> 
> 




Re: Proposed feature: Bean property transformations

2001-06-01 Thread Jonathan Asbell

I think the Barracuda project has done things in this area
http://barracuda.enhydra.org/
I am currently beginning to implement struts and have also been reading
about the alternatives.  Each is developing in its own direction.  I like
the Barracuda design.  It is more OO and does not rely on jsp.


- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 9:46 AM
Subject: Re: Proposed feature: Bean property transformations


> What I'm missing is a comprehensive, general package for converting data
> types and formatting properties for presentation. Most of this
> functionality is available somewhere in java and javax space, but it's
> spread around.
>
> What would be most useful, I think, is a single, generic package that
> provided
>
> (1) validation of Strings using regular expressions (a la David
> Winterfeldt's servlet), with direct support for native and JDBC
> datatypes,
>
> (2) binary to String and String to binary conversions for all native and
> standard types, and support for adding others,
>
> (3) given a formatting specification ("00#.##") and data of any
> supported type, return a formatted presentation String,
>
> (4) support for locale-senstive transformations with (3),
>
> (5) support for extending the formatting specification for unusual
> circumstances, and
>
> (6) provide simple date-calculation methods and a countdown presentation
> format (seconds, minutes, hours, or days from now until then).
>
> We could then use this helper object during the validation cycle to
> convert incoming Strings to the other types needed by business-logic
> objects, AND pass through the functionality from a  > tag, that could pull a property from a given bean, transform it, and
return a formatted String for direct use by the view.
>
> If there is not something like this already out there, I've very
> interested in getting started on this package, since I really, really
> need it for my own projects. Could be a nice addition to the Commons ...
>
> I'm cross-posting this to Struts user in case someone can suggest a
> package that already provides this functionality.
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
>
>
> Ron Smith wrote:
> >
> > I've been thinking of implementing this feature lately and I haven't
> > seen it proposed on this list yet.  Any comments?
> >
> > Summary:
> > Provide a means to flexibly plug in transformations that could
> > be applied to JavaBean properties for presentation in a JSP page.
> > What transformation to apply to which JavaBean property
> > is specified in the Struts JSP tags (e.g. bean:write).
> > Transformations are Java classes that are responsible for taking
> > a JavaBean property or any other Object, applying whatever
> > transformation, and returning the transformed Object for
> > presentation in a JSP page.
> > Some example transformations are to format a date in a specific
> > format, format decimal numbers, or even to sort a collection in
> > a particular order before iterating over the collection's objects.
> >
> > Motivation:
> > Separating business entity code from presentation-specific code
> > is a good thing.  Consider a business entity class called Order.  If
> > we want to display the orderPlacedDate attribute in 4 different
> > date formats on a JSP page, we could add 4 different methods to
> > the Order class to support these 4 different formats.  But we quickly
> > end up with a very cluttered Order class and the Order class is too
> > coupled to the presentation details.
> > One approach I've used is to create presentation wrapper classes
> > which hold references to the business entity objects and are
> > responsible for all of the presentation specific formatting.  The
> > JSP pages access the presentation wrapper classes and not the business
> > entity classes.  For sites that access many different business entity
> > classes, this can become very tedious.
> > A better approach would be to be able to plug-in specific types of
> > presentation transformations to be applied to specific JavaBean
> > properties that are to be displayed in a JSP page without having to
> > create unecessary wrapper classes.
> >
> > Details:
> > Transformations are coded in transformation classes, all of which
> > implement
> > a Transformation interface.  This interface has one public method:
> > Object transform(Object inObj)
> > This method is responsible for applying whatever transformation is
> > needed
> > to the passed in object and returning a transformed version of the
> > object for presentation in a JSP page.
> > The transformation objects would be created at initialization based on
> > the
> > configuration file, and could be initialized with some parameters from
> > the
> > configuration file (e.g. the date format string to be used for a date
> > transformation).  E

cvs commit: jakarta-struts/doc index.xml

2001-06-01 Thread craigmcc

craigmcc01/06/01 21:08:52

  Modified:doc  index.xml
  Log:
  Subscribe and unsubscribe links.
  
  Revision  ChangesPath
  1.4   +11 -6 jakarta-struts/doc/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/index.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.xml 2001/05/31 02:02:28 1.3
  +++ index.xml 2001/06/02 04:08:51 1.4
  @@ -112,15 +112,20 @@
 community, including contributing to the future development of Struts.
 Check out the following resources:
 
  -  STRUTS-USER Mailing List - Subscribe to the
  -  mailto:[EMAIL PROTECTED]";>STRUTS-USER
  +  STRUTS-USER Mailing List - Subscribe to this list
  +  to communicate with other developers that are using
 mailing list to communicate with other developers that are using
 Struts for their own applications, including questions about the
  -  installation of Struts, and the usage of particular Struts features.
  -  STRUTS-DEV Mailing List - Subscribe to the
  -  mailto:[EMAIL PROTECTED]";>STRUTS-DEV
  +  installation of Struts, and the usage of particular Struts features.
  +  [mailto:[EMAIL PROTECTED]";>Subscribe]
  +  [mailto:[EMAIL PROTECTED]";>Unsubscribe]
  +  
  +  STRUTS-DEV Mailing List - Subscribe to this
 mailing list to communicate with other developers interested in expanding
  -  and improving the functionality supported by Struts itself.
  +  and improving the functionality supported by Struts itself.
  +  [mailto:[EMAIL PROTECTED]";>Subscribe]
  +  [mailto:[EMAIL PROTECTED]";>Unsubscribe]
  +  
 Bug Reports and Feature Requests Use the
 Bug Reporting System to submit these reports.
 Patches and Modules - You can contribute patches and
  
  
  



cvs commit: jakarta-struts/doc index.xml

2001-06-01 Thread craigmcc

craigmcc01/06/01 21:08:12

  Modified:doc  Tag: STRUTS_1_0_BRANCH index.xml
  Log:
  Place both Subscribe and Unsubscribe links to the mailing lists on the
  main page of the documentation application (and therefore the main page of
  the Struts web site next time it is updated).
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.2.2.2   +11 -6 jakarta-struts/doc/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/index.xml,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- index.xml 2001/05/31 02:01:36 1.2.2.1
  +++ index.xml 2001/06/02 04:08:12 1.2.2.2
  @@ -112,15 +112,20 @@
 community, including contributing to the future development of Struts.
 Check out the following resources:
 
  -  STRUTS-USER Mailing List - Subscribe to the
  -  mailto:[EMAIL PROTECTED]";>STRUTS-USER
  +  STRUTS-USER Mailing List - Subscribe to this list
  +  to communicate with other developers that are using
 mailing list to communicate with other developers that are using
 Struts for their own applications, including questions about the
  -  installation of Struts, and the usage of particular Struts features.
  -  STRUTS-DEV Mailing List - Subscribe to the
  -  mailto:[EMAIL PROTECTED]";>STRUTS-DEV
  +  installation of Struts, and the usage of particular Struts features.
  +  [mailto:[EMAIL PROTECTED]";>Subscribe]
  +  [mailto:[EMAIL PROTECTED]";>Unsubscribe]
  +  
  +  STRUTS-DEV Mailing List - Subscribe to this
 mailing list to communicate with other developers interested in expanding
  -  and improving the functionality supported by Struts itself.
  +  and improving the functionality supported by Struts itself.
  +  [mailto:[EMAIL PROTECTED]";>Subscribe]
  +  [mailto:[EMAIL PROTECTED]";>Unsubscribe]
  +  
 Bug Reports and Feature Requests Use the
 Bug Reporting System to submit these reports.
 Patches and Modules - You can contribute patches and
  
  
  



Re: Struts 1.0 Release Planning

2001-06-01 Thread Martin Cooper

+1. Getting tight for us, but this will work. Anything I can do to help at
this stage?

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 2:12 PM
Subject: Struts 1.0 Release Planning


> I *really* wanted to have a 1.0 final release in time for JavaOne.  But
> the recent events on the Apache server (a cracker got in), plus the fact
> that rebuilding things took Bugzilla down for a while, has made that
> basically impossible :-(.
>
> Instead, what I would like to propose is to cut a Beta 3 release this
> weekend, and give people a week to pound on it.  The target date for a 1.0
> final release would be June 15 (a week after JavaOne).
>
> Does that sound like a satisfactory plan to everyone?
>
> Craig
>
>





Struts status items list /\/\/\

2001-06-01 Thread Jonathan Asbell



Can any one of you put together a list? We need to 
know:
1) what can currently be thrown out (assuming I 
have the most recent evenings build)
2) what are, and where can we obtain all 
of the recently contributed pieces which are under consideration, being worked 
on or tested (the Token mechanism submission, the iterate patch, the message 
patch, validation, bean factory, auto beans,  etc. etc. etc.)
3) what is next item that has been decided but has 
not been included in any nightly build.
4) what specific areas are we 
currently looking at to solve 
 
Just a brief list for the rest of us to have an 
idea of current state and the direction in the near future.  It will 
effect what we are personally building.
 
Cheers.
Jonathan


RE: Need a Good Example Which uses Struts

2001-06-01 Thread Ravindra Sharma


Never mind this I found it in the Struts Zip file. Thanks.

-ravi

-Original Message-
From: Ravindra Sharma 
Sent: Friday, June 01, 2001 1:20 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Need a Good Example Which uses Struts


Hi Ted,

I was reading the "A Walking Tour of the Struts Example Application". I was wondering 
where do I find source code the example discussed in this aritcle. Is it available?

-ravi

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 6:55 AM
To: [EMAIL PROTECTED]
Subject: Re: Need a Good Example Which uses Struts


I believe everything written about Struts is referenced at 

< http://www.husted.com/about/struts/ >

(And if I missed anything, someone please let me know!)

If the one you mentioned is "Strut by Strut", note that it was just
updated a few days ago, with some more about integrating Struts with
your model. I'll be adding some more later today about implementing
search lists and linking to other pages (master/detail pattern).

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Ravindra Sharma wrote:
> 
> Hi Folks,
> 
> I was looking for a good example which can explain practical how to use Struts. The 
>one available with Zip file is helping me much if I am missing something please let 
>me know.
> 
> Thanks,
> -ravi



Re: Need a Good Example Which uses Struts

2001-06-01 Thread Ted Husted

The example application is bundled with the Struts distribution. That
article is now too. 

Ravindra Sharma wrote:
> 
> Hi Ted,
> 
> I was reading the "A Walking Tour of the Struts Example Application". I was 
>wondering where do I find source code the example discussed in this aritcle. Is it 
>available?
> 
> -ravi
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2001 6:55 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Need a Good Example Which uses Struts
> 
> I believe everything written about Struts is referenced at
> 
> < http://www.husted.com/about/struts/ >
> 
> (And if I missed anything, someone please let me know!)
> 
> If the one you mentioned is "Strut by Strut", note that it was just
> updated a few days ago, with some more about integrating Struts with
> your model. I'll be adding some more later today about implementing
> search lists and linking to other pages (master/detail pattern).
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
> 
> Ravindra Sharma wrote:
> >
> > Hi Folks,
> >
> > I was looking for a good example which can explain practical how to use Struts. 
>The one available with Zip file is helping me much if I am missing something please 
>let me know.
> >
> > Thanks,
> > -ravi

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Re: cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

2001-06-01 Thread Jonathan

Just thought I would mention this in case someone was not sure, and I hope
I'm not preaching to the choir.
The life cycle is as follows:
If the form or link has an ampersand it always gets escaped as %26.
The container than translates it back as "&" so getParameter() will get the
already decoded "&" character
So if you are to send "&" it will get encoded to %26amp%3b and decoded
back to "&"  which is legal xml
Therfore I dont understand the problem


- Original Message -
From: "Deadman, Hal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 5:56 PM
Subject: RE: cvs commit: jakarta-struts/src/share/org/apache/struts/util
RequestUtils.java


> Sounds good. I don't have access to other browsers but they probably work
> too.
>
> > -Original Message-
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 01, 2001 5:31 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: cvs commit:
> > jakarta-struts/src/share/org/apache/struts/util
> > RequestUtils.java
> >
> >
> >
> >
> > On Fri, 1 Jun 2001, Deadman, Hal wrote:
> >
> > > Does this change mean that there will be a link generated
> > that looks like
> > > this:
> > >
> > > some.jsp?test=1&test=2
> > > instead of
> > > some.jsp?test=1&test=2
> > >
> >
> > Yes, in the generated HTML code of the page (i.e. when you do a view
> > source).
> >
> > > If so, I don't think that will work. It doesn't work on
> > Weblogic 6.0.
> > > Calling getParameterValues() only sees the first value.
> > >
> >
> > In my tests, both Netscape and IE would both send this
> > hyperlink back in
> > with a '&' instead, so multiple parameter values would still
> > be recognized
> > in the usual way.  Are there clients that don't do this?
> >
> > > Hal
> > >
> >
> > Craig
> >
> >
> > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, June 01, 2001 4:22 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: cvs commit:
> > jakarta-struts/src/share/org/apache/struts/util
> > > > RequestUtils.java
> > > >
> > > >
> > > > craigmcc01/06/01 13:21:41
> > > >
> > > >   Modified:src/share/org/apache/struts/util Tag:
> > STRUTS_1_0_BRANCH
> > > > RequestUtils.java
> > > >   Log:
> > > >   Generate "&" instead of "&" in request URIs so that the
> > > > output is still
> > > >   legal XML syntax in the value returned by computeURL().
> > > >
> > > >   PR:  Bugzilla #1938
> > > >   Submitted by :  Alessandro Vernet <[EMAIL PROTECTED]>
> > (also supplied
> > > >   the patch - thanks!)
> > > >
> > > >   Revision  ChangesPath
> > > >   No   revision
> > > >
> > > >
> > > >   No   revision
> > > >
> > > >
> > > >   1.14.2.2  +7 -7
> > > > jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
> > > >
> > > >   Index: RequestUtils.java
> > > >
> > ===
> > > >   RCS file:
> > > > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > > > estUtils.java,v
> > > >   retrieving revision 1.14.2.1
> > > >   retrieving revision 1.14.2.2
> > > >   diff -u -r1.14.2.1 -r1.14.2.2
> > > >   --- RequestUtils.java 2001/06/01 18:45:03 1.14.2.1
> > > >   +++ RequestUtils.java 2001/06/01 20:21:40 1.14.2.2
> > > >   @@ -1,7 +1,7 @@
> > > >/*
> > > >   - * $Header:
> > > > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > > > estUtils.java,v 1.14.2.1 2001/06/01 18:45:03 craigmcc Exp $
> > > >   - * $Revision: 1.14.2.1 $
> > > >   - * $Date: 2001/06/01 18:45:03 $
> > > >   + * $Header:
> > > > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > > > estUtils.java,v 1.14.2.2 2001/06/01 20:21:40 craigmcc Exp $
> > > >   + * $Revision: 1.14.2.2 $
> > > >   + * $Date: 2001/06/01 20:21:40 $
> > > > *
> > > > *
> > > >
> > 
> > > > *
> > > >   @@ -95,7 +95,7 @@
> > > > * in the Struts controller framework.
> > > > *
> > > > * @author Craig R. McClanahan
> > > >   - * @version $Revision: 1.14.2.1 $ $Date: 2001/06/01 18:45:03 $
> > > >   + * @version $Revision: 1.14.2.2 $ $Date: 2001/06/01 20:21:40 $
> > > > */
> > > >
> > > >public class RequestUtils {
> > > >   @@ -364,7 +364,7 @@
> > > >url.append('?');
> > > >question = true;
> > > >} else
> > > >   -url.append('&');
> > > >   +url.append("&");
> > > >url.append(URLEncoder.encode(key));
> > > >url.append('='); // Interpret null as
> > > > "no value"
> > > >} else if (value instanceof String) {
> > > >   @@ -372,7 +372,7 @@
> > > >url.append('?');
> > > >question = true;
> > > >} else
> > > >   - 

cvs commit: jakarta-struts/doc release-notes-1.0-b3.xml project.xml

2001-06-01 Thread craigmcc

craigmcc01/06/01 15:30:26

  Modified:doc  Tag: STRUTS_1_0_BRANCH project.xml
  Added:   doc  Tag: STRUTS_1_0_BRANCH release-notes-1.0-b3.xml
  Log:
  Add release notes for 1.0-b3 (up to date with current changes).
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +1 -0  jakarta-struts/doc/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- project.xml   2001/03/18 17:48:58 1.1
  +++ project.xml   2001/06/01 22:30:23 1.1.2.1
  @@ -12,6 +12,7 @@
   
   
   
  +
   
   
   
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +261 -0jakarta-struts/doc/Attic/release-notes-1.0-b3.xml
  
  
  
  



RE: cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

2001-06-01 Thread Deadman, Hal

Sounds good. I don't have access to other browsers but they probably work
too.

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2001 5:31 PM
> To: [EMAIL PROTECTED]
> Subject: RE: cvs commit:
> jakarta-struts/src/share/org/apache/struts/util
> RequestUtils.java
>
>
>
>
> On Fri, 1 Jun 2001, Deadman, Hal wrote:
>
> > Does this change mean that there will be a link generated
> that looks like
> > this:
> >
> > some.jsp?test=1&test=2
> > instead of
> > some.jsp?test=1&test=2
> >
>
> Yes, in the generated HTML code of the page (i.e. when you do a view
> source).
>
> > If so, I don't think that will work. It doesn't work on
> Weblogic 6.0.
> > Calling getParameterValues() only sees the first value.
> >
>
> In my tests, both Netscape and IE would both send this
> hyperlink back in
> with a '&' instead, so multiple parameter values would still
> be recognized
> in the usual way.  Are there clients that don't do this?
>
> > Hal
> >
>
> Craig
>
>
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, June 01, 2001 4:22 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: cvs commit:
> jakarta-struts/src/share/org/apache/struts/util
> > > RequestUtils.java
> > >
> > >
> > > craigmcc01/06/01 13:21:41
> > >
> > >   Modified:src/share/org/apache/struts/util Tag:
> STRUTS_1_0_BRANCH
> > > RequestUtils.java
> > >   Log:
> > >   Generate "&" instead of "&" in request URIs so that the
> > > output is still
> > >   legal XML syntax in the value returned by computeURL().
> > >
> > >   PR:  Bugzilla #1938
> > >   Submitted by :  Alessandro Vernet <[EMAIL PROTECTED]>
> (also supplied
> > >   the patch - thanks!)
> > >
> > >   Revision  ChangesPath
> > >   No   revision
> > >
> > >
> > >   No   revision
> > >
> > >
> > >   1.14.2.2  +7 -7
> > > jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
> > >
> > >   Index: RequestUtils.java
> > >
> ===
> > >   RCS file:
> > > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > > estUtils.java,v
> > >   retrieving revision 1.14.2.1
> > >   retrieving revision 1.14.2.2
> > >   diff -u -r1.14.2.1 -r1.14.2.2
> > >   --- RequestUtils.java   2001/06/01 18:45:03 1.14.2.1
> > >   +++ RequestUtils.java   2001/06/01 20:21:40 1.14.2.2
> > >   @@ -1,7 +1,7 @@
> > >/*
> > >   - * $Header:
> > > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > > estUtils.java,v 1.14.2.1 2001/06/01 18:45:03 craigmcc Exp $
> > >   - * $Revision: 1.14.2.1 $
> > >   - * $Date: 2001/06/01 18:45:03 $
> > >   + * $Header:
> > > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > > estUtils.java,v 1.14.2.2 2001/06/01 20:21:40 craigmcc Exp $
> > >   + * $Revision: 1.14.2.2 $
> > >   + * $Date: 2001/06/01 20:21:40 $
> > > *
> > > *
> > >
> 
> > > *
> > >   @@ -95,7 +95,7 @@
> > > * in the Struts controller framework.
> > > *
> > > * @author Craig R. McClanahan
> > >   - * @version $Revision: 1.14.2.1 $ $Date: 2001/06/01 18:45:03 $
> > >   + * @version $Revision: 1.14.2.2 $ $Date: 2001/06/01 20:21:40 $
> > > */
> > >
> > >public class RequestUtils {
> > >   @@ -364,7 +364,7 @@
> > >url.append('?');
> > >question = true;
> > >} else
> > >   -url.append('&');
> > >   +url.append("&");
> > >url.append(URLEncoder.encode(key));
> > >url.append('='); // Interpret null as
> > > "no value"
> > >} else if (value instanceof String) {
> > >   @@ -372,7 +372,7 @@
> > >url.append('?');
> > >question = true;
> > >} else
> > >   -url.append('&');
> > >   +url.append("&");
> > >url.append(URLEncoder.encode(key));
> > >url.append('=');
> > >
> url.append(URLEncoder.encode((String) value));
> > >   @@ -383,7 +383,7 @@
> > >url.append('?');
> > >question = true;
> > >} else
> > >   -url.append('&');
> > >   +url.append("&");
> > >url.append(URLEncoder.encode(key));
> > >url.append('=');
> > >
> url.append(URLEncoder.encode(values[i]));
> > >
> > >
> > >
> > >
> >
>



Re: Bugzilla #1879 (Connection Pool handling of Stale Connections)

2001-06-01 Thread Craig R. McClanahan



On Fri, 1 Jun 2001, Ted Husted wrote:

> "Craig R. McClanahan" wrote:
> > Therefore, it seems to me that allowing the configuration of an optional
> > "do nothing" SQL command that GenericConnectionPool can use to test the
> > validity of the connection would be a better approach.  Does that make
> > sense to folks?
> 
> So, we'd add a testConnection property to control this and also provide
> a TestCommand property for the command. Then before returning a
> connection, the GCP would try the TestCommand first, and if it generates
> an exception, we discard the stale connection and get a new one. 
> 

I was thinking more along the lines of a single property
(testCommand).  If there was no such command, no test would be done.

> Do you think a default TestCommand of ";" work as a NOP ?
> 

There is no safe default for this that will work across even the few
databases I've used i the past (Oracle, Postgres, MySQL).  Therefore, I
believe the default should be "no test is performed".

> Is there a good way to get a connection to go stale, or do you just have
> to wait it out?
> 

Open some connections and then restart the database server :-).

> I've worked on this area of the code before, and could sign-up for this.
> 

That would be cool.  I'm going to cut beta-3 tonight, so if you do it
today you'll make the cut.

> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
> 

Craig





Re: Bugzilla #1879 (Connection Pool handling of Stale Connections)

2001-06-01 Thread Ted Husted

"Craig R. McClanahan" wrote:
> Therefore, it seems to me that allowing the configuration of an optional
> "do nothing" SQL command that GenericConnectionPool can use to test the
> validity of the connection would be a better approach.  Does that make
> sense to folks?

So, we'd add a testConnection property to control this and also provide
a TestCommand property for the command. Then before returning a
connection, the GCP would try the TestCommand first, and if it generates
an exception, we discard the stale connection and get a new one. 

Do you think a default TestCommand of ";" work as a NOP ?

Is there a good way to get a connection to go stale, or do you just have
to wait it out?

I've worked on this area of the code before, and could sign-up for this.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



RE: Need a Good Example Which uses Struts

2001-06-01 Thread Ravindra Sharma

Hi Ted,

I was reading the "A Walking Tour of the Struts Example Application". I was wondering 
where do I find source code the example discussed in this aritcle. Is it available?

-ravi

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 6:55 AM
To: [EMAIL PROTECTED]
Subject: Re: Need a Good Example Which uses Struts


I believe everything written about Struts is referenced at 

< http://www.husted.com/about/struts/ >

(And if I missed anything, someone please let me know!)

If the one you mentioned is "Strut by Strut", note that it was just
updated a few days ago, with some more about integrating Struts with
your model. I'll be adding some more later today about implementing
search lists and linking to other pages (master/detail pattern).

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Ravindra Sharma wrote:
> 
> Hi Folks,
> 
> I was looking for a good example which can explain practical how to use Struts. The 
>one available with Zip file is helping me much if I am missing something please let 
>me know.
> 
> Thanks,
> -ravi



RE: Bugzilla #1879 (Connection Pool handling of Stale Connections)

2001-06-01 Thread Deadman, Hal

I agree, isClosed() won't work. An option for a testing a connection with a
do-nothing SQL statement is needed. This is pretty standard for most
connection pools that I have seen.

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2001 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: Bugzilla #1879 (Connection Pool handling of Stale
> Connections)
>
>
> For the details of this bug report, see
>
>   http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1879
>
> As the report points out, GenericConnectionPool does not do
> anything about
> "stale" connections (i.e. those that the database has timed
> out, or what
> will happen to all of them if the database is rebooted).  The
> proposal is
> to add a call to
>
>   connection.getConnection().isClosed()
>
> in an attempt to assess the current state of the connection.  I don't
> think this is the correct approach, because it depends on the
> JDBC driver
> doing something active to test for this (as opposed to just
> checking to
> see if the application has called close() on it).  Doing this
> would also
> contradict the "JDBC 2.1 Core API" spec, section 11.1:
>
> The Connection.isClosed() method is only guaranteed to
> return true after Connection.close() has been called.
> Connection.isClosed() cannot be called, in general, to
> determine if a database connection is valid or invalid.
> A typical client can determine that a connection is
> invalid by catching the exception that is thrown when an
> operation is attempted.
>
> Therefore, it seems to me that allowing the configuration of
> an optional
> "do nothing" SQL command that GenericConnectionPool can use
> to test the
> validity of the connection would be a better approach.  Does that make
> sense to folks?
>
> Craig
>
>



Bugzilla #1879 (Connection Pool handling of Stale Connections)

2001-06-01 Thread Craig R. McClanahan

For the details of this bug report, see

  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1879

As the report points out, GenericConnectionPool does not do anything about
"stale" connections (i.e. those that the database has timed out, or what
will happen to all of them if the database is rebooted).  The proposal is
to add a call to

  connection.getConnection().isClosed()

in an attempt to assess the current state of the connection.  I don't
think this is the correct approach, because it depends on the JDBC driver
doing something active to test for this (as opposed to just checking to
see if the application has called close() on it).  Doing this would also
contradict the "JDBC 2.1 Core API" spec, section 11.1:

The Connection.isClosed() method is only guaranteed to
return true after Connection.close() has been called.
Connection.isClosed() cannot be called, in general, to
determine if a database connection is valid or invalid.
A typical client can determine that a connection is
invalid by catching the exception that is thrown when an
operation is attempted.

Therefore, it seems to me that allowing the configuration of an optional 
"do nothing" SQL command that GenericConnectionPool can use to test the
validity of the connection would be a better approach.  Does that make
sense to folks?

Craig





Re: Logic tags and string properties

2001-06-01 Thread Ted Husted

+1 on an empty attribute

I've been adding logic to my value beans to turn empty Strings back to
nulls when retrieving properties from the database (where I don't permit
nulls), so this would save me that workaround.

"Craig R. McClanahan" wrote:
> A third option would be to add an "empty" attribute to the 
> and  tags, which tells them how to treat empty
> strings.  The default, of course, would be the current behavior.



Re: Struts 1.0 Release Planning

2001-06-01 Thread Ted Husted

+1

"Craig R. McClanahan" wrote:
> 
> I *really* wanted to have a 1.0 final release in time for JavaOne.  But
> the recent events on the Apache server (a cracker got in), plus the fact
> that rebuilding things took Bugzilla down for a while, has made that
> basically impossible :-(.
> 
> Instead, what I would like to propose is to cut a Beta 3 release this
> weekend, and give people a week to pound on it.  The target date for a 1.0
> final release would be June 15 (a week after JavaOne).
> 
> Does that sound like a satisfactory plan to everyone?
> 
> Craig



RE: cvs commit: jakarta-struts/src/share/org/apache/struts/utilRequestUtils.java

2001-06-01 Thread Craig R. McClanahan



On Fri, 1 Jun 2001, Deadman, Hal wrote:

> Does this change mean that there will be a link generated that looks like
> this:
> 
> some.jsp?test=1&test=2
> instead of
> some.jsp?test=1&test=2
> 

Yes, in the generated HTML code of the page (i.e. when you do a view
source).

> If so, I don't think that will work. It doesn't work on Weblogic 6.0.
> Calling getParameterValues() only sees the first value.
> 

In my tests, both Netscape and IE would both send this hyperlink back in
with a '&' instead, so multiple parameter values would still be recognized
in the usual way.  Are there clients that don't do this?

> Hal
> 

Craig


> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 01, 2001 4:22 PM
> > To: [EMAIL PROTECTED]
> > Subject: cvs commit: jakarta-struts/src/share/org/apache/struts/util
> > RequestUtils.java
> >
> >
> > craigmcc01/06/01 13:21:41
> >
> >   Modified:src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
> > RequestUtils.java
> >   Log:
> >   Generate "&" instead of "&" in request URIs so that the
> > output is still
> >   legal XML syntax in the value returned by computeURL().
> >
> >   PR:  Bugzilla #1938
> >   Submitted by :  Alessandro Vernet <[EMAIL PROTECTED]> (also supplied
> >   the patch - thanks!)
> >
> >   Revision  ChangesPath
> >   No   revision
> >
> >
> >   No   revision
> >
> >
> >   1.14.2.2  +7 -7
> > jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
> >
> >   Index: RequestUtils.java
> >   ===
> >   RCS file:
> > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > estUtils.java,v
> >   retrieving revision 1.14.2.1
> >   retrieving revision 1.14.2.2
> >   diff -u -r1.14.2.1 -r1.14.2.2
> >   --- RequestUtils.java 2001/06/01 18:45:03 1.14.2.1
> >   +++ RequestUtils.java 2001/06/01 20:21:40 1.14.2.2
> >   @@ -1,7 +1,7 @@
> >/*
> >   - * $Header:
> > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > estUtils.java,v 1.14.2.1 2001/06/01 18:45:03 craigmcc Exp $
> >   - * $Revision: 1.14.2.1 $
> >   - * $Date: 2001/06/01 18:45:03 $
> >   + * $Header:
> > /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> > estUtils.java,v 1.14.2.2 2001/06/01 20:21:40 craigmcc Exp $
> >   + * $Revision: 1.14.2.2 $
> >   + * $Date: 2001/06/01 20:21:40 $
> > *
> > *
> > 
> > *
> >   @@ -95,7 +95,7 @@
> > * in the Struts controller framework.
> > *
> > * @author Craig R. McClanahan
> >   - * @version $Revision: 1.14.2.1 $ $Date: 2001/06/01 18:45:03 $
> >   + * @version $Revision: 1.14.2.2 $ $Date: 2001/06/01 20:21:40 $
> > */
> >
> >public class RequestUtils {
> >   @@ -364,7 +364,7 @@
> >url.append('?');
> >question = true;
> >} else
> >   -url.append('&');
> >   +url.append("&");
> >url.append(URLEncoder.encode(key));
> >url.append('='); // Interpret null as
> > "no value"
> >} else if (value instanceof String) {
> >   @@ -372,7 +372,7 @@
> >url.append('?');
> >question = true;
> >} else
> >   -url.append('&');
> >   +url.append("&");
> >url.append(URLEncoder.encode(key));
> >url.append('=');
> >url.append(URLEncoder.encode((String) value));
> >   @@ -383,7 +383,7 @@
> >url.append('?');
> >question = true;
> >} else
> >   -url.append('&');
> >   +url.append("&");
> >url.append(URLEncoder.encode(key));
> >url.append('=');
> >url.append(URLEncoder.encode(values[i]));
> >
> >
> >
> >
> 




RE: cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

2001-06-01 Thread Deadman, Hal

Does this change mean that there will be a link generated that looks like
this:

some.jsp?test=1&test=2
instead of
some.jsp?test=1&test=2

If so, I don't think that will work. It doesn't work on Weblogic 6.0.
Calling getParameterValues() only sees the first value.

Hal


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2001 4:22 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: jakarta-struts/src/share/org/apache/struts/util
> RequestUtils.java
>
>
> craigmcc01/06/01 13:21:41
>
>   Modified:src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
> RequestUtils.java
>   Log:
>   Generate "&" instead of "&" in request URIs so that the
> output is still
>   legal XML syntax in the value returned by computeURL().
>
>   PR:  Bugzilla #1938
>   Submitted by :  Alessandro Vernet <[EMAIL PROTECTED]> (also supplied
>   the patch - thanks!)
>
>   Revision  ChangesPath
>   No   revision
>
>
>   No   revision
>
>
>   1.14.2.2  +7 -7
> jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
>
>   Index: RequestUtils.java
>   ===
>   RCS file:
> /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> estUtils.java,v
>   retrieving revision 1.14.2.1
>   retrieving revision 1.14.2.2
>   diff -u -r1.14.2.1 -r1.14.2.2
>   --- RequestUtils.java   2001/06/01 18:45:03 1.14.2.1
>   +++ RequestUtils.java   2001/06/01 20:21:40 1.14.2.2
>   @@ -1,7 +1,7 @@
>/*
>   - * $Header:
> /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> estUtils.java,v 1.14.2.1 2001/06/01 18:45:03 craigmcc Exp $
>   - * $Revision: 1.14.2.1 $
>   - * $Date: 2001/06/01 18:45:03 $
>   + * $Header:
> /home/cvs/jakarta-struts/src/share/org/apache/struts/util/Requ
> estUtils.java,v 1.14.2.2 2001/06/01 20:21:40 craigmcc Exp $
>   + * $Revision: 1.14.2.2 $
>   + * $Date: 2001/06/01 20:21:40 $
> *
> *
> 
> *
>   @@ -95,7 +95,7 @@
> * in the Struts controller framework.
> *
> * @author Craig R. McClanahan
>   - * @version $Revision: 1.14.2.1 $ $Date: 2001/06/01 18:45:03 $
>   + * @version $Revision: 1.14.2.2 $ $Date: 2001/06/01 20:21:40 $
> */
>
>public class RequestUtils {
>   @@ -364,7 +364,7 @@
>url.append('?');
>question = true;
>} else
>   -url.append('&');
>   +url.append("&");
>url.append(URLEncoder.encode(key));
>url.append('='); // Interpret null as
> "no value"
>} else if (value instanceof String) {
>   @@ -372,7 +372,7 @@
>url.append('?');
>question = true;
>} else
>   -url.append('&');
>   +url.append("&");
>url.append(URLEncoder.encode(key));
>url.append('=');
>url.append(URLEncoder.encode((String) value));
>   @@ -383,7 +383,7 @@
>url.append('?');
>question = true;
>} else
>   -url.append('&');
>   +url.append("&");
>url.append(URLEncoder.encode(key));
>url.append('=');
>url.append(URLEncoder.encode(values[i]));
>
>
>
>



RE: Struts 1.0 Release Planning

2001-06-01 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)

+1, timing is nothing as long as it's stable

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 5:13 PM
To: [EMAIL PROTECTED]
Subject: Struts 1.0 Release Planning


I *really* wanted to have a 1.0 final release in time for JavaOne.  But
the recent events on the Apache server (a cracker got in), plus the fact
that rebuilding things took Bugzilla down for a while, has made that
basically impossible :-(.

Instead, what I would like to propose is to cut a Beta 3 release this
weekend, and give people a week to pound on it.  The target date for a 1.0
final release would be June 15 (a week after JavaOne).

Does that sound like a satisfactory plan to everyone?

Craig



Struts 1.0 Release Planning

2001-06-01 Thread Craig R. McClanahan

I *really* wanted to have a 1.0 final release in time for JavaOne.  But
the recent events on the Apache server (a cracker got in), plus the fact
that rebuilding things took Bugzilla down for a while, has made that
basically impossible :-(.

Instead, what I would like to propose is to cut a Beta 3 release this
weekend, and give people a week to pound on it.  The target date for a 1.0
final release would be June 15 (a week after JavaOne).

Does that sound like a satisfactory plan to everyone?

Craig





Re: String indexed bean fields

2001-06-01 Thread Ted Husted

So, would this then give us access to things like RowSet objects which
have accessors like getString(1) ?

"Craig R. McClanahan" wrote:
> Yep.  Something like this is part of the enhancements I see in Struts 1.1.

> On Wed, 30 May 2001, Rapheal Kaplan wrote:
> >   Has anyone thought about allowing for string based indexed fields (even
> > though they do not fit in to the Java spec)?
> >   For example:
> >   
> >   would call:
> >   user.getEmail( "home" );
> >   - Rapheal Kaplan



Re: jakarta.apache.org and ssh

2001-06-01 Thread Craig R. McClanahan

On Fri, 1 Jun 2001, SCHACHTER,MICHAEL (HP-NewJersey,ex2) wrote:

> I sent this to the jakarta-general list, but I figured I'd send it here
> too...
> 
> jakarta.apache.org keeps refusing my password when I ssh to it, anyone else
> know of this problem? Craig?
> 

Yep.  The apache.org site was the target of a cracker (along with several
others including SourceForge).  There's a page on the www.apache.org site
detailing what we've done to clean up, but one thing you'll need to do is
sent a message to [EMAIL PROTECTED] stating that you are a Struts committer,
and need a new password assigned.

Also, all committers across Apache projects are automatically subscribed
to [EMAIL PROTECTED] which is where extensive discussion of this has
taken place.  By default, this goes to your shell account on the apache
server -- you can set up a ".forward" file if you want it sent somewhere
else (after you get your new password).

Craig





cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html BaseHandlerTag.java CheckboxTag.java MultiboxTag.java OptionTag.java OptionsTag.java RadioTag.java SelectTag.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 13:43:21

  Modified:src/share/org/apache/struts/taglib/html BaseHandlerTag.java
CheckboxTag.java MultiboxTag.java OptionTag.java
OptionsTag.java RadioTag.java SelectTag.java
  Log:
  Port the fixes for attribute minimization to the HEAD branch.
  
  Revision  ChangesPath
  1.4   +6 -6  
jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java
  
  Index: BaseHandlerTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BaseHandlerTag.java   2001/05/05 00:54:33 1.3
  +++ BaseHandlerTag.java   2001/06/01 20:43:18 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v 
1.3 2001/05/05 00:54:33 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/05/05 00:54:33 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v 
1.4 2001/06/01 20:43:18 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/06/01 20:43:18 $
*
* 
*
  @@ -71,7 +71,7 @@
* appropriate implementations of these.
*
* @author Don Clasen
  - * @version $Revision: 1.3 $ $Date: 2001/05/05 00:54:33 $
  + * @version $Revision: 1.4 $ $Date: 2001/06/01 20:43:18 $
*/
   
   public abstract class BaseHandlerTag extends BodyTagSupport {
  @@ -580,11 +580,11 @@
   }
   
   if (disabled) {
  -handlers.append(" disabled");
  +handlers.append(" disabled=\"true\"");
   }
   
   if (readonly) {
  -handlers.append(" readonly");
  +handlers.append(" readonly=\"true\"");
   }
   
   }
  
  
  
  1.5   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java
  
  Index: CheckboxTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CheckboxTag.java  2001/04/18 01:31:14 1.4
  +++ CheckboxTag.java  2001/06/01 20:43:18 1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java,v 
1.4 2001/04/18 01:31:14 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/04/18 01:31:14 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java,v 
1.5 2001/06/01 20:43:18 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/06/01 20:43:18 $
*
* 
*
  @@ -76,7 +76,7 @@
* Tag for input fields of type "checkbox".
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/04/18 01:31:14 $
  + * @version $Revision: 1.5 $ $Date: 2001/06/01 20:43:18 $
*/
   
   public class CheckboxTag extends BaseHandlerTag {
  @@ -212,7 +212,7 @@
if (checked.equalsIgnoreCase("true")
   || checked.equalsIgnoreCase("yes")
|| checked.equalsIgnoreCase("on"))
  - results.append(" checked");
  + results.append(" checked=\"true\"");
results.append(prepareEventHandlers());
results.append(prepareStyles());
results.append(">");
  
  
  
  1.7   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java
  
  Index: MultiboxTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MultiboxTag.java  2001/04/18 23:45:02 1.6
  +++ MultiboxTag.java  2001/06/01 20:43:18 1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java,v 
1.6 2001/04/18 23:45:02 craigmcc Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/04/18 23:45:02 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java,v 
1.7 2001/06/01 20:43:18 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/06/01 20:43:18 $
*
* 
*
  @@ -83,7 +83,7 @@
*
* @author Ralph Schaer
* @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/04/18 23:45:02 $
  + * @version $Revision: 1.7 $ $Date: 2001/06/01 20:43:18 $
*/
   
   public class MultiboxTag extends BaseHandlerTag {
  @@ -273,7 +273,7 @@
}
for (int i = 0; i < values.length; i++) {
if (valu

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html RadioTag.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 13:42:28

  Modified:src/share/org/apache/struts/taglib/html Tag:
STRUTS_1_0_BRANCH RadioTag.java
  Log:
  Oops, missed  on the attribute minimization fix.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.3.2.1   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/RadioTag.java
  
  Index: RadioTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/RadioTag.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- RadioTag.java 2001/04/18 01:31:15 1.3
  +++ RadioTag.java 2001/06/01 20:42:28 1.3.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/RadioTag.java,v 1.3 
2001/04/18 01:31:15 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/04/18 01:31:15 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/RadioTag.java,v 
1.3.2.1 2001/06/01 20:42:28 craigmcc Exp $
  + * $Revision: 1.3.2.1 $
  + * $Date: 2001/06/01 20:42:28 $
*
* 
*
  @@ -77,7 +77,7 @@
* Tag for input fields of type "radio".
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2001/04/18 01:31:15 $
  + * @version $Revision: 1.3.2.1 $ $Date: 2001/06/01 20:42:28 $
*/
   
   public class RadioTag extends BaseHandlerTag {
  @@ -224,7 +224,7 @@
results.append(this.value);
results.append("\"");
if (value.equals(current))
  - results.append(" checked");
  + results.append(" checked=\"true\"");
results.append(prepareEventHandlers());
results.append(prepareStyles());
results.append(">");
  
  
  



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html BaseHandlerTag.java CheckboxTag.java MultiboxTag.java OptionTag.java OptionsTag.java SelectTag.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 13:39:43

  Modified:src/share/org/apache/struts/taglib/html Tag:
STRUTS_1_0_BRANCH BaseHandlerTag.java
CheckboxTag.java MultiboxTag.java OptionTag.java
OptionsTag.java SelectTag.java
  Log:
  Replace all occurrences of generating HTML with "attribute minimization"
  (i.e. the "checked", "disabled", "multiple", "readonly", and "selected"
  attributes) with corresponding constructs such as 'checked="true"'.  This
  still works fine in current generation browsers, but is more friendly to
  XML and XHTML oriented output pages.
  
  PR:  Bugzilla #1943
  Submitted by: Paresh Gondalia <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.3.2.1   +6 -6  
jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java
  
  Index: BaseHandlerTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- BaseHandlerTag.java   2001/05/05 00:54:33 1.3
  +++ BaseHandlerTag.java   2001/06/01 20:39:42 1.3.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v 
1.3 2001/05/05 00:54:33 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/05/05 00:54:33 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseHandlerTag.java,v 
1.3.2.1 2001/06/01 20:39:42 craigmcc Exp $
  + * $Revision: 1.3.2.1 $
  + * $Date: 2001/06/01 20:39:42 $
*
* 
*
  @@ -71,7 +71,7 @@
* appropriate implementations of these.
*
* @author Don Clasen
  - * @version $Revision: 1.3 $ $Date: 2001/05/05 00:54:33 $
  + * @version $Revision: 1.3.2.1 $ $Date: 2001/06/01 20:39:42 $
*/
   
   public abstract class BaseHandlerTag extends BodyTagSupport {
  @@ -580,11 +580,11 @@
   }
   
   if (disabled) {
  -handlers.append(" disabled");
  +handlers.append(" disabled=\"true\"");
   }
   
   if (readonly) {
  -handlers.append(" readonly");
  +handlers.append(" readonly=\"true\"");
   }
   
   }
  
  
  
  1.4.2.1   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java
  
  Index: CheckboxTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- CheckboxTag.java  2001/04/18 01:31:14 1.4
  +++ CheckboxTag.java  2001/06/01 20:39:43 1.4.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java,v 
1.4 2001/04/18 01:31:14 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/04/18 01:31:14 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/CheckboxTag.java,v 
1.4.2.1 2001/06/01 20:39:43 craigmcc Exp $
  + * $Revision: 1.4.2.1 $
  + * $Date: 2001/06/01 20:39:43 $
*
* 
*
  @@ -76,7 +76,7 @@
* Tag for input fields of type "checkbox".
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.4 $ $Date: 2001/04/18 01:31:14 $
  + * @version $Revision: 1.4.2.1 $ $Date: 2001/06/01 20:39:43 $
*/
   
   public class CheckboxTag extends BaseHandlerTag {
  @@ -212,7 +212,7 @@
if (checked.equalsIgnoreCase("true")
   || checked.equalsIgnoreCase("yes")
|| checked.equalsIgnoreCase("on"))
  - results.append(" checked");
  + results.append(" checked=\"true\"");
results.append(prepareEventHandlers());
results.append(prepareStyles());
results.append(">");
  
  
  
  1.6.2.1   +5 -5  
jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java
  
  Index: MultiboxTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- MultiboxTag.java  2001/04/18 23:45:02 1.6
  +++ MultiboxTag.java  2001/06/01 20:39:43 1.6.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java,v 
1.6 2001/04/18 23:45:02 craigmcc Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/04/18 23:45:02 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java,v 
1.6.2.1 2001/06/01 20:39:43 craigmcc E

cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 13:22:22

  Modified:src/share/org/apache/struts/util RequestUtils.java
  Log:
  Port the fix for generating & instead of &.
  
  Revision  ChangesPath
  1.16  +7 -7  
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- RequestUtils.java 2001/06/01 18:58:39 1.15
  +++ RequestUtils.java 2001/06/01 20:22:21 1.16
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.15 
2001/06/01 18:58:39 craigmcc Exp $
  - * $Revision: 1.15 $
  - * $Date: 2001/06/01 18:58:39 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.16 
2001/06/01 20:22:21 craigmcc Exp $
  + * $Revision: 1.16 $
  + * $Date: 2001/06/01 20:22:21 $
*
* 
*
  @@ -95,7 +95,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.15 $ $Date: 2001/06/01 18:58:39 $
  + * @version $Revision: 1.16 $ $Date: 2001/06/01 20:22:21 $
*/
   
   public class RequestUtils {
  @@ -364,7 +364,7 @@
   url.append('?');
   question = true;
   } else
  -url.append('&');
  +url.append("&");
   url.append(URLEncoder.encode(key));
   url.append('='); // Interpret null as "no value"
   } else if (value instanceof String) {
  @@ -372,7 +372,7 @@
   url.append('?');
   question = true;
   } else
  -url.append('&');
  +url.append("&");
   url.append(URLEncoder.encode(key));
   url.append('=');
   url.append(URLEncoder.encode((String) value));
  @@ -383,7 +383,7 @@
   url.append('?');
   question = true;
   } else
  -url.append('&');
  +url.append("&");
   url.append(URLEncoder.encode(key));
   url.append('=');
   url.append(URLEncoder.encode(values[i]));
  
  
  



jakarta.apache.org and ssh

2001-06-01 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)

I sent this to the jakarta-general list, but I figured I'd send it here
too...

jakarta.apache.org keeps refusing my password when I ssh to it, anyone else
know of this problem? Craig?



cvs commit: jakarta-struts/src/share/org/apache/struts/util RequestUtils.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 13:21:41

  Modified:src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
RequestUtils.java
  Log:
  Generate "&" instead of "&" in request URIs so that the output is still
  legal XML syntax in the value returned by computeURL().
  
  PR:  Bugzilla #1938
  Submitted by :  Alessandro Vernet <[EMAIL PROTECTED]> (also supplied
  the patch - thanks!)
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.14.2.2  +7 -7  
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.14.2.1
  retrieving revision 1.14.2.2
  diff -u -r1.14.2.1 -r1.14.2.2
  --- RequestUtils.java 2001/06/01 18:45:03 1.14.2.1
  +++ RequestUtils.java 2001/06/01 20:21:40 1.14.2.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.1 
2001/06/01 18:45:03 craigmcc Exp $
  - * $Revision: 1.14.2.1 $
  - * $Date: 2001/06/01 18:45:03 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.2 
2001/06/01 20:21:40 craigmcc Exp $
  + * $Revision: 1.14.2.2 $
  + * $Date: 2001/06/01 20:21:40 $
*
* 
*
  @@ -95,7 +95,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14.2.1 $ $Date: 2001/06/01 18:45:03 $
  + * @version $Revision: 1.14.2.2 $ $Date: 2001/06/01 20:21:40 $
*/
   
   public class RequestUtils {
  @@ -364,7 +364,7 @@
   url.append('?');
   question = true;
   } else
  -url.append('&');
  +url.append("&");
   url.append(URLEncoder.encode(key));
   url.append('='); // Interpret null as "no value"
   } else if (value instanceof String) {
  @@ -372,7 +372,7 @@
   url.append('?');
   question = true;
   } else
  -url.append('&');
  +url.append("&");
   url.append(URLEncoder.encode(key));
   url.append('=');
   url.append(URLEncoder.encode((String) value));
  @@ -383,7 +383,7 @@
   url.append('?');
   question = true;
   } else
  -url.append('&');
  +url.append("&");
   url.append(URLEncoder.encode(key));
   url.append('=');
   url.append(URLEncoder.encode(values[i]));
  
  
  



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html OptionsTag.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 13:16:03

  Modified:src/share/org/apache/struts/taglib/html OptionsTag.java
  Log:
  Port the fix for bugzilla #1936.
  
  Revision  ChangesPath
  1.9   +25 -3 
jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java
  
  Index: OptionsTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- OptionsTag.java   2001/05/20 21:21:23 1.8
  +++ OptionsTag.java   2001/06/01 20:16:02 1.9
  @@ -193,13 +193,31 @@
   if (collection != null) {
   Iterator collIterator = getIterator(collection, null);
   while (collIterator.hasNext()) {
  +
   Object bean = collIterator.next();
   Object value = null;
   Object label = null;;
  +
   try {
   value = PropertyUtils.getProperty(bean, property);
   if (value == null)
   value = "";
  +} catch (IllegalAccessException e) {
  +throw new JspException
  +(messages.getMessage("getter.access",
  + property, collection));
  +} catch (InvocationTargetException e) {
  +Throwable t = e.getTargetException();
  +throw new JspException
  +(messages.getMessage("getter.result",
  + property, t.toString()));
  +} catch (NoSuchMethodException e) {
  +throw new JspException
  +(messages.getMessage("getter.method",
  + property, collection));
  +}
  +
  +try {
   if (labelProperty != null)
   label =
   PropertyUtils.getProperty(bean, labelProperty);
  @@ -210,21 +228,25 @@
   } catch (IllegalAccessException e) {
   throw new JspException
   (messages.getMessage("getter.access",
  - property, collection));
  + labelProperty, collection));
   } catch (InvocationTargetException e) {
   Throwable t = e.getTargetException();
   throw new JspException
   (messages.getMessage("getter.result",
  - property, t.toString()));
  + labelProperty, t.toString()));
   } catch (NoSuchMethodException e) {
   throw new JspException
   (messages.getMessage("getter.method",
  - property, collection));
  + labelProperty, collection));
   }
  +
  +
   String stringValue = value.toString();
   addOption(sb, stringValue, label.toString(),
 selectTag.isMatched(stringValue));
  +
   }
  +
   }
   
   // Otherwise, use the separate iterators mode to render options
  
  
  



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html OptionsTag.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 13:14:47

  Modified:src/share/org/apache/struts/taglib/html Tag:
STRUTS_1_0_BRANCH OptionsTag.java
  Log:
  Report the correct property name if the labelProperty attribute is
  incorrect on an  tag.
  
  PR: Bugzilla #1936
  Submitted by: Zane Rockenbaugh <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.7.2.2   +25 -3 
jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java
  
  Index: OptionsTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/OptionsTag.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- OptionsTag.java   2001/05/20 21:20:10 1.7.2.1
  +++ OptionsTag.java   2001/06/01 20:14:46 1.7.2.2
  @@ -193,13 +193,31 @@
   if (collection != null) {
   Iterator collIterator = getIterator(collection, null);
   while (collIterator.hasNext()) {
  +
   Object bean = collIterator.next();
   Object value = null;
   Object label = null;;
  +
   try {
   value = PropertyUtils.getProperty(bean, property);
   if (value == null)
   value = "";
  +} catch (IllegalAccessException e) {
  +throw new JspException
  +(messages.getMessage("getter.access",
  + property, collection));
  +} catch (InvocationTargetException e) {
  +Throwable t = e.getTargetException();
  +throw new JspException
  +(messages.getMessage("getter.result",
  + property, t.toString()));
  +} catch (NoSuchMethodException e) {
  +throw new JspException
  +(messages.getMessage("getter.method",
  + property, collection));
  +}
  +
  +try {
   if (labelProperty != null)
   label =
   PropertyUtils.getProperty(bean, labelProperty);
  @@ -210,21 +228,25 @@
   } catch (IllegalAccessException e) {
   throw new JspException
   (messages.getMessage("getter.access",
  - property, collection));
  + labelProperty, collection));
   } catch (InvocationTargetException e) {
   Throwable t = e.getTargetException();
   throw new JspException
   (messages.getMessage("getter.result",
  - property, t.toString()));
  + labelProperty, t.toString()));
   } catch (NoSuchMethodException e) {
   throw new JspException
   (messages.getMessage("getter.method",
  - property, collection));
  + labelProperty, collection));
   }
  +
  +
   String stringValue = value.toString();
   addOption(sb, stringValue, label.toString(),
 selectTag.isMatched(stringValue));
  +
   }
  +
   }
   
   // Otherwise, use the separate iterators mode to render options
  
  
  



RE: display xml format

2001-06-01 Thread Wu, Ying (LNG-CIS)

Ted,

It works!

Thanks and have a nice weekend.

Ying

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 3:44 PM
To: [EMAIL PROTECTED]
Subject: Re: display xml format


I'm not sure if this is the answer to your question, but if you are
writing directly to the client from Action.perform() you can return null
to tell the ActionServlet that the request has already been fulfilled.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

"Wu, Ying (LNG-CIS)" wrote:
> 
> I need to send a string which represents a xml file to browser, I need to
> call response.setContentType("text/xml").  But it is at ActionServlet
level
> and is default to "text/html" thus browser ignores xml tags,
> "long" will only show "long".
> 
> I can do the output at MyAction.perform() level, but how to bypass the
> return part of this method?
> 
> Thanks.
> 
> Ying



Re: display xml format

2001-06-01 Thread Ted Husted

I'm not sure if this is the answer to your question, but if you are
writing directly to the client from Action.perform() you can return null
to tell the ActionServlet that the request has already been fulfilled.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

"Wu, Ying (LNG-CIS)" wrote:
> 
> I need to send a string which represents a xml file to browser, I need to
> call response.setContentType("text/xml").  But it is at ActionServlet level
> and is default to "text/html" thus browser ignores xml tags,
> "long" will only show "long".
> 
> I can do the output at MyAction.perform() level, but how to bypass the
> return part of this method?
> 
> Thanks.
> 
> Ying



cvs commit: jakarta-struts build.xml

2001-06-01 Thread craigmcc

craigmcc01/06/01 12:19:31

  Modified:.build.xml
  Log:
  Update the version number in build.xml to reflect that the HEAD branch is
  focused on 1.1 development.
  PR: Bugzilla #1913
  Submitted by: Martin Cooper <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.54  +1 -1  jakarta-struts/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- build.xml 2001/05/20 20:43:38 1.53
  +++ build.xml 2001/06/01 19:19:27 1.54
  @@ -82,7 +82,7 @@
   
   
   
  -
  +
   
   
   
  
  
  



cvs commit: jakarta-struts/web/exercise-taglib/WEB-INF struts-config.xml

2001-06-01 Thread craigmcc

craigmcc01/06/01 11:58:48

  Modified:doc  struts-html.xml
   src/share/org/apache/struts/util RequestUtils.java
   web/exercise-taglib index.jsp
   web/exercise-taglib/WEB-INF struts-config.xml
  Added:   web/exercise-taglib html-link.jsp
  Log:
  Port fixes for #1891 from the 1.0 branch.
  
  Revision  ChangesPath
  1.13  +4 -2  jakarta-struts/doc/struts-html.xml
  
  Index: struts-html.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/struts-html.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- struts-html.xml   2001/05/29 18:05:56 1.12
  +++ struts-html.xml   2001/06/01 18:58:35 1.13
  @@ -1707,7 +1707,8 @@
   to be the names of query parameters to be appended to the
   src URL.  The value associated with each key
   must be either a String or a String array representing the
  -parameter value(s).  If a String array is specified, more than
  +parameter value(s), or an object whose toString() method
  +will be called.  If a String array is specified, more than
   one value for the same query parameter name will be
   created.
   
  @@ -2172,7 +2173,8 @@
   As the Map is processed, the keys are assumed
   to be the names of query parameters to be appended to the
   hyperlink.  The value associated with each key must be either
  -a String or a String array representing the parameter value(s).
  +a String or a String array representing the parameter value(s),
  +or an object whose toString() method will be called.
   If a String array is specified, more than one value for the
   same query parameter name will be created.
   
  
  
  
  1.15  +14 -5 
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- RequestUtils.java 2001/05/12 22:35:43 1.14
  +++ RequestUtils.java 2001/06/01 18:58:39 1.15
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14 
2001/05/12 22:35:43 craigmcc Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/05/12 22:35:43 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.15 
2001/06/01 18:58:39 craigmcc Exp $
  + * $Revision: 1.15 $
  + * $Date: 2001/06/01 18:58:39 $
*
* 
*
  @@ -95,7 +95,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2001/05/12 22:35:43 $
  + * @version $Revision: 1.15 $ $Date: 2001/06/01 18:58:39 $
*/
   
   public class RequestUtils {
  @@ -376,7 +376,7 @@
   url.append(URLEncoder.encode(key));
   url.append('=');
   url.append(URLEncoder.encode((String) value));
  -} else /* if (value instanceof String[]) */ {
  +} else if (value instanceof String[]) {
   String values[] = (String[]) value;
   for (int i = 0; i < values.length; i++) {
   if (!question) {
  @@ -388,6 +388,15 @@
   url.append('=');
   url.append(URLEncoder.encode(values[i]));
   }
  +} else /* Convert other objects to a string */ {
  +if (!question) {
  +url.append('?');
  +question = true;
  +} else
  +url.append('&');
  +url.append(URLEncoder.encode(key));
  +url.append('=');
  +url.append(URLEncoder.encode(value.toString()));
   }
   }
   
  
  
  
  1.2   +1 -0  jakarta-struts/web/exercise-taglib/index.jsp
  
  Index: index.jsp
  ===
  RCS file: /home/cvs/jakarta-struts/web/exercise-taglib/index.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.jsp 2001/03/07 04:50:54 1.1
  +++ index.jsp 2001/06/01 18:58:44 1.2
  @@ -22,6 +22,7 @@
   
   HTML Tags
   
  +
   
   
   Scalar Setters
  
  
  
  1.2   +144 -0jakarta-struts/web/exercise-taglib/html-link.jsp
  
  
  
  
  1.4   +8 -0  jakarta-struts/web/

cvs commit: jakarta-struts/doc struts-html.xml

2001-06-01 Thread craigmcc

craigmcc01/06/01 11:50:50

  Modified:doc  Tag: STRUTS_1_0_BRANCH struts-html.xml
  Log:
  Relax the constraint on what can be in a Map used to add dynamic request
  parameters to the URL created by the , , and
   tags.  Now, the Map values can be:
  * A String
  * A String array (creates multiple values)
  * Some other object, whose toString() method will be called
to render the value included in the URL.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.11.2.2  +4 -2  jakarta-struts/doc/struts-html.xml
  
  Index: struts-html.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/struts-html.xml,v
  retrieving revision 1.11.2.1
  retrieving revision 1.11.2.2
  diff -u -r1.11.2.1 -r1.11.2.2
  --- struts-html.xml   2001/05/29 18:03:51 1.11.2.1
  +++ struts-html.xml   2001/06/01 18:50:48 1.11.2.2
  @@ -1707,7 +1707,8 @@
   to be the names of query parameters to be appended to the
   src URL.  The value associated with each key
   must be either a String or a String array representing the
  -parameter value(s).  If a String array is specified, more than
  +parameter value(s), or an object whose toString() method
  +will be called.  If a String array is specified, more than
   one value for the same query parameter name will be
   created.
   
  @@ -2172,7 +2173,8 @@
   As the Map is processed, the keys are assumed
   to be the names of query parameters to be appended to the
   hyperlink.  The value associated with each key must be either
  -a String or a String array representing the parameter value(s).
  +a String or a String array representing the parameter value(s),
  +or an object whose toString() method will be called.
   If a String array is specified, more than one value for the
   same query parameter name will be created.
   
  
  
  



cvs commit: jakarta-struts/web/exercise-taglib html-link.jsp

2001-06-01 Thread craigmcc

craigmcc01/06/01 11:45:10

  Modified:src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
RequestUtils.java
   web/exercise-taglib Tag: STRUTS_1_0_BRANCH html-link.jsp
  Log:
  Update RequestUtils.computeURL() so that it will properly deal with
  non-String objects in the Map specified by "name" (or "name" and
  "property").  The appropriate toString() will be called.
  
  Update the new html-link.jsp test page to exercise this functionality.
  
  This fixes the problem reported in Bugzilla #1891 -- also need to update
  the docs to reflect the loosened restrictions on what can be in the Map.
  
  PR: Bugzilla #1891
  Submitted by: Levi Cook <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.14.2.1  +14 -5 
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.14
  retrieving revision 1.14.2.1
  diff -u -r1.14 -r1.14.2.1
  --- RequestUtils.java 2001/05/12 22:35:43 1.14
  +++ RequestUtils.java 2001/06/01 18:45:03 1.14.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14 
2001/05/12 22:35:43 craigmcc Exp $
  - * $Revision: 1.14 $
  - * $Date: 2001/05/12 22:35:43 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.1 
2001/06/01 18:45:03 craigmcc Exp $
  + * $Revision: 1.14.2.1 $
  + * $Date: 2001/06/01 18:45:03 $
*
* 
*
  @@ -95,7 +95,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14 $ $Date: 2001/05/12 22:35:43 $
  + * @version $Revision: 1.14.2.1 $ $Date: 2001/06/01 18:45:03 $
*/
   
   public class RequestUtils {
  @@ -376,7 +376,7 @@
   url.append(URLEncoder.encode(key));
   url.append('=');
   url.append(URLEncoder.encode((String) value));
  -} else /* if (value instanceof String[]) */ {
  +} else if (value instanceof String[]) {
   String values[] = (String[]) value;
   for (int i = 0; i < values.length; i++) {
   if (!question) {
  @@ -388,6 +388,15 @@
   url.append('=');
   url.append(URLEncoder.encode(values[i]));
   }
  +} else /* Convert other objects to a string */ {
  +if (!question) {
  +url.append('?');
  +question = true;
  +} else
  +url.append('&');
  +url.append(URLEncoder.encode(key));
  +url.append('=');
  +url.append(URLEncoder.encode(value.toString()));
   }
   }
   
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.1.2.2   +13 -3 jakarta-struts/web/exercise-taglib/Attic/html-link.jsp
  
  Index: html-link.jsp
  ===
  RCS file: /home/cvs/jakarta-struts/web/exercise-taglib/Attic/html-link.jsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- html-link.jsp 2001/06/01 18:14:30 1.1.2.1
  +++ html-link.jsp 2001/06/01 18:45:08 1.1.2.2
  @@ -9,8 +9,10 @@
 String newValue = "New string value";
 pageContext.setAttribute("newValue", newValue);
 java.util.HashMap newValues = new java.util.HashMap();
  -  newValues.put("floatProperty", "444.0");
  -  newValues.put("intProperty", "555");
  +  newValues.put("floatProperty", new Float(444.0));
  +  newValues.put("intProperty", new Integer(555));
  +  newValues.put("stringArray", new String[]
  +   { "Value 1", "Value 2", "Value 3" });
 pageContext.setAttribute("newValues", newValues);
   %>
   
  @@ -66,6 +68,14 @@
 
   
 
  +stringArray
  +
  +  
  +  
  +
  +  
  +
  +  
   
 Hyperlinks To Be Tested
   
  @@ -110,7 +120,7 @@
   
 
  -Float and int via name (Map)
  +Float, int, and stringArray via name (Map)
 
   
 
  
  
  



cvs commit: jakarta-struts/web/exercise-taglib/WEB-INF struts-config.xml

2001-06-01 Thread craigmcc

craigmcc01/06/01 11:14:32

  Modified:web/exercise-taglib Tag: STRUTS_1_0_BRANCH index.jsp
   web/exercise-taglib/WEB-INF Tag: STRUTS_1_0_BRANCH
struts-config.xml
  Added:   web/exercise-taglib Tag: STRUTS_1_0_BRANCH html-link.jsp
  Log:
  Add a test page for the various ways to generate links with parameters in
  the  tag.  Right now, the test for using a Map still requires
  Strings -- that will get updated shortly.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +1 -0  jakarta-struts/web/exercise-taglib/index.jsp
  
  Index: index.jsp
  ===
  RCS file: /home/cvs/jakarta-struts/web/exercise-taglib/index.jsp,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- index.jsp 2001/03/07 04:50:54 1.1
  +++ index.jsp 2001/06/01 18:14:30 1.1.2.1
  @@ -22,6 +22,7 @@
   
   HTML Tags
   
  +
   
   
   Scalar Setters
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +134 -0jakarta-struts/web/exercise-taglib/Attic/html-link.jsp
  
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.3.2.1   +8 -0  jakarta-struts/web/exercise-taglib/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===
  RCS file: /home/cvs/jakarta-struts/web/exercise-taglib/WEB-INF/struts-config.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- struts-config.xml 2001/04/11 01:56:15 1.3
  +++ struts-config.xml 2001/06/01 18:14:32 1.3.2.1
  @@ -17,6 +17,14 @@
   
 
   
  +
  +  
  +
  +
   


Extention of struts - BeanFactory

2001-06-01 Thread Oleg V Alexeev

Hello struts-dev,

  I am glad to publish pre-alpha version of
  BeanFactory - extention of struts framework,
  intended to simplify processes of data publishing.
  
  Main idea of it - to move functionality to declarations.

  You can find short info about BeanFactory, sources, precompiled
  binaries and sample web allication (needs some configure in database
  access) at page -
   http://www.sura.ru/~gonza/bean-factory

-- 
Best regards,
 Oleg  mailto:[EMAIL PROTECTED]





cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html ButtonTag.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 10:13:39

  Modified:src/share/org/apache/struts/taglib/html ButtonTag.java
  Log:
  Port fix for Bugzilla #1890.
  
  Revision  ChangesPath
  1.4   +20 -4 
jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java
  
  Index: ButtonTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ButtonTag.java2001/04/18 01:31:14 1.3
  +++ ButtonTag.java2001/06/01 17:13:36 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v 1.3 
2001/04/18 01:31:14 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/04/18 01:31:14 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v 1.4 
2001/06/01 17:13:36 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/06/01 17:13:36 $
*
* 
*
  @@ -74,7 +74,7 @@
* Renders an HTML BUTTON tag within the Struts framework.
*
* @author Don Clasen
  - * @version $Revision: 1.3 $ $Date: 2001/04/18 01:31:14 $
  + * @version $Revision: 1.4 $ $Date: 2001/06/01 17:13:36 $
*/
   
   public class ButtonTag extends BaseHandlerTag {
  @@ -152,6 +152,22 @@
   
   }
   
  +
  +/**
  + * Save the associated label from the body content (if any).
  + * @exception JspException if a JSP exception has occurred
  + */
  +public int doAfterBody() throws JspException {
  +
  +if (bodyContent != null) {
  +String value = bodyContent.getString().trim();
  +if (value.length() > 0)
  +text = value;
  +}
  +return (SKIP_BODY);
  +
  +}
  +
   
   /**
* Process the end of this tag.
  
  
  



cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html ButtonTag.java

2001-06-01 Thread craigmcc

craigmcc01/06/01 10:11:47

  Modified:src/share/org/apache/struts/taglib/html Tag:
STRUTS_1_0_BRANCH ButtonTag.java
  Log:
  Restore the ability of the  tag to grab it's text from the
  nested body content (typically an internationalized message).
  
  Thanks to Hal Deadman (as always :-) for the patch.
  
  PR: Bugzilla #1890
  Submitted by: Thane Eisener <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.3.2.1   +20 -4 
jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java
  
  Index: ButtonTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- ButtonTag.java2001/04/18 01:31:14 1.3
  +++ ButtonTag.java2001/06/01 17:11:45 1.3.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v 1.3 
2001/04/18 01:31:14 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/04/18 01:31:14 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/ButtonTag.java,v 
1.3.2.1 2001/06/01 17:11:45 craigmcc Exp $
  + * $Revision: 1.3.2.1 $
  + * $Date: 2001/06/01 17:11:45 $
*
* 
*
  @@ -74,7 +74,7 @@
* Renders an HTML BUTTON tag within the Struts framework.
*
* @author Don Clasen
  - * @version $Revision: 1.3 $ $Date: 2001/04/18 01:31:14 $
  + * @version $Revision: 1.3.2.1 $ $Date: 2001/06/01 17:11:45 $
*/
   
   public class ButtonTag extends BaseHandlerTag {
  @@ -152,6 +152,22 @@
   
   }
   
  +
  +/**
  + * Save the associated label from the body content (if any).
  + * @exception JspException if a JSP exception has occurred
  + */
  +public int doAfterBody() throws JspException {
  +
  +if (bodyContent != null) {
  +String value = bodyContent.getString().trim();
  +if (value.length() > 0)
  +text = value;
  +}
  +return (SKIP_BODY);
  +
  +}
  +
   
   /**
* Process the end of this tag.
  
  
  



Re: [GUMP] Build Failure - Struts

2001-06-01 Thread Paul Speed



"Craig R. McClanahan" wrote:
> 
> As Sam Ruby warned us, GUMP is currently experimenting with using the JDK
> 1.4 beta release for Linux.  The failures below are caused by the addition
> of new methods to some of the javax.sql interfaces -- everything works
> fine in JDK 1.2 and 1.3.
> 
> For what it's worth, this is the kind of thing that motivated me to switch
> must of the Struts public APIs from interfaces to base classes.  Using
> interfaces, adding a new method later breaks *all* old code.

I agree, but an even better pattern (usually) is to use interfaces
but to provide base classes for standard use that implement the 
interfaces.  This allows people to deal with the burs of implementing
the interfaces directly if they are under other restrictions about
what their superclasses must be.

-Paul Speed

> 
> Craig
> 
> On 1 Jun 2001, Craig McClanahan wrote:
> 
> > 
> > This email is autogenerated from the output from:
> > 
> > 
> >
> > Buildfile: build.xml
> >
> > init:
> >  [echo] - jakarta-struts 1.0-b1 -
> >  [echo]
> >  [echo] java.class.path = 
>.:/usr/java/j2sdk1.4.0/lib/tools.jar:/usr/java/j2sdk1.4.0/jre/lib/rt.jar:/home/rubys/jakarta/jakarta-struts/target/library/struts.jar:/home/rubys/jakarta/xml-xerces/java/build/xerces.jar:/home/rubys/jakarta/xml-xalan/java/build/xalan.jar:/opt/jdbc2_0/jdbc2_0-stdext.jar:/home/rubys/jakarta/jakarta-ant/dist/lib/ant.jar:/home/rubys/jakarta/jakarta-ant/dist/lib/optional.jar:/home/rubys/jakarta/jakarta-servletapi-4/lib/servlet.jar
> >  [echo] java.home = /usr/java/j2sdk1.4.0/jre
> >  [echo] user.home = /home/rubys
> >
> > prepare.dist:
> > [mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist
> > [mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist/lib
> > [mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist/webapps
> >
> > prepare.library:
> > [mkdir] Created dir: 
>/home/rubys/jakarta/jakarta-struts/target/library/classes/META-INF/tlds
> > [mkdir] Created dir: 
>/home/rubys/jakarta/jakarta-struts/target/library/classes/org/apache/struts/resources
> >  [copy] Copying 3 files to 
>/home/rubys/jakarta/jakarta-struts/target/library/classes/org/apache/struts/resources
> >  [copy] Copying 1 file to /home/rubys/jakarta/jakarta-struts/target/library
> >
> > compile.library:
> > [javac] Compiling 132 source files to 
>/home/rubys/jakarta/jakarta-struts/target/library/classes
> > [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.CallableStatement prepareCall(java.lang.String, int, int, int) 
>from interface java.sql.Connection.
> > [javac] public class GenericConnection implements Connection {
> > [javac]  ^
> > [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.Statement createStatement(int, int, int) from interface 
>java.sql.Connection.
> > [javac] public class GenericConnection implements Connection {
> > [javac]  ^
> > [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.Savepoint setSavepoint() from interface java.sql.Connection.
> > [javac] public class GenericConnection implements Connection {
> > [javac]  ^
> > [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.Savepoint setSavepoint(java.lang.String) from interface 
>java.sql.Connection.
> > [javac] public class GenericConnection implements Connection {
> > [javac]  ^
> > [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define void rollback(java.sql.Savepoint) from interface java.sql.Connection.
> > [javac] public class GenericConnection implements Connection {
> > [javac]  ^
> > [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.PreparedStatement prepareStatement(java.lang.String, int, int, 
>int) from interface java.sql.Connection.
> > [javac] public class GenericConnection implements Connecti

Re: [GUMP] Build Failure - Struts

2001-06-01 Thread Craig R. McClanahan

As Sam Ruby warned us, GUMP is currently experimenting with using the JDK
1.4 beta release for Linux.  The failures below are caused by the addition
of new methods to some of the javax.sql interfaces -- everything works
fine in JDK 1.2 and 1.3.

For what it's worth, this is the kind of thing that motivated me to switch
must of the Struts public APIs from interfaces to base classes.  Using
interfaces, adding a new method later breaks *all* old code.

Craig


On 1 Jun 2001, Craig McClanahan wrote:

> 
> This email is autogenerated from the output from:
> 
> 
> 
> Buildfile: build.xml
> 
> init:
>  [echo] - jakarta-struts 1.0-b1 -
>  [echo] 
>  [echo] java.class.path = 
>.:/usr/java/j2sdk1.4.0/lib/tools.jar:/usr/java/j2sdk1.4.0/jre/lib/rt.jar:/home/rubys/jakarta/jakarta-struts/target/library/struts.jar:/home/rubys/jakarta/xml-xerces/java/build/xerces.jar:/home/rubys/jakarta/xml-xalan/java/build/xalan.jar:/opt/jdbc2_0/jdbc2_0-stdext.jar:/home/rubys/jakarta/jakarta-ant/dist/lib/ant.jar:/home/rubys/jakarta/jakarta-ant/dist/lib/optional.jar:/home/rubys/jakarta/jakarta-servletapi-4/lib/servlet.jar
>  [echo] java.home = /usr/java/j2sdk1.4.0/jre
>  [echo] user.home = /home/rubys
> 
> prepare.dist:
> [mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist
> [mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist/lib
> [mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist/webapps
> 
> prepare.library:
> [mkdir] Created dir: 
>/home/rubys/jakarta/jakarta-struts/target/library/classes/META-INF/tlds
> [mkdir] Created dir: 
>/home/rubys/jakarta/jakarta-struts/target/library/classes/org/apache/struts/resources
>  [copy] Copying 3 files to 
>/home/rubys/jakarta/jakarta-struts/target/library/classes/org/apache/struts/resources
>  [copy] Copying 1 file to /home/rubys/jakarta/jakarta-struts/target/library
> 
> compile.library:
> [javac] Compiling 132 source files to 
>/home/rubys/jakarta/jakarta-struts/target/library/classes
> [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.CallableStatement prepareCall(java.lang.String, int, int, int) 
>from interface java.sql.Connection.
> [javac] public class GenericConnection implements Connection {
> [javac]  ^
> [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.Statement createStatement(int, int, int) from interface 
>java.sql.Connection.
> [javac] public class GenericConnection implements Connection {
> [javac]  ^
> [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.Savepoint setSavepoint() from interface java.sql.Connection.
> [javac] public class GenericConnection implements Connection {
> [javac]  ^
> [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.Savepoint setSavepoint(java.lang.String) from interface 
>java.sql.Connection.
> [javac] public class GenericConnection implements Connection {
> [javac]  ^
> [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define void rollback(java.sql.Savepoint) from interface java.sql.Connection.
> [javac] public class GenericConnection implements Connection {
> [javac]  ^
> [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.PreparedStatement prepareStatement(java.lang.String, int, int, 
>int) from interface java.sql.Connection.
> [javac] public class GenericConnection implements Connection {
> [javac]  ^
> [javac] 
>/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
> class org.apache.struts.util.GenericConnection must be declared abstract. It does 
>not define java.sql.PreparedStatement prepareStatement(java.lang.String, int) from 
>interface java.sql.Connection.
> [javac] public class GenericConnection implements Connection {
> [javac]  ^
> [javac]

[GUMP] Build Failure - Struts

2001-06-01 Thread Craig McClanahan


This email is autogenerated from the output from:



Buildfile: build.xml

init:
 [echo] - jakarta-struts 1.0-b1 -
 [echo] 
 [echo] java.class.path = 
.:/usr/java/j2sdk1.4.0/lib/tools.jar:/usr/java/j2sdk1.4.0/jre/lib/rt.jar:/home/rubys/jakarta/jakarta-struts/target/library/struts.jar:/home/rubys/jakarta/xml-xerces/java/build/xerces.jar:/home/rubys/jakarta/xml-xalan/java/build/xalan.jar:/opt/jdbc2_0/jdbc2_0-stdext.jar:/home/rubys/jakarta/jakarta-ant/dist/lib/ant.jar:/home/rubys/jakarta/jakarta-ant/dist/lib/optional.jar:/home/rubys/jakarta/jakarta-servletapi-4/lib/servlet.jar
 [echo] java.home = /usr/java/j2sdk1.4.0/jre
 [echo] user.home = /home/rubys

prepare.dist:
[mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist
[mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist/lib
[mkdir] Created dir: /home/rubys/jakarta/jakarta-struts/dist/webapps

prepare.library:
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-struts/target/library/classes/META-INF/tlds
[mkdir] Created dir: 
/home/rubys/jakarta/jakarta-struts/target/library/classes/org/apache/struts/resources
 [copy] Copying 3 files to 
/home/rubys/jakarta/jakarta-struts/target/library/classes/org/apache/struts/resources
 [copy] Copying 1 file to /home/rubys/jakarta/jakarta-struts/target/library

compile.library:
[javac] Compiling 132 source files to 
/home/rubys/jakarta/jakarta-struts/target/library/classes
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.CallableStatement prepareCall(java.lang.String, int, int, int) from 
interface java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.Statement createStatement(int, int, int) from interface 
java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.Savepoint setSavepoint() from interface java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.Savepoint setSavepoint(java.lang.String) from interface 
java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define void rollback(java.sql.Savepoint) from interface java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.PreparedStatement prepareStatement(java.lang.String, int, int, int) 
from interface java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.PreparedStatement prepareStatement(java.lang.String, int) from 
interface java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.PreparedStatement prepareStatement(java.lang.String, int[]) from 
interface java.sql.Connection.
[javac] public class GenericConnection implements Connection {
[javac]  ^
[javac] 
/home/rubys/jakarta/jakarta-struts/src/share/org/apache/struts/util/GenericConnection.java:89:
 class org.apache.struts.util.GenericConnection must be declared abstract. It does not 
define java.sql.PreparedStatement prepareSt

display xml format

2001-06-01 Thread Wu, Ying (LNG-CIS)

I need to send a string which represents a xml file to browser, I need to
call response.setContentType("text/xml").  But it is at ActionServlet level
and is default to "text/html" thus browser ignores xml tags,
"long" will only show "long".

I can do the output at MyAction.perform() level, but how to bypass the
return part of this method?

Thanks.

Ying




Re: Need a Good Example Which uses Struts

2001-06-01 Thread Ted Husted

I believe everything written about Struts is referenced at 

< http://www.husted.com/about/struts/ >

(And if I missed anything, someone please let me know!)

If the one you mentioned is "Strut by Strut", note that it was just
updated a few days ago, with some more about integrating Struts with
your model. I'll be adding some more later today about implementing
search lists and linking to other pages (master/detail pattern).

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Ravindra Sharma wrote:
> 
> Hi Folks,
> 
> I was looking for a good example which can explain practical how to use Struts. The 
>one available with Zip file is helping me much if I am missing something please let 
>me know.
> 
> Thanks,
> -ravi



Re: Proposed feature: Bean property transformations

2001-06-01 Thread Ted Husted

What I'm missing is a comprehensive, general package for converting data
types and formatting properties for presentation. Most of this
functionality is available somewhere in java and javax space, but it's
spread around.

What would be most useful, I think, is a single, generic package that
provided

(1) validation of Strings using regular expressions (a la David
Winterfeldt's servlet), with direct support for native and JDBC
datatypes,

(2) binary to String and String to binary conversions for all native and
standard types, and support for adding others,

(3) given a formatting specification ("00#.##") and data of any
supported type, return a formatted presentation String, 

(4) support for locale-senstive transformations with (3),

(5) support for extending the formatting specification for unusual
circumstances, and

(6) provide simple date-calculation methods and a countdown presentation
format (seconds, minutes, hours, or days from now until then).

We could then use this helper object during the validation cycle to
convert incoming Strings to the other types needed by business-logic
objects, AND pass through the functionality from a  tag, that could pull a property from a given bean, transform it, and return a 
>formatted String for direct use by the view. 

If there is not something like this already out there, I've very
interested in getting started on this package, since I really, really
need it for my own projects. Could be a nice addition to the Commons ... 

I'm cross-posting this to Struts user in case someone can suggest a
package that already provides this functionality.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


Ron Smith wrote:
> 
> I've been thinking of implementing this feature lately and I haven't
> seen it proposed on this list yet.  Any comments?
> 
> Summary:
> Provide a means to flexibly plug in transformations that could
> be applied to JavaBean properties for presentation in a JSP page.
> What transformation to apply to which JavaBean property
> is specified in the Struts JSP tags (e.g. bean:write).
> Transformations are Java classes that are responsible for taking
> a JavaBean property or any other Object, applying whatever
> transformation, and returning the transformed Object for
> presentation in a JSP page.
> Some example transformations are to format a date in a specific
> format, format decimal numbers, or even to sort a collection in
> a particular order before iterating over the collection's objects.
> 
> Motivation:
> Separating business entity code from presentation-specific code
> is a good thing.  Consider a business entity class called Order.  If
> we want to display the orderPlacedDate attribute in 4 different
> date formats on a JSP page, we could add 4 different methods to
> the Order class to support these 4 different formats.  But we quickly
> end up with a very cluttered Order class and the Order class is too
> coupled to the presentation details.
> One approach I've used is to create presentation wrapper classes
> which hold references to the business entity objects and are
> responsible for all of the presentation specific formatting.  The
> JSP pages access the presentation wrapper classes and not the business
> entity classes.  For sites that access many different business entity
> classes, this can become very tedious.
> A better approach would be to be able to plug-in specific types of
> presentation transformations to be applied to specific JavaBean
> properties that are to be displayed in a JSP page without having to
> create unecessary wrapper classes.
> 
> Details:
> Transformations are coded in transformation classes, all of which
> implement
> a Transformation interface.  This interface has one public method:
> Object transform(Object inObj)
> This method is responsible for applying whatever transformation is
> needed
> to the passed in object and returning a transformed version of the
> object for presentation in a JSP page.
> The transformation objects would be created at initialization based on
> the
> configuration file, and could be initialized with some parameters from
> the
> configuration file (e.g. the date format string to be used for a date
> transformation).  Each transformation has a name associated with it, and
> is
> registered in a hash table based on the name.
> 
> Some of the Struts custom JSP tags would be modified to take an
> additional
> transformation parameter which indicates what transformation is to be
> applied.  For example:
>  transformation="shortDateFormat"/>
> In the above example, the orderPlacedDate property is retrieved
> from the order bean, then the Transformation named "shortDateFormat"
> is looked up in the transformations registry, and applied to the
> property.  Whatever was returned by the transformation is what gets
> displayed on the web page.
> 
> Another benefit is that because the transf