Re: i think i screwed up cvs...

2001-11-21 Thread Craig R. McClanahan

Ack ... I don't know of any "undo" commands for this (hope somebody else
does).  Of course, it is the "-b" part of the command that is the problem
here.

If it can't be undone, life can still go on ... just tag the right files
with "STRUTS_1_0_1_RELEASE" or something, and post a comment to STRUTS-DEV
on what the real tag is (for posterity).

Craig


On Tue, 20 Nov 2001, SCHACHTER,MICHAEL (HP-NewJersey,ex2) wrote:

> Date: Tue, 20 Nov 2001 20:57:29 -0800
> From: "SCHACHTER,MICHAEL (HP-NewJersey,ex2)" <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: i think i screwed up cvs...
>
> Hey,
>
> I did a
> "cvs rtag -b -r STRUTS_1_0 STRUTS_1_0_1 jakarta-struts", thinking
> it would create a local copy of STRUTS_1_0_1 stuff on my
> machine and I created another branch on the CVS repository
> called STRUTS_1_0_1... is there a way to get rid of that
> branch, base it off of STRUTS_1_0_BRANCH instead, or something
> else to un-screwup cvs?
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




initServlet

2001-11-21 Thread Dimitri Valdin


I would like to introduce prefix "pathPrefix" in call to getResourceAsStream, so the 
call

input = getServletContext().getResourceAsStream("/WEB-INF/web.xml");

located in initServlet would look like:

input = getServletContext().getResourceAsStream(pathPrefix + 
"/WEB-INF/web.xml");

with corresponding set/get methods for pathPrefix.

The reason for such change is that we have several web.xml files within the single 
project
and in order strutstest to work we have to set CLASPATH differently for different test 
classes.
While testing from command line in not a problem, since I can set -classpath, but it 
is tedious
with JBuilder, since I have to modify CLASSPATH each time I switch between webapps.

Perhaps you have better ideas.

Dmitri Valdin



--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn 
Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, 
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das 
unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/src/share/org/apache/struts/upload BufferedMultipartInputStream.java MultipartIterator.java

2001-11-21 Thread mschachter

mschachter01/11/20 21:04:36

  Modified:src/share/org/apache/struts/upload Tag: STRUTS_1_0_BRANCH
BufferedMultipartInputStream.java
MultipartIterator.java
  Log:
   - fix #3828, equals() method problem (ported from main branch)
 Submitted By: Curt Hagenlocher
  
   - fix #4427, lost bytes on read(byte[],int,int) (need to port to main branch)
 Submitted By: Mike Goutrie
  
   - fix #4701, premature end of input stream not reported (need to port to main 
branch)
 Submitted By: Roland Huss
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.3.2.4   +40 -40
jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipartInputStream.java
  
  Index: BufferedMultipartInputStream.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipartInputStream.java,v
  retrieving revision 1.3.2.3
  retrieving revision 1.3.2.4
  diff -u -r1.3.2.3 -r1.3.2.4
  --- BufferedMultipartInputStream.java 2001/10/05 20:26:09 1.3.2.3
  +++ BufferedMultipartInputStream.java 2001/11/21 05:04:36 1.3.2.4
  @@ -10,60 +10,60 @@
* readLine() method.
*/
   public class BufferedMultipartInputStream extends InputStream {
  -   
  +
   /**
* The underlying InputStream used by this class
*/
   protected InputStream inputStream;
  -
  +
   /**
* The byte array used to hold buffered data
*/
   protected byte[] buffer;
  -
  +
   /**
* The current offset we're at in the buffer's byte array
*/
   protected int bufferOffset = 0;
  -
  +
   /**
* The size of the byte array buffer
*/
   protected int bufferSize = 8192;
  -
  +
   /**
* The number of bytes read from the underlying InputStream that are
* in the buffer
*/
   protected int bufferLength = 0;
  -
  +
   /**
* The total number of bytes read so far
*/
   protected int totalLength = 0;
  -
  +
   /**
* The content length of the multipart data
*/
   protected long contentLength;
  -
  +
   /**
* The maximum allowed size for the multipart data, or -1 for an unlimited
* maximum file length
*/
   protected long maxSize = -1;
  -
  +
   /**
* Whether or not bytes up to the Content-Length have been read
*/
   protected boolean contentLengthMet = false;
  -
  +
   /**
* Whether or not bytes up to the maximum length have been read
*/
   protected boolean maxLengthMet = false;
  -
  -
  +
  +
   /**
* Public constructor for this class, just wraps the InputStream
* given
  @@ -81,14 +81,14 @@
   this.bufferSize = bufferSize;
   this.contentLength = contentLength;
   this.maxSize = maxSize;
  -
  +
   if (maxSize < contentLength) {
   throw new MaxLengthExceededException(maxSize);
   }
   buffer = new byte[bufferSize];
   fill();
   }
  -
  +
   /**
* This method returns the number of available bytes left to read
* in the buffer before it has to be refilled
  @@ -96,50 +96,50 @@
   public int available() {
   return bufferLength - bufferOffset;
   }
  -
  +
   /**
* This method attempts to close the underlying InputStream
*/
   public void close() throws IOException {
   inputStream.close();
   }
  -
  +
   /**
* This method calls on the mark() method of the underlying InputStream
*/
   public void mark(int position) {
  -inputStream.mark(position);  
  -} 
  -
  +inputStream.mark(position);
  +}
  +
   /**
* This method calls on the markSupported() method of the underlying InputStream
* @return Whether or not the underlying InputStream supports marking
*/
   public boolean markSupported() {
  -return inputStream.markSupported();
  +return inputStream.markSupported();
   }
  -
  +
   /**
* @return true if the maximum length has been reached, false otherwise
*/
   public boolean maxLengthMet() {
   return maxLengthMet;
   }
  -
  +
   /**
* @return true if the content length has been reached, false otherwise
*/
   public boolean contentLengthMet() {
   return contentLengthMet;
   }
  -
  +
   /**
* This method returns the next byte in the buffer, and refills it if necessary.
* @return The next byte read in the buffer, or -1 if the end of the stream has
* been reached
*/
   public int read() throws IOException {
  -
  +
   if (

Re: cvs commit: jakarta-struts/src/share/org/apache/struts/upload BufferedMultipartInputStream.java MultipartIterator.java

2001-11-21 Thread Ted Husted

So, in the release notes (nightly and 1.0.1) we're saying 

Improved error-handling on out of bounds conditions

Does that cover well-enough what we're doing here? 

[EMAIL PROTECTED] wrote:
> 
> mschachter01/11/20 21:04:36
> 
>   Modified:src/share/org/apache/struts/upload Tag: STRUTS_1_0_BRANCH
> BufferedMultipartInputStream.java
> MultipartIterator.java
>   Log:
>- fix #3828, equals() method problem (ported from main branch)
>  Submitted By: Curt Hagenlocher
> 
>- fix #4427, lost bytes on read(byte[],int,int) (need to port to main branch)
>  Submitted By: Mike Goutrie
> 
>- fix #4701, premature end of input stream not reported (need to port to main 
>branch)
>  Submitted By: Roland Huss
> 
>   Revision  ChangesPath
>   No   revision
> 
> 
>   No   revision
> 
> 
>   1.3.2.4   +40 -40
>jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipartInputStream.java
> 
>   Index: BufferedMultipartInputStream.java
>   ===
>   RCS file: 
>/home/cvs/jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipartInputStream.java,v
>   retrieving revision 1.3.2.3
>   retrieving revision 1.3.2.4
>   diff -u -r1.3.2.3 -r1.3.2.4
>   --- BufferedMultipartInputStream.java 2001/10/05 20:26:09 1.3.2.3
>   +++ BufferedMultipartInputStream.java 2001/11/21 05:04:36 1.3.2.4
>   @@ -10,60 +10,60 @@
> * readLine() method.
> */
>public class BufferedMultipartInputStream extends InputStream {
>   -
>   +
>/**
> * The underlying InputStream used by this class
> */
>protected InputStream inputStream;
>   -
>   +
>/**
> * The byte array used to hold buffered data
> */
>protected byte[] buffer;
>   -
>   +
>/**
> * The current offset we're at in the buffer's byte array
> */
>protected int bufferOffset = 0;
>   -
>   +
>/**
> * The size of the byte array buffer
> */
>protected int bufferSize = 8192;
>   -
>   +
>/**
> * The number of bytes read from the underlying InputStream that are
> * in the buffer
> */
>protected int bufferLength = 0;
>   -
>   +
>/**
> * The total number of bytes read so far
> */
>protected int totalLength = 0;
>   -
>   +
>/**
> * The content length of the multipart data
> */
>protected long contentLength;
>   -
>   +
>/**
> * The maximum allowed size for the multipart data, or -1 for an unlimited
> * maximum file length
> */
>protected long maxSize = -1;
>   -
>   +
>/**
> * Whether or not bytes up to the Content-Length have been read
> */
>protected boolean contentLengthMet = false;
>   -
>   +
>/**
> * Whether or not bytes up to the maximum length have been read
> */
>protected boolean maxLengthMet = false;
>   -
>   -
>   +
>   +
>/**
> * Public constructor for this class, just wraps the InputStream
> * given
>   @@ -81,14 +81,14 @@
>this.bufferSize = bufferSize;
>this.contentLength = contentLength;
>this.maxSize = maxSize;
>   -
>   +
>if (maxSize < contentLength) {
>throw new MaxLengthExceededException(maxSize);
>}
>buffer = new byte[bufferSize];
>fill();
>}
>   -
>   +
>/**
> * This method returns the number of available bytes left to read
> * in the buffer before it has to be refilled
>   @@ -96,50 +96,50 @@
>public int available() {
>return bufferLength - bufferOffset;
>}
>   -
>   +
>/**
> * This method attempts to close the underlying InputStream
> */
>public void close() throws IOException {
>inputStream.close();
>}
>   -
>   +
>/**
> * This method calls on the mark() method of the underlying InputStream
> */
>public void mark(int position) {
>   -inputStream.mark(position);
>   -}
>   -
>   +inputStream.mark(position);
>   +}
>   +
>/**
> * This method calls on the markSupported() method of the underlying 
>InputStream
> * @return Whether or not the underlying InputStream supports marking
> */
>public boolean markSupported() {
>   -return inputStream.markSupported();
>   +return inputStream.markSupported();
>}
>   -
>   +
>/**
> * @return true if the maximum length has been reached, false otherwise
> */
>public boolean maxLengthMet() {
>return maxLengthMet;
>}
>   -
>   +
>/**
> * @return true if the content length has been reached, fal

cvs commit: jakarta-struts/doc release-notes.xml release-notes-1.0.1.xml

2001-11-21 Thread husted

husted  01/11/21 04:05:00

  Modified:doc  release-notes.xml release-notes-1.0.1.xml
  Log:
  Update release notes for 1.0.1 and the nightly build.
  
  Revision  ChangesPath
  1.6   +6 -2  jakarta-struts/doc/release-notes.xml
  
  Index: release-notes.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- release-notes.xml 2001/11/02 10:28:43 1.5
  +++ release-notes.xml 2001/11/21 12:05:00 1.6
  @@ -5,7 +5,7 @@
   Craig R. McClanahan
   Robert Leland
   Ted Husted
  -Struts Release Notes (Version 1.x)
  +Struts Release Notes (current nightly build)
 
   
 
  @@ -149,6 +149,7 @@
   The following new features have been added to the utility classes
   (package org.apache.struts.util):
   
  +LocalStrings: Correct message regarding replaceable parameter so that it 
does not append an extraneous character.
   MessageResources: Escape any single quote characters that are included in 
the specified message string.
   Allow a transaction token to be the only parameter in 
computeParameters().
   Change RequestUtils to encode ampersands when building a query string.
  @@ -240,7 +241,7 @@
   package (package org.apache.struts.upload):
   
   Correct MultiboxTagdoAfterBody() to return SKIP_BODY instead of 
SKIP_PAGE.
  -Improved error-handling of out of bounds conditions
  +Improved error-handling on out of bounds conditions.
   Additional fix for file corruption problem with uploads and new line 
characters.
   
   
  @@ -267,6 +268,7 @@
   struts-html custom tag library (package
   org.apache.struts.taglib.html):
   
  +Fixed FormTag to exclude query string when identifying action mapping 
name.
   Added the 'align' attribute to the  tag.
   Added indexed attribute to ImageTag, RadioTag, and TextAreaTag.
   Added MessagesTag.
  @@ -284,6 +286,8 @@
   application (and corresponding contents on the Struts web site) have
   occurred:
   
  +In the HTML tag documentation, expand to cover using indexed properties 
with iterate.
  +Add installation notes for Jetty.
   In the Tag Developers Guide, add more detail regarding file upload 
requirements.
   In the Introduction, added references to basic background material.
   In Building View Components, clarify that additional i18n support may be 
provided by the browser, and is outside the scope of the framework.
  
  
  
  1.4   +4 -1  jakarta-struts/doc/release-notes-1.0.1.xml
  
  Index: release-notes-1.0.1.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes-1.0.1.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- release-notes-1.0.1.xml   2001/11/02 10:28:43 1.3
  +++ release-notes-1.0.1.xml   2001/11/21 12:05:00 1.4
  @@ -92,6 +92,8 @@
   The following new features have been added to the utility classes
   (package org.apache.struts.util):
   
  +LocalStrings: Correct message regarding replaceable parameter so that it 
does not append an extraneous character.
  +Add LabelValueBean class. This defines a collection of name/value pairs 
that can be used with the >html:options> tag, and elsewhere.
   MessageResources: Escape any single quote characters that are included in 
the specified message string.
   Allow a transaction token to be the only parameter in 
computeParameters().
   Change RequestUtils to encode ampersands when building a query string.
  @@ -141,7 +143,7 @@
   The following changes and bug fixes have occurred in the file upload
   package (package org.apache.struts.upload):
   
  -Improved error-handling of out of bounds conditions
  +Improved error-handling on out of bounds conditions.
   Additional fix for file corruption problem with uploads and new line 
characters.
   
   
  @@ -165,6 +167,7 @@
   struts-html custom tag library (package
   org.apache.struts.taglib.html):
   
  +Fixed FormTag to exclude query string when identifying action mapping 
name.
   Correct MultiboxTagdoAfterBody() to return SKIP_BODY instead of 
SKIP_PAGE.
   Added the 'align' attribute to the  tag.
   On the Options tag, if the property specified by the "property" attribute 
returns null, it now throws an error message that indicates what the real problem is, 
rather than causing an NPE.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc/userGuide resources.xml

2001-11-21 Thread husted

husted  01/11/21 04:05:49

  Modified:doc/userGuide resources.xml
  Log:
  Add listings to Resources page.
  
  Revision  ChangesPath
  1.14  +7 -2  jakarta-struts/doc/userGuide/resources.xml
  
  Index: resources.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/resources.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- resources.xml 2001/11/20 02:42:44 1.13
  +++ resources.xml 2001/11/21 12:05:49 1.14
  @@ -9,6 +9,8 @@

   

  +http://husted.com/struts/resources/MonkeyStruts.htm";>MonkeyStruts by 
Aaron Bates. An approach to nesting beans.
  +http://www.multimania.com/bist77/struts.php";>REGEXP.VALIDATOR.STRUTS by Emmanuel Boudrant - A validation 
component that works with Struts 1.0, to manage form validation on server-side and 
client-side.
   http://husted.com/struts/resources/struts-was.zip";>Struts-WAS.jar by 
Christopher Assenza - Modified Struts 1.0 JAR for Websphere 3.5 or 4. Zipped for 
download. (For additional tips regarding Websphere 3.5 see http://jakarta.apache.org/struts/installation-was352-x.html";>http://jakarta.apache.org/struts/installation-was352-x.html.)
   http://struts.application-servers.com/";>Struts Layout by 
Improve - An extension library to  improve interfaces creation with Struts.
   http://husted.com/struts/resources/indexed-tags.htm";>Indexed 
Tags [Also available in the nightly build] by Dave Hays - Produce indexed 
names such as . Link, 
Submit, and Select tags are included too.
  @@ -18,8 +20,10 @@
   
   

  -Struts .. in Rose by Emmanuel.Boudrant 
- Use Struts with the Rational Rose UML model. 
  -Multi-Controller by Sukachevin, 
Stoehr - Use more than once ActionServlet in your Struts application 
  + Pow2ACL - Access Control List 
library. Track of application users roles and  permissions. 
User can be authenticated: - directly using the  package API; 
- using custom JSP tag
  +libraries. 
  +http://bist77.multimania.com/struts.php#rose";>Struts .. in 
Rose by Emmanuel.Boudrant - Use Struts with the Rational Rose UML model. 
  +http://husted.com/struts/resources/multi-struts.htm";>Multi-Controller 
by Sukachevin, Stoehr - Use more than once ActionServlet in your Struts application 

   http://www.mail-archive.com/struts-user@jakarta.apache.org/msg16093.html";>JavaScript
 with html:errors - new Struts validation by Adam Grohs.  
   http://www.scioworks.com/scioworks_camino.html";>Scioworks 
Camino by Scioworks Pte Ltd. A visual tool for Struts. 
   http://www.ejcenter.com/struts/";>Struts Console by James 
Holmes. The Struts Console is a Java Swing application that provides an easy to use 
interface for editing Struts' "struts-config.xml" configuration file.
  @@ -99,6 +103,7 @@

   
   http://www.amazon.com/exec/obidos/ISBN=1861005512/hitchhikeguidetoA/";>Professional
 JSP Site Design - Wrox book - Features Struts throughout.
  +http://www.amazon.com/exec/obidos/ISBN=0735710953/hitchhikeguidetoA/";>JSP and 
Tag Libraries for Web Development - by Wellington L. S. Da Silva. Several 
chapters regarding Struts.
   http://www.redbooks.ibm.com/redpieces/pdfs/sg246134.pdf";>Websphere 
Version 4 Application Development Handbook (PDF) - 
Chapter 7 covers designing with both the Struts and Websphere frameworks,
   http://shannon.informatik.fh-wiesbaden.de/jsp/index.html";>Java 
Server Pages and J2EE Web-based Applications for Enterprises - In German, with 
a Chapter regarding MVC and Struts.
   http://www.amazon.com/exec/obidos/ISBN=0130648841/hitchhikeguidetoA/";>Core 
J2EE Patterns - Many of these patterns are deployed in Struts.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4997] New: - ActionForm exposes the ActionServlet, which has String properties that can be changed via a HTTP request.

2001-11-21 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

ActionForm exposes the ActionServlet, which has String properties that can be changed 
via a HTTP request.

   Summary: ActionForm exposes the ActionServlet, which has String
properties that can be changed via a HTTP request.
   Product: Struts
   Version: 1.0 Final
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Major
  Priority: Other
 Component: Controller
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When the dotted syntax was added to the autopopulation mechanism, it has the 
side affect of exposing all public String properties on the nested object to 
HTTP. Any of these can then be changed by any user via a HTTP query string. The 
ActionServlet is exposed by the Struts ActionForm, so the temporary folder and 
upload buffer size properties could be altered, creating a Denial of Service 
situation. The proposed fix is to 
enclose the ActionServlet property in a wrapper which safely exposes 
only the properties needed by the framework, and cannot be exploited. See 
annexed for a complete discussion. Ted Husted is to apply a patch. Many thanks 
to Dmitri Plotnikov who first reported this exploit.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 4997] - ActionForm exposes the ActionServlet, which has String properties that can be changed via a HTTP request.

2001-11-21 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

ActionForm exposes the ActionServlet, which has String properties that can be changed 
via a HTTP request.





--- Additional Comments From [EMAIL PROTECTED]  2001-11-21 05:23 ---
Created an attachment (id=813)
Discussion of fix for "autopop exploit"

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Support for Object[] params in the ActionErrors

2001-11-21 Thread Dragomir Nikolov

Hello,
the ActionErrors constructors take only fixed number placeholder 
objects ( maximum 4 - reason why?).
It would be really nice if there is a constructor taking an  array ( 
Object[] ) containing these parameters.
Thus making it easier to support higher number of placeholders for a 
message.
It won't be hard to implement especially when the  the 
MessageResources class already supports it -
public String getMessage(Locale locale, String key, Object args[]).

This will make live easier when you have for instance exception 
initialized somewhere int the business logic with the message key and 
the placeholders and than passed back to the Struts Action classes where 
an ActionError is created and passed to the View objects ( tags in the jsp)
 
Regards Dragomir Nikolov


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/src/share/org/apache/struts/action ActionServletWrapper.java ActionForm.java

2001-11-21 Thread husted

husted  01/11/21 05:29:31

  Modified:src/share/org/apache/struts/action Tag: STRUTS_1_0_BRANCH
ActionForm.java
  Added:   src/share/org/apache/struts/action Tag: STRUTS_1_0_BRANCH
ActionServletWrapper.java
  Log:
  Add ActionServletWrapper and modify ActionForm to address issue #4997 - 
autopopulation exploit.
  This change prevents the Public String properties of ActionServlet from being 
changed via a query string.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.7.2.2   +29 -18
jakarta-struts/src/share/org/apache/struts/action/ActionForm.java
  
  Index: ActionForm.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForm.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- ActionForm.java   2001/06/13 22:14:26 1.7.2.1
  +++ ActionForm.java   2001/11/21 13:29:31 1.7.2.2
  @@ -1,13 +1,13 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForm.java,v 1.7.2.1 
2001/06/13 22:14:26 craigmcc Exp $
  - * $Revision: 1.7.2.1 $
  - * $Date: 2001/06/13 22:14:26 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForm.java,v 1.7.2.2 
2001/11/21 13:29:31 husted Exp $
  + * $Revision: 1.7.2.2 $
  + * $Date: 2001/11/21 13:29:31 $
*
* 
  - * 
  + *
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
  - *notice, this list of conditions and the following disclaimer. 
  + *notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
*notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
*distribution.
*
* 3. The end-user documentation included with the redistribution, if
  - *any, must include the following acknowlegement:  
  - *   "This product includes software developed by the 
  + *any, must include the following acknowlegement:
  + *   "This product includes software developed by the
*Apache Software Foundation (http://www.apache.org/)."
*Alternately, this acknowlegement may appear in the software itself,
*if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Struts", and "Apache Software
*Foundation" must not be used to endorse or promote products derived
  - *from this software without prior written permission. For written 
  + *from this software without prior written permission. For written
*permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
  @@ -57,7 +57,7 @@
* information on the Apache Software Foundation, please see
* .
*
  - */ 
  + */
   
   
   package org.apache.struts.action;
  @@ -94,7 +94,8 @@
* 
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.7.2.1 $ $Date: 2001/06/13 22:14:26 $
  + * @author Ted Husted
  + * @version $Revision: 1.7.2.2 $ $Date: 2001/11/21 13:29:31 $
*/
   
   public abstract class ActionForm implements Serializable {
  @@ -107,8 +108,8 @@
* The controller servlet instance to which we are attached.
*/
   protected transient ActionServlet servlet = null;
  -
  -
  +
  +
   /**
* The MultipartRequestHandler for this form, can be
* null
  @@ -122,14 +123,24 @@
   /**
* Return the controller servlet instance to which we are attached.
*/
  -public ActionServlet getServlet() {
  +protected ActionServlet getServlet() {
   
   return (this.servlet);
   
   }
  -
  -
  +
  +
   /**
  + * Return the controller servlet instance to which we are attached.
  + */
  +public ActionServletWrapper getServletWrapper() {
  +
  +return new ActionServletWrapper(getServlet());
  +
  +}
  +
  +
  +/**
* Return the MultipartRequestHandler for this form
* The reasoning behind this is to give form bean developers
* control over the lifecycle of their multipart requests
  @@ -139,7 +150,7 @@
* "multipart/request-data".
* @see org.apache.struts.upload.MultipartRequestHandler
*/
  -public MultipartRequestHandler getMultipartRequestHandler() {
  +prote

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

2001-11-21 Thread husted

husted  01/11/21 05:30:38

  Modified:src/share/org/apache/struts/util Tag: STRUTS_1_0_BRANCH
RequestUtils.java
  Log:
  Modify RequestUtils to address issue #4997 - autopopulation exploit.
  This change prevents the Public String properties of ActionServlet from being 
changed via a query string.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.14.2.7  +12 -12
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.6
  retrieving revision 1.14.2.7
  diff -u -r1.14.2.6 -r1.14.2.7
  --- RequestUtils.java 2001/08/05 18:59:35 1.14.2.6
  +++ RequestUtils.java 2001/11/21 13:30:38 1.14.2.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.6 
2001/08/05 18:59:35 martinc Exp $
  - * $Revision: 1.14.2.6 $
  - * $Date: 2001/08/05 18:59:35 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.14.2.7 
2001/11/21 13:30:38 husted Exp $
  + * $Revision: 1.14.2.7 $
  + * $Date: 2001/11/21 13:30:38 $
*
* 
*
  @@ -84,7 +84,7 @@
   import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionForwards;
   import org.apache.struts.action.ActionMapping;
  -import org.apache.struts.action.ActionServlet;
  +import org.apache.struts.action.ActionServletWrapper;
   import org.apache.struts.taglib.html.Constants;
   import org.apache.struts.upload.FormFile;
   import org.apache.struts.upload.MultipartRequestHandler;
  @@ -95,7 +95,7 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.14.2.6 $ $Date: 2001/08/05 18:59:35 $
  + * @version $Revision: 1.14.2.7 $ $Date: 2001/11/21 13:30:38 $
*/
   
   public class RequestUtils {
  @@ -114,8 +114,8 @@
* The message resources for this package.
*/
   private static MessageResources messages =
  - MessageResources.getMessageResources
  - ("org.apache.struts.util.LocalStrings");
  +MessageResources.getMessageResources
  +("org.apache.struts.util.LocalStrings");
   
   
   
  @@ -339,7 +339,7 @@
   url.append('#');
   url.append(URLEncoder.encode(anchor));
   }
  -
  +
   // Add dynamic parameters if requested
   if ((params != null) && (params.size() > 0)) {
   
  @@ -657,11 +657,11 @@
   //initialize a MultipartRequestHandler
   MultipartRequestHandler multipart = null;
   
  -//get an instance of ActionServlet
  -ActionServlet servlet;
  +//get an instance of ActionServletWrapper
  +ActionServletWrapper servlet;
   
   if (bean instanceof ActionForm) {
  -servlet = ((ActionForm) bean).getServlet();
  +servlet = ((ActionForm) bean).getServletWrapper();
   } else {
   throw new ServletException("bean that's supposed to be " +
  "populated from a multipart request is 
not of type " +
  @@ -726,7 +726,7 @@
   ((ActionForm) bean).setMultipartRequestHandler(multipart);
   
   //set servlet and mapping info
  -multipart.setServlet(servlet);
  +servlet.setServletFor(multipart);
   multipart.setMapping((ActionMapping)
request.getAttribute(Action.MAPPING_KEY));
   request.removeAttribute(Action.MAPPING_KEY);
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Unsubscribe me

2001-11-21 Thread Ziani, Djamal


Djamal Ziani

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/src/share/org/apache/struts/action ActionServletWrapper.java ActionForm.java

2001-11-21 Thread husted

husted  01/11/21 05:59:28

  Modified:src/share/org/apache/struts/action ActionForm.java
  Added:   src/share/org/apache/struts/action ActionServletWrapper.java
  Log:
  Add ActionServletWrapper and modify ActionForm to address issue #4997 - 
autopopulation exploit.
  This change prevents the Public String properties of ActionServlet from being 
changed via a query string.
  
  Revision  ChangesPath
  1.10  +27 -17
jakarta-struts/src/share/org/apache/struts/action/ActionForm.java
  
  Index: ActionForm.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForm.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ActionForm.java   2001/06/13 22:16:48 1.9
  +++ ActionForm.java   2001/11/21 13:59:28 1.10
  @@ -1,13 +1,13 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForm.java,v 1.9 
2001/06/13 22:16:48 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/06/13 22:16:48 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForm.java,v 1.10 
2001/11/21 13:59:28 husted Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/11/21 13:59:28 $
*
* 
  - * 
  + *
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
  + * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -15,7 +15,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
  - *notice, this list of conditions and the following disclaimer. 
  + *notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
*notice, this list of conditions and the following disclaimer in
  @@ -23,15 +23,15 @@
*distribution.
*
* 3. The end-user documentation included with the redistribution, if
  - *any, must include the following acknowlegement:  
  - *   "This product includes software developed by the 
  + *any, must include the following acknowlegement:
  + *   "This product includes software developed by the
*Apache Software Foundation (http://www.apache.org/)."
*Alternately, this acknowlegement may appear in the software itself,
*if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Struts", and "Apache Software
*Foundation" must not be used to endorse or promote products derived
  - *from this software without prior written permission. For written 
  + *from this software without prior written permission. For written
*permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache"
  @@ -57,7 +57,7 @@
* information on the Apache Software Foundation, please see
* .
*
  - */ 
  + */
   
   
   package org.apache.struts.action;
  @@ -94,7 +94,7 @@
* 
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2001/06/13 22:16:48 $
  + * @version $Revision: 1.10 $ $Date: 2001/11/21 13:59:28 $
*/
   
   public abstract class ActionForm implements Serializable {
  @@ -107,8 +107,8 @@
* The controller servlet instance to which we are attached.
*/
   protected transient ActionServlet servlet = null;
  -
  -
  +
  +
   /**
* The MultipartRequestHandler for this form, can be
* null
  @@ -122,14 +122,24 @@
   /**
* Return the controller servlet instance to which we are attached.
*/
  -public ActionServlet getServlet() {
  +protected ActionServlet getServlet() {
   
   return (this.servlet);
   
   }
  -
  -
  +
  +
   /**
  + * Return the controller servlet instance to which we are attached.
  + */
  +public ActionServletWrapper getServletWrapper() {
  +
  +return new ActionServletWrapper(getServlet());
  +
  +}
  +
  +
  +/**
* Return the MultipartRequestHandler for this form
* The reasoning behind this is to give form bean developers
* control over the lifecycle of their multipart requests
  @@ -156,8 +166,8 @@
   this.servlet = servlet;
   
   }
  +
   
  -
   public void setMultipartRequestHandler(MultipartRequestHandler 
multipartRequestHandler) {
   this.multipartRequestHandler = multipartRequestHandler;
   }
  
  
  
  1.2   +140 -0
jakarta-struts/src/share/org/apache/struts/action/ActionServletWrapper.java
  
  
  
  

--
To unsubscribe, e-mail:   
For additiona

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

2001-11-21 Thread husted

husted  01/11/21 06:00:28

  Modified:src/share/org/apache/struts/util RequestUtils.java
  Log:
  Modify RequestUtils to address issue #4997 - autopopulation exploit.
  This change prevents the Public String properties of ActionServlet from being 
changed via a query string.
  
  Revision  ChangesPath
  1.24  +37 -36
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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- RequestUtils.java 2001/10/16 15:48:28 1.23
  +++ RequestUtils.java 2001/11/21 14:00:28 1.24
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.23 
2001/10/16 15:48:28 dwinterfeldt Exp $
  - * $Revision: 1.23 $
  - * $Date: 2001/10/16 15:48:28 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.24 
2001/11/21 14:00:28 husted Exp $
  + * $Revision: 1.24 $
  + * $Date: 2001/11/21 14:00:28 $
*
* 
*
  @@ -90,7 +90,7 @@
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.action.ActionMessage;
   import org.apache.struts.action.ActionMessages;
  -import org.apache.struts.action.ActionServlet;
  +import org.apache.struts.action.ActionServletWrapper;
   import org.apache.struts.taglib.html.Constants;
   import org.apache.struts.upload.FormFile;
   import org.apache.struts.upload.MultipartRequestHandler;
  @@ -101,7 +101,8 @@
* in the Struts controller framework.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.23 $ $Date: 2001/10/16 15:48:28 $
  + * @author Ted Husted
  + * @version $Revision: 1.24 $ $Date: 2001/11/21 14:00:28 $
*/
   
   public class RequestUtils {
  @@ -120,8 +121,8 @@
* The message resources for this package.
*/
   private static MessageResources messages =
  - MessageResources.getMessageResources
  - ("org.apache.struts.util.LocalStrings");
  +MessageResources.getMessageResources
  +("org.apache.struts.util.LocalStrings");
   
   
   
  @@ -345,7 +346,7 @@
   url.append('#');
   url.append(URLEncoder.encode(anchor));
   }
  -
  +
   // Add dynamic parameters if requested
   if ((params != null) && (params.size() > 0)) {
   
  @@ -661,10 +662,10 @@
   (contentType.startsWith("multipart/form-data")) &&
   (method.equalsIgnoreCase("POST"))) {
   
  -// Get the ActionServlet from the form bean
  -ActionServlet servlet;
  +// Get the ActionServletWrapper from the form bean
  +ActionServletWrapper servlet;
   if (bean instanceof ActionForm) {
  -servlet = ((ActionForm) bean).getServlet();
  +servlet = ((ActionForm) bean).getServletWrapper();
   } else {
   throw new ServletException("bean that's supposed to be " +
  "populated from a multipart request is not of type " +
  @@ -686,7 +687,7 @@
   isMultipart = true;
   
   // Set servlet and mapping info
  -multipartHandler.setServlet(servlet);
  +servlet.setServletFor(multipartHandler);
   multipartHandler.setMapping((ActionMapping)
   request.getAttribute(Action.MAPPING_KEY));
   
  @@ -744,7 +745,7 @@
*
* @param request The HTTP request for which the multipart handler should
*be found.
  - * @param servlet The ActionServlet processing the supplied
  + * @param servlet The ActionServletWrapper processing the supplied
*request.
*
* @return the multipart handler to use, or null if none is
  @@ -754,7 +755,7 @@
* to locate the multipart handler.
*/
   private static MultipartRequestHandler getMultipartHandler(
  -HttpServletRequest request, ActionServlet servlet)
  +HttpServletRequest request, ActionServletWrapper servlet)
   throws ServletException {
   
   MultipartRequestHandler multipartHandler = null;
  @@ -970,19 +971,19 @@
   
   
   /**
  - * Retrieves the value from request scope and if it isn't already an 
ActionMessages 
  + * Retrieves the value from request scope and if it isn't already an 
ActionMessages
* some classes are converted to one.
*
  - * @param pageContextThe PageContext for the current page
  - * @param paramName  Key for parameter value
  + * @param pageContext   The PageContext for the current page
  + * @param paramName Key for p

cvs commit: jakarta-struts/doc release-notes.xml release-notes-1.0.1.xml

2001-11-21 Thread husted

husted  01/11/21 06:09:37

  Modified:doc  release-notes.xml release-notes-1.0.1.xml
  Log:
  Update release notes for #4997.
  
  Revision  ChangesPath
  1.7   +7 -1  jakarta-struts/doc/release-notes.xml
  
  Index: release-notes.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- release-notes.xml 2001/11/21 12:05:00 1.6
  +++ release-notes.xml 2001/11/21 14:09:37 1.7
  @@ -225,6 +225,8 @@
   The following changes and bug fixes have occurred in the basic
   controller framework (package org.apache.struts.action):
   
  +Modify ActionForm class to use ActionServletWrapper rather than expose 
ActionServlet.
  +Add ActionServletWrapper class. Used by ActionForm to prevent the Public 
String properties of ActionServlet from being changed via a query string.
   Unconditionally pass the selected mapping as a request attribute under key 
Action.MAPPING_KEY, even if no form bean is specified.
   Avoid a NullPointerException in corner cases caused by failed 
initialization of ActionServlet.
   The ActionForm class is now truly serializable, because
  @@ -248,7 +250,11 @@
   The following changes and bug fixes have occurred in the utilities
   (package org.apache.struts.util):
   
  -None.
  +Modify RequestUtils class to use ActionServletWrapper rather than expose 
ActionServlet.
  +Added error message for the getActionErrors and getActionMessages 
method.
  +Added a getActionErrors and getActionMessages methods to generate the 
correct corresponding object based on the object retrieved from request scope based on 
the key passed in.
  +The logic for creating an ActionErrors or ActionMessages object has been 
moved to a utility method in RequestUtils. The JspException message is also generated 
in RequestUtils.
  +ConvertUtils.convertCharacter() will now detect empty strings 
and return the default value.
   
   
   The following changes and bug fixes have occured in the
  
  
  
  1.5   +3 -0  jakarta-struts/doc/release-notes-1.0.1.xml
  
  Index: release-notes-1.0.1.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes-1.0.1.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- release-notes-1.0.1.xml   2001/11/21 12:05:00 1.4
  +++ release-notes-1.0.1.xml   2001/11/21 14:09:37 1.5
  @@ -135,6 +135,8 @@
   The following changes and bug fixes have occurred in the basic
   controller framework (package org.apache.struts.action):
   
  +Modify ActionForm class to use ActionServletWrapper rather than expose 
ActionServlet.
  +Add ActionServletWrapper class. Used by ActionForm to prevent the Public 
String properties of ActionServlet from being changed via a query string.
   The logic for creating an ActionErrors or ActionMessages object has been 
moved to a utility method in RequestUtils. The JspException message is also generated 
in RequestUtils.
   Unconditionally pass the selected mapping as a request attribute under key 
Action.MAPPING_KEY, even if no form bean is specified.
   Avoid a NullPointerException in corner cases caused by failed 
initialization of ActionServlet.
  @@ -150,6 +152,7 @@
   The following changes and bug fixes have occurred in the utilities
   (package org.apache.struts.util):
   
  +Modify RequestUtils class to use ActionServletWrapper rather than expose 
ActionServlet.
   Added error message for the getActionErrors and getActionMessages 
method.
   Added a getActionErrors and getActionMessages methods to generate the 
correct corresponding object based on the object retrieved from request scope based on 
the key passed in.
   The logic for creating an ActionErrors or ActionMessages object has been 
moved to a utility method in RequestUtils. The JspException message is also generated 
in RequestUtils.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Resources page for Struts 1.0.1

2001-11-21 Thread Ted Husted

I'm scrolling through the 1.0.1 docs now, and will port over improved
sections, like the resources page, kickstart faq, the Learning about
Struts section from the index page, et cetera.

Ted Husted wrote:
> 
> No reason whatsoever.
> 
> There are several other documentation bits that I'd like to post before
> we freeze tomorrow. I just forgot to think about the 1.0.1 docs whilst
> updating the main branch.
> 
> [EMAIL PROTECTED] wrote:
> >
> > I just checked in some updates to the Resources page for the main trunk.
> > While I was in there, I noticed that the Resources page that will be in
> > Struts 1.0.1 is quite different from the page in the main trunk. Is there
> > any reason I shouldn't just clone the main trunk page into the 1.0 branch,
> > so that 1.0.1 has the latest list?
> >
> > --
> > Martin Cooper

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc release-notes-1.0.1.xml

2001-11-21 Thread husted

husted  01/11/21 07:18:18

  Modified:doc  release-notes-1.0.1.xml
  Log:
  Add additional release note from July.
  
  Revision  ChangesPath
  1.6   +6 -0  jakarta-struts/doc/release-notes-1.0.1.xml
  
  Index: release-notes-1.0.1.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes-1.0.1.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- release-notes-1.0.1.xml   2001/11/21 14:09:37 1.5
  +++ release-notes-1.0.1.xml   2001/11/21 15:18:18 1.6
  @@ -3,6 +3,7 @@
   
 
   Craig R. McClanahan
  +Robert Leland
   Ted Husted
   Struts Release Notes (Version 1.1 Milestone 1)
 
  @@ -184,6 +185,11 @@
   org.apache.struts.taglib.logic):
   
   Added tags for checking if a message is present in general or for a 
specific property. They retrieve an object from request scope just like the 
html:errors and html:messages tags.
  +The  when the property tag is
  +specified, errors are no longer printed if the specified property
  +has no errors. Previously errors were always printed! Future
  +enhancements would include additional attributes to always turn
  +off the header or footer. 
   
   
   The following changes and bug fixes to the Struts Documentation
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Fwd: Re: Extensibility of struts

2001-11-21 Thread Stefan Wachter

--- Weitergeleitete Nachricht / Forwarded Message ---
Date: Wed, 21 Nov 2001 16:28:08 +0100 (MET)
From: Stefan Wachter <[EMAIL PROTECTED]>
To: Oleg V Alexeev <[EMAIL PROTECTED]>
Subject: Re: Extensibility of struts

Hi Oleg,
 
our first proposal concerning the extensibility of struts concerns the
html-taglib. Currently in the org.apache.struts.taglib.BaseHandlerTag the
members
(onClick, onDblClick, ...) are directly accessed. If the prepare methods
would use getter methods then you could easily extend the tags by
overloading the
getter method:

Current version of BaseHandler has methods like this:

private void prepareKeyEvents(StringBuffer handlers) {

if (onKeyDown != null) {
handlers.append(" onKeyDown=\"");
handlers.append(onKeyDown);
handlers.append("\"");
}

if (onKeyUp != null) {
handlers.append(" onKeyUp=\"");
handlers.append(onKeyUp);
handlers.append("\"");
}

if (onKeyPress != null) {
handlers.append(" onKeyPress=\"");
handlers.append(onKeyPress);
handlers.append("\"");
}
}

Our proposed version is:

private void prepareKeyEvents(StringBuffer handlers) {

if (getOnKeyDown() != null) {
handlers.append(" onKeyDown=\"");
handlers.append(getOnKeyDown());
handlers.append("\"");
}

if (getOnKeyUp() != null) {
handlers.append(" onKeyUp=\"");
handlers.append(getOnKeyUp());
handlers.append("\"");
}

if (getOnKeyPress() != null) {
handlers.append(" onKeyPress=\"");
handlers.append(getOnKeyPress());
handlers.append("\"");
   }
}

Admittedly this is not a great change, but it would help extensibility a
lot. Who decides if this proposal is incorporated into the next version?

I will send you some more proposals soon.

Ciao,
--Stefan


> > Hello Stefan,
> > 
> > I am ready to discuss struts extension ways. This year I put
> > contribution to the struts project - ServiceManager. This contrib is a
> > attempt to make struts extensible with some kind of plugins. Now I
> > work under next version. It is interesting for me.
> > 
> > Wednesday, November 14, 2001, 11:02:48 AM, you wrote:
> > 
> > SW> Hi,
> > 
> > SW> I am working in a (big) banking project where struts is used. We had
> > to
> > SW> extend struts at several spots in order to meet the requirements.
> > Extending the
> > SW> framework we recognized that the current version of struts is not
> > designed for
> > SW> extension! Yet, I think that a framework must be easily extensible
> > because
> > SW> the developers of a framework can not foresee all possible needs
> (let
> > alone
> > SW> solutions).
> > 
> > SW> We had to copy and patch a lot of source code of struts to implement
> > the
> > SW> required extensions. While doing this we recognized several spots
> (in
> > framework
> > SW> terminology called hot spots) where hook methods would introduce
> great
> > SW> possibilities for extensions.
> > 
> > SW> In particular, we had to patch the struts-html taglib, in order to
> > generate
> > SW> additional html output (e.g. hidden fields, javascript) that should
> be
> > SW> transparent to the JSP developer. 
> > 
> > SW> Furthermore we patched the struts servlet in order to allow
> > asynchronous
> > SW> request processing. Asynchronous request processing means that a
> user
> > is served
> > SW> "please wait pages" until the original request is processed.
> > 
> > SW> I would like to contact the developers that are commiters of the
> > struts-html
> > SW> taglib and of the ActionServlet / Action classes in order to discuss
> > our
> > SW> ideas of extensibility.
> > 
> > SW> Ciao,
> > SW> --Stefan
> > 
> > 
> > 
> > 
> > -- 
> > Best regards,
> >  Olegmailto:[EMAIL PROTECTED]
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> -- 
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
> 
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc/userGuide kickstart.xml resources.xml

2001-11-21 Thread husted

husted  01/11/21 07:19:19

  Modified:doc/userGuide Tag: STRUTS_1_0_BRANCH resources.xml
  Added:   doc/userGuide Tag: STRUTS_1_0_BRANCH kickstart.xml
  Log:
  Add additional release note from July.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.3   +208 -109  jakarta-struts/doc/userGuide/resources.xml
  
  Index: resources.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/resources.xml,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- resources.xml 2001/10/15 04:07:48 1.1.2.2
  +++ resources.xml 2001/11/21 15:19:19 1.1.2.3
  @@ -9,140 +9,239 @@

   

  -
  -http://husted.com/about/struts/indexed-tags.htm";>Indexed 
Tags by Dave Hays - Produce indexed names 
  -such as . Link, Submit, 
and 
  -Select tags are included too.
  -
  -http://husted.com/about/struts/logic-niallp.htm";>Struts IF/THEN/ELSE 
and 
  -SWITCH tags by Niall Pemberton.
  -
  -http://husted.com/about/struts/rowtag.zip";>RowTag (ZIP file 
for 
  -download) - Source for a Struts-compatible tag to generate alternating row colors 
in a 
  -table by Niall Pemberton. [NOTE: Requires a Struts build dated after 
2001-04-28]
  -
  -
  +http://husted.com/struts/resources/MonkeyStruts.htm";>MonkeyStruts by 
Aaron Bates. An approach to nesting beans.
  +http://www.multimania.com/bist77/struts.php";>REGEXP.VALIDATOR.STRUTS by Emmanuel Boudrant - A validation 
component that works with Struts 1.0, to manage form validation on server-side and 
client-side.
  +http://husted.com/struts/resources/struts-was.zip";>Struts-WAS.jar by 
Christopher Assenza - Modified Struts 1.0 JAR for Websphere 3.5 or 4. Zipped for 
download. (For additional tips regarding Websphere 3.5 see http://jakarta.apache.org/struts/installation-was352-x.html";>http://jakarta.apache.org/struts/installation-was352-x.html.)
  +http://struts.application-servers.com/";>Struts Layout by 
Improve - An extension library to  improve interfaces creation with Struts.
  +http://husted.com/struts/resources/indexed-tags.htm";>Indexed 
Tags [Also available in the nightly build] by Dave Hays - Produce indexed 
names such as . Link, 
Submit, and Select tags are included too.
  +http://husted.com/struts/resources/logic-niallp.htm";>Struts 
IF/THEN/ELSE and SWITCH tags by Niall Pemberton.
  +http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg01251.html";>TextArea
 Wrapping by Matthias Bauer. Patch to HTML:TextArea tag to provide wrapping of 
long lines.
  +http://husted.com/struts/resources/rowtag.zip";>RowTag (ZIP 
file for download) - Source for a Struts-compatible tag to generate alternating row 
colors in a table by Niall Pemberton. [NOTE: Requires a Struts build dated after 
2001-04-28]
   
   

  -
  -http://www.rpsenterprises.com/struts/index.html";>Struts 
Transformer 
  -by Ron Smith - Transformations are responsible for taking an object in one form and 
  -transforming it into another. A forward transformation takes an object from its 
primary form 
  -to a secondary form (e.g. Date object to String). A reverse transformation takes an 
object 
  -from a secondary form to its primary form (e.g. String to Date).
  -
  -http://www.rpsenterprises.com/struts/index.html";>Struts 
Extender 
  -by Ron Smith - Add extensions to the struts framework via entries in the Struts 
configuration 
  -file.
  -
  -http://husted.com/about/struts/mapper.zip";>Mapper framework 
by Capco 
  -- The Mapper framework can be used for automating the process of 
  -validating/converting/transferring data fields. (See README to get
  -started.)
  -
  -http://husted.com/about/struts/StrutsCodeMaker.htm";>Struts 
CodeMaker 
  -by Ravindran Ramaiah - Generate Action and Form class by reading the JSP files
  -
  -http://www.sura.ru/~gonza/bean-factory/";>Bean factory by Oleg V 
Alexeev - 
  -Adds the ability to easily link data bean creation to any Struts Action. All 
information 
  -about databeans and actions mappings stored in the standard Struts configuraton 
file. 
  -
  -http://husted.com/about/struts/struts-menu.zip";>Struts Menu 
  -(ZIP file for download) - A Struts-compatible web menuing component by Scott Sayles 
  -(early release - work in progress) - unzip to a "struts-menu" folder, and 
see 
  -the README.
  -
  -http://home.earthlink.net/~dwinterfeldt/";>Struts Validator by David 
  -Winterfeldt - Perform basic validations to check if a field
  -is required, matches a regular expression, and some basic type checking. Different 
validation 
  -rules can be defined for different locales. The framework has basic support for 
user-defined 
  -constants which can be used in some field attributes. The validation routines are 
modifiable 
  -in the validation.xml f

cvs commit: jakarta-struts/doc release-notes-1.0.1.xml project.xml index.xml

2001-11-21 Thread husted

husted  01/11/21 07:19:58

  Modified:doc  Tag: STRUTS_1_0_BRANCH release-notes-1.0.1.xml
project.xml index.xml
  Log:
  Update documentation in anticipation of release candidate.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.2   +65 -33jakarta-struts/doc/release-notes-1.0.1.xml
  
  Index: release-notes-1.0.1.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes-1.0.1.xml,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- release-notes-1.0.1.xml   2001/07/05 11:45:55 1.1.2.1
  +++ release-notes-1.0.1.xml   2001/11/21 15:19:58 1.1.2.2
  @@ -1,5 +1,5 @@
   
  -
  +
   
 
   Craig R. McClanahan
  @@ -13,20 +13,24 @@
 
   
   This document contains the release notes for
  -Version 1.0.1 of the Struts Framework,
  +Version 1.0.1  of the Struts Framework,
   and covers changes that have taken place since
   Version 1.0
   was released.  The following sections cover
   New Features and Changes
   to Struts.
   
  +This version is unreleased, but available in the 
  +CVS as the STRUTS_1_0_BRANCH. This version is intended a near-term
  +release to cover bug-fixes only; no new functionality.
  +
 
   
   
 
   
   The binary distribution of this release includes the following
  -files relevant to Struts 1.0:
  +files relevant to Struts 1.1:
   
   INSTALL - Brief installation instructions.  See
   the Struts Documentation Application, or online at
  @@ -37,26 +41,24 @@
   licensed by Apache).
   README - A brief introduction to Struts.
   lib/ - Directory containing files you will need in
  -your own applications.  The individual files of interest are:
  +your own applications.  The individual files of interest are:
   
   struts.jar - JAR file that contains the compiled
  -Java classes for both version 0.5 and 1.0 of Struts.  You must
  +Java classes for version 1.0 of Struts.  You must
   place this file in the /WEB-INF/lib directory of
   your web application.
   struts-x.tld - The tag library descriptor files
  -for the Struts 1.0 tag libraries (bean, html, logic, and
  +for the Struts 1.1 tag libraries (bean, html, logic, and
   template).  You must place these files in the /WEB-INF
   directory of your web application, and reference them with
   appropriate  directives in your
  -web.xml file.  NOTE - The struts-form.tld
  -file is deprecated; you should use the struts-html.tld file
  -instead.
  +web.xml file.
   jdbc2_0-stdext.jar - The JDBC 2.0 Optional Package
   API classes (package javax.sql).  You will need to
   include this file in the /WEB-INF/lib directory
   of your application, if it is not already made visible to web
   applications by your servlet container.
  -struts-config_1_0.dtd - The document type descriptor
  +struts-config_1_1.dtd - The document type descriptor
   (DTD) for the Struts configuration file (which is typically named
   /WEB-INF/struts-config.xml.  Your configuration file
   will be validated against an internal copy of this DTD -- this
  @@ -67,9 +69,14 @@
   web-app_2_3.dtd - The document type descriptor (DTD)
   for web.xml files conforming to the Servlet 2.3 specification.
   This copy is for reference purposes only.
  -
  -webapps/ - Web Application Archive (WAR) files for the
  -web applications that are included with Struts.
  +
  +webapps/ - Web Application Archive (WAR) files for the
  +web applications that are included with Struts.
  +
  +
  +The struts 0.5 milestone API release is no longer supported.
  +   and has been removed as of Struts 1.1:
  +
   
   
 
  @@ -77,48 +84,43 @@
   
 
   
  -DEPRECATIONS:
  -
  -None.
  -
   
   The following new features have been added to the basic controller
   framework (package org.apache.struts.action):
   
  -Additional fix for file corruption problem with uploads and new line 
characters.
   
   
   The following new features have been added to the utility classes
   (package org.apache.struts.util):
   
  -None.
  +LocalStrings: Correct message regarding replaceable parameter so that it 
does not append an extraneous character.
  +Add LabelValueBean class. This defines a collection of name/value pairs 
that can be used with the >html:options> tag, and elsewhere.
  +MessageResources: Escape any single

Re: Fwd: Re: Extensibility of struts

2001-11-21 Thread Oleg V Alexeev

Hello Stefan,

Wednesday, November 21, 2001, 6:33:38 PM, you wrote:

SW> our first proposal concerning the extensibility of struts concerns the
SW> html-taglib. Currently in the org.apache.struts.taglib.BaseHandlerTag the
SW> members
SW> (onClick, onDblClick, ...) are directly accessed. If the prepare methods
SW> would use getter methods then you could easily extend the tags by
SW> overloading the
SW> getter method:

SW> Current version of BaseHandler has methods like this:

SW> private void prepareKeyEvents(StringBuffer handlers) {

SW> if (onKeyDown != null) {
SW> handlers.append(" onKeyDown=\"");
SW> handlers.append(onKeyDown);
SW> handlers.append("\"");
SW> }

SW> if (onKeyUp != null) {
SW> handlers.append(" onKeyUp=\"");
SW> handlers.append(onKeyUp);
SW> handlers.append("\"");
SW> }

SW> if (onKeyPress != null) {
SW> handlers.append(" onKeyPress=\"");
SW> handlers.append(onKeyPress);
SW> handlers.append("\"");
SW> }
SW> }

SW> Our proposed version is:

SW> private void prepareKeyEvents(StringBuffer handlers) {

SW> if (getOnKeyDown() != null) {
SW> handlers.append(" onKeyDown=\"");
SW> handlers.append(getOnKeyDown());
SW> handlers.append("\"");
SW> }

SW> if (getOnKeyUp() != null) {
SW> handlers.append(" onKeyUp=\"");
SW> handlers.append(getOnKeyUp());
SW> handlers.append("\"");
SW> }

SW> if (getOnKeyPress() != null) {
SW> handlers.append(" onKeyPress=\"");
SW> handlers.append(getOnKeyPress());
SW> handlers.append("\"");
SW>}
SW> }

SW> Admittedly this is not a great change, but it would help extensibility a
SW> lot. Who decides if this proposal is incorporated into the next version?

SW> I will send you some more proposals soon.

It is good addition. But what reason to do so? Can you explain any
situation when such methods can be used?

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i think i screwed up cvs...

2001-11-21 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)

Would it work if I did a
"cvs rtag -d STRUTS_1_0_1 jakarta-struts"?
I got that from here:
http://www.cvshome.org/docs/manual/cvs_4.html#SEC51

I'm really sorry about all this, I thought I wasn't
connected to cvs.apache.org when I did it.


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 2:58 AM
To: Struts Developers List
Subject: Re: i think i screwed up cvs...


Ack ... I don't know of any "undo" commands for this (hope somebody else
does).  Of course, it is the "-b" part of the command that is the problem
here.

If it can't be undone, life can still go on ... just tag the right files
with "STRUTS_1_0_1_RELEASE" or something, and post a comment to STRUTS-DEV
on what the real tag is (for posterity).

Craig


On Tue, 20 Nov 2001, SCHACHTER,MICHAEL (HP-NewJersey,ex2) wrote:

> Date: Tue, 20 Nov 2001 20:57:29 -0800
> From: "SCHACHTER,MICHAEL (HP-NewJersey,ex2)" <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: i think i screwed up cvs...
>
> Hey,
>
> I did a
> "cvs rtag -b -r STRUTS_1_0 STRUTS_1_0_1 jakarta-struts", thinking
> it would create a local copy of STRUTS_1_0_1 stuff on my
> machine and I created another branch on the CVS repository
> called STRUTS_1_0_1... is there a way to get rid of that
> branch, base it off of STRUTS_1_0_BRANCH instead, or something
> else to un-screwup cvs?
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: cvs commit: jakarta-struts/src/share/org/apache/struts/upload BufferedMultipartInputStream.java MultipartIterator.java

2001-11-21 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)

Ted,

Unless someone else (Martin?) improved it, the problem that I think
you're talking about wasn't addressed. Are you referring to this bug:

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

The following bugs were addressed:

#3828, problem with equals() method (possibly because of file text
containing PGP signature)

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

#4427, where bytes can be lost when using the readLine(byte[],int,int).
this fix no longer affects the actual multipart form handling in struts,
just anyone using the MultipartIterator class on it's own.

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

#4701, report a premature closing of the input stream, instead of
leaving it up to a NullPointerException

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



-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 6:50 AM
To: Struts Developers List
Subject: Re: cvs commit:
jakarta-struts/src/share/org/apache/struts/upload
BufferedMultipartInputStream.java MultipartIterator.java


So, in the release notes (nightly and 1.0.1) we're saying 

Improved error-handling on out of bounds conditions

Does that cover well-enough what we're doing here? 

[EMAIL PROTECTED] wrote:
> 
> mschachter01/11/20 21:04:36
> 
>   Modified:src/share/org/apache/struts/upload Tag: STRUTS_1_0_BRANCH
> BufferedMultipartInputStream.java
> MultipartIterator.java
>   Log:
>- fix #3828, equals() method problem (ported from main branch)
>  Submitted By: Curt Hagenlocher
> 
>- fix #4427, lost bytes on read(byte[],int,int) (need to port to main
branch)
>  Submitted By: Mike Goutrie
> 
>- fix #4701, premature end of input stream not reported (need to port
to main branch)
>  Submitted By: Roland Huss
> 
>   Revision  ChangesPath
>   No   revision
> 
> 
>   No   revision
> 
> 
>   1.3.2.4   +40 -40
jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipartInputStre
am.java
> 
>   Index: BufferedMultipartInputStream.java
>   ===
>   RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipar
tInputStream.java,v
>   retrieving revision 1.3.2.3
>   retrieving revision 1.3.2.4
>   diff -u -r1.3.2.3 -r1.3.2.4
>   --- BufferedMultipartInputStream.java 2001/10/05 20:26:09 1.3.2.3
>   +++ BufferedMultipartInputStream.java 2001/11/21 05:04:36 1.3.2.4
>   @@ -10,60 +10,60 @@
> * readLine() method.
> */
>public class BufferedMultipartInputStream extends InputStream {
>   -
>   +
>/**
> * The underlying InputStream used by this class
> */
>protected InputStream inputStream;
>   -
>   +
>/**
> * The byte array used to hold buffered data
> */
>protected byte[] buffer;
>   -
>   +
>/**
> * The current offset we're at in the buffer's byte array
> */
>protected int bufferOffset = 0;
>   -
>   +
>/**
> * The size of the byte array buffer
> */
>protected int bufferSize = 8192;
>   -
>   +
>/**
> * The number of bytes read from the underlying InputStream that
are
> * in the buffer
> */
>protected int bufferLength = 0;
>   -
>   +
>/**
> * The total number of bytes read so far
> */
>protected int totalLength = 0;
>   -
>   +
>/**
> * The content length of the multipart data
> */
>protected long contentLength;
>   -
>   +
>/**
> * The maximum allowed size for the multipart data, or -1 for an
unlimited
> * maximum file length
> */
>protected long maxSize = -1;
>   -
>   +
>/**
> * Whether or not bytes up to the Content-Length have been read
> */
>protected boolean contentLengthMet = false;
>   -
>   +
>/**
> * Whether or not bytes up to the maximum length have been read
> */
>protected boolean maxLengthMet = false;
>   -
>   -
>   +
>   +
>/**
> * Public constructor for this class, just wraps the InputStream
> * given
>   @@ -81,14 +81,14 @@
>this.bufferSize = bufferSize;
>this.contentLength = contentLength;
>this.maxSize = maxSize;
>   -
>   +
>if (maxSize < contentLength) {
>throw new MaxLengthExceededException(maxSize);
>}
>buffer = new byte[bufferSize];
>fill();
>}
>   -
>   +
>/**
> * This method returns the number of available bytes left to read
> * in the buffer before it has to be refilled
>   @@ -96,50 +96,50 @@
>public int available() {
>return bufferLength - bufferOffset;
>}
>   -
>   +
>/**
> * This me

Re: cvs commit: jakarta-struts/src/share/org/apache/struts/uploadBufferedMultipartInputStream.java MultipartIterator.java

2001-11-21 Thread Ted Husted

Can you boil this down for an entry to the release notes?

"SCHACHTER,MICHAEL (HP-NewJersey,ex2)" wrote:
> 
> Ted,
> 
> Unless someone else (Martin?) improved it, the problem that I think
> you're talking about wasn't addressed. Are you referring to this bug:
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4170
> 
> The following bugs were addressed:
> 
> #3828, problem with equals() method (possibly because of file text
> containing PGP signature)
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3828
> 
> #4427, where bytes can be lost when using the readLine(byte[],int,int).
> this fix no longer affects the actual multipart form handling in struts,
> just anyone using the MultipartIterator class on it's own.
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4427
> 
> #4701, report a premature closing of the input stream, instead of
> leaving it up to a NullPointerException
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4701
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 21, 2001 6:50 AM
> To: Struts Developers List
> Subject: Re: cvs commit:
> jakarta-struts/src/share/org/apache/struts/upload
> BufferedMultipartInputStream.java MultipartIterator.java
> 
> So, in the release notes (nightly and 1.0.1) we're saying
> 
> Improved error-handling on out of bounds conditions
> 
> Does that cover well-enough what we're doing here?
> 
> [EMAIL PROTECTED] wrote:
> >
> > mschachter01/11/20 21:04:36
> >
> >   Modified:src/share/org/apache/struts/upload Tag: STRUTS_1_0_BRANCH
> > BufferedMultipartInputStream.java
> > MultipartIterator.java
> >   Log:
> >- fix #3828, equals() method problem (ported from main branch)
> >  Submitted By: Curt Hagenlocher
> >
> >- fix #4427, lost bytes on read(byte[],int,int) (need to port to main
> branch)
> >  Submitted By: Mike Goutrie
> >
> >- fix #4701, premature end of input stream not reported (need to port
> to main branch)
> >  Submitted By: Roland Huss
> >
> >   Revision  ChangesPath
> >   No   revision
> >
> >
> >   No   revision
> >
> >
> >   1.3.2.4   +40 -40
> jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipartInputStre
> am.java
> >
> >   Index: BufferedMultipartInputStream.java
> >   ===
> >   RCS file:
> /home/cvs/jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipar
> tInputStream.java,v
> >   retrieving revision 1.3.2.3
> >   retrieving revision 1.3.2.4
> >   diff -u -r1.3.2.3 -r1.3.2.4
> >   --- BufferedMultipartInputStream.java 2001/10/05 20:26:09 1.3.2.3
> >   +++ BufferedMultipartInputStream.java 2001/11/21 05:04:36 1.3.2.4
> >   @@ -10,60 +10,60 @@
> > * readLine() method.
> > */
> >public class BufferedMultipartInputStream extends InputStream {
> >   -
> >   +
> >/**
> > * The underlying InputStream used by this class
> > */
> >protected InputStream inputStream;
> >   -
> >   +
> >/**
> > * The byte array used to hold buffered data
> > */
> >protected byte[] buffer;
> >   -
> >   +
> >/**
> > * The current offset we're at in the buffer's byte array
> > */
> >protected int bufferOffset = 0;
> >   -
> >   +
> >/**
> > * The size of the byte array buffer
> > */
> >protected int bufferSize = 8192;
> >   -
> >   +
> >/**
> > * The number of bytes read from the underlying InputStream that
> are
> > * in the buffer
> > */
> >protected int bufferLength = 0;
> >   -
> >   +
> >/**
> > * The total number of bytes read so far
> > */
> >protected int totalLength = 0;
> >   -
> >   +
> >/**
> > * The content length of the multipart data
> > */
> >protected long contentLength;
> >   -
> >   +
> >/**
> > * The maximum allowed size for the multipart data, or -1 for an
> unlimited
> > * maximum file length
> > */
> >protected long maxSize = -1;
> >   -
> >   +
> >/**
> > * Whether or not bytes up to the Content-Length have been read
> > */
> >protected boolean contentLengthMet = false;
> >   -
> >   +
> >/**
> > * Whether or not bytes up to the maximum length have been read
> > */
> >protected boolean maxLengthMet = false;
> >   -
> >   -
> >   +
> >   +
> >/**
> > * Public constructor for this class, just wraps the InputStream
> > * given
> >   @@ -81,14 +81,14 @@
> >this.bufferSize = bufferSize;
> >this.contentLength = contentLength;
> >this.maxSize = maxSize;
> >   -
> >   +
> >if (maxSize < contentLength) {
> >throw new MaxLengthExceededException(m

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

2001-11-21 Thread SCHACHTER,MICHAEL (HP-NewJersey,ex2)

Fixed lost byte problem in
BufferedMultipartInputStream.readLine(byte[],int,int), 
ArrayIndexOutOfBoundsException situations in MultipartIterator.equals(...),
and
better reporting for premature closing of input streams while reading
multipart requests.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 11:13 AM
To: Struts Developers List
Subject: Re: cvs commit:
jakarta-struts/src/share/org/apache/struts/uploadBufferedMultipartInputS
tream.java MultipartIterator.java


Can you boil this down for an entry to the release notes?

"SCHACHTER,MICHAEL (HP-NewJersey,ex2)" wrote:
> 
> Ted,
> 
> Unless someone else (Martin?) improved it, the problem that I think
> you're talking about wasn't addressed. Are you referring to this bug:
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4170
> 
> The following bugs were addressed:
> 
> #3828, problem with equals() method (possibly because of file text
> containing PGP signature)
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3828
> 
> #4427, where bytes can be lost when using the readLine(byte[],int,int).
> this fix no longer affects the actual multipart form handling in struts,
> just anyone using the MultipartIterator class on it's own.
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4427
> 
> #4701, report a premature closing of the input stream, instead of
> leaving it up to a NullPointerException
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4701
> 
> -Original Message-
> From: Ted Husted [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 21, 2001 6:50 AM
> To: Struts Developers List
> Subject: Re: cvs commit:
> jakarta-struts/src/share/org/apache/struts/upload
> BufferedMultipartInputStream.java MultipartIterator.java
> 
> So, in the release notes (nightly and 1.0.1) we're saying
> 
> Improved error-handling on out of bounds conditions
> 
> Does that cover well-enough what we're doing here?
> 
> [EMAIL PROTECTED] wrote:
> >
> > mschachter01/11/20 21:04:36
> >
> >   Modified:src/share/org/apache/struts/upload Tag: STRUTS_1_0_BRANCH
> > BufferedMultipartInputStream.java
> > MultipartIterator.java
> >   Log:
> >- fix #3828, equals() method problem (ported from main branch)
> >  Submitted By: Curt Hagenlocher
> >
> >- fix #4427, lost bytes on read(byte[],int,int) (need to port to main
> branch)
> >  Submitted By: Mike Goutrie
> >
> >- fix #4701, premature end of input stream not reported (need to port
> to main branch)
> >  Submitted By: Roland Huss
> >
> >   Revision  ChangesPath
> >   No   revision
> >
> >
> >   No   revision
> >
> >
> >   1.3.2.4   +40 -40
>
jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipartInputStre
> am.java
> >
> >   Index: BufferedMultipartInputStream.java
> >   ===
> >   RCS file:
>
/home/cvs/jakarta-struts/src/share/org/apache/struts/upload/BufferedMultipar
> tInputStream.java,v
> >   retrieving revision 1.3.2.3
> >   retrieving revision 1.3.2.4
> >   diff -u -r1.3.2.3 -r1.3.2.4
> >   --- BufferedMultipartInputStream.java 2001/10/05 20:26:09 1.3.2.3
> >   +++ BufferedMultipartInputStream.java 2001/11/21 05:04:36 1.3.2.4
> >   @@ -10,60 +10,60 @@
> > * readLine() method.
> > */
> >public class BufferedMultipartInputStream extends InputStream {
> >   -
> >   +
> >/**
> > * The underlying InputStream used by this class
> > */
> >protected InputStream inputStream;
> >   -
> >   +
> >/**
> > * The byte array used to hold buffered data
> > */
> >protected byte[] buffer;
> >   -
> >   +
> >/**
> > * The current offset we're at in the buffer's byte array
> > */
> >protected int bufferOffset = 0;
> >   -
> >   +
> >/**
> > * The size of the byte array buffer
> > */
> >protected int bufferSize = 8192;
> >   -
> >   +
> >/**
> > * The number of bytes read from the underlying InputStream that
> are
> > * in the buffer
> > */
> >protected int bufferLength = 0;
> >   -
> >   +
> >/**
> > * The total number of bytes read so far
> > */
> >protected int totalLength = 0;
> >   -
> >   +
> >/**
> > * The content length of the multipart data
> > */
> >protected long contentLength;
> >   -
> >   +
> >/**
> > * The maximum allowed size for the multipart data, or -1 for an
> unlimited
> > * maximum file length
> > */
> >protected long maxSize = -1;
> >   -
> >   +
> >/**
> > * Whether or not bytes up to the Content-Length have been read
> > */
> >protected boolean contentLengthMet = false;
> >   -
> >   +
> >/**
> > * Whether or not bytes

DO NOT REPLY [Bug 5002] New: - Add a "format" attribute to

2001-11-21 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Add a "format" attribute to 

   Summary: Add a "format" attribute to 
   Product: Struts
   Version: 1.0 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Custom Tags
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I think that the  tag could support a "format" attribute which
looks for an instance of java.text.Format to use for formatting the bean or bean
property to be written out.
This would simplify formatting of values, without the need of other custom tags.
The scope to search the Format into could be specified with another attribute
(f.e. "formatScope").

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc release-notes-1.0.1.xml project.xml index.xml

2001-11-21 Thread husted

husted  01/11/21 08:10:22

  Modified:doc  Tag: STRUTS_1_0_BRANCH release-notes-1.0.1.xml
project.xml index.xml
  Log:
  Update documentation in anticipation of release candidate.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.3   +4 -1  jakarta-struts/doc/release-notes-1.0.1.xml
  
  Index: release-notes-1.0.1.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes-1.0.1.xml,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- release-notes-1.0.1.xml   2001/11/21 15:19:58 1.1.2.2
  +++ release-notes-1.0.1.xml   2001/11/21 16:10:21 1.1.2.3
  @@ -146,7 +146,10 @@
   The following changes and bug fixes have occurred in the file upload
   package (package org.apache.struts.upload):
   
  -Improved error-handling on out of bounds conditions.
  +Fixed lost byte problem in BufferedMultipartInputStream
  +Fixed ArrayIndexOutOfBoundsException situations
  +Better reporting for premature closing of input streams while reading
  +multipart requests.
   Additional fix for file corruption problem with uploads and new line 
characters.
   
   
  
  
  
  1.1.2.6   +13 -13jakarta-struts/doc/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/project.xml,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- project.xml   2001/11/21 15:19:58 1.1.2.5
  +++ project.xml   2001/11/21 16:10:21 1.1.2.6
  @@ -22,24 +22,24 @@
   
   
   
  -
  +
   http://jakarta.apache.org/site/mail.html"/>
   http://jakarta.apache.org/site/bugs.html"/>
   
   
   
   
  +  
href="api/org/apache/struts/taglib/bean/package-summary.html#package_description"/>
   
  +  
href="api/org/apache/struts/taglib/html/package-summary.html#package_description"/>
   
  +  
href="api/org/apache/struts/taglib/logic/package-summary.html#package_description"/>
   
  +  
href="api/org/apache/struts/taglib/template/package-summary.html#package_description"/>
   
  +  
href="api/org/apache/struts/digester/package-summary.html#package_description"/>
   
  +  
href="api/org/apache/struts/util/package-summary.html#package_description"/>
   
   
   
  @@ -54,12 +54,12 @@
   
   
   
  -
  -
  -
  -
  -
  -
  +http://jakarta.apache.org/struts/release-plan-1.0.1.html"/>
  +http://jakarta.apache.org/struts/installation.html"/>
  +http://jakarta.apache.org/struts/release-notes.html"/>
  +http://jakarta.apache.org/struts/api/index.html"/>
  +http://jakarta.apache.org/struts/proposal-workflow.html"/>
  +http://jakarta.apache.org/struts/todo-1.1.html"/>
   
   
   
  
  
  
  1.2.2.6   +2 -2  jakarta-struts/doc/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/index.xml,v
  retrieving revision 1.2.2.5
  retrieving revision 1.2.2.6
  diff -u -r1.2.2.5 -r1.2.2.6
  --- index.xml 2001/11/21 15:19:58 1.2.2.5
  +++ index.xml 2001/11/21 16:10:21 1.2.2.6
  @@ -54,9 +54,9 @@
 utility packages.
   
 For more detail about a specific class or package, the Struts 
  -  http://jakarta.apache.org/struts/api-1.0.1/index.html";>Javadocs
  +  Javadocs
 are comprehensive and carefully maintained. It is strongly recommended that 
  -  you refer to the http://jakarta.apache.org/struts/api-1.0.1/index.html";>Javadoc 
  +  you refer to the Javadoc 
 for each class as you begin to use it, to be sure important features and options 
 are not overlooked. What you don't know, can't help you.
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc/userGuide volunteers.xml introduction.xml index.xml building_view.xml building_model.xml building_controller.xml

2001-11-21 Thread husted

husted  01/11/21 08:12:18

  Modified:doc/userGuide Tag: STRUTS_1_0_BRANCH volunteers.xml
introduction.xml index.xml building_view.xml
building_model.xml building_controller.xml
  Log:
  Update documentation in anticipation of release candidate.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.2   +12 -2 jakarta-struts/doc/userGuide/volunteers.xml
  
  Index: volunteers.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/volunteers.xml,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- volunteers.xml2001/06/15 01:45:27 1.1.2.1
  +++ volunteers.xml2001/11/21 16:12:18 1.1.2.2
  @@ -32,6 +32,7 @@
   Martin Cooper
   Mike Schachter
   Niall Pemberton
  +Oleg V Alexeev
   Ralph Schaer
   Rob Leland
   Sean Kelly
  @@ -45,12 +46,15 @@
   Craig R. McClanahan
   David Geary
   dIon Gillard
  +Ed Burns
   Eric Wu
   John Rousseau
  +John Ueltzhoeffer
   Larry McCay
   Martin Cooper
   Matthias Kerkhoff
   Mike Schachter
  +Paul Runyan
   Robert Hayden
   Stanley Santiago
   Ted Husted
  @@ -61,18 +65,20 @@

   
   Craig R. McClanahan (craigmcc at apache.org)
  -David Geary (dgeary at apache.org)
   Michael Schachter   (mschachter at apache.org)
   Ted Husted  (husted at apache.org)
   Rob Leland  (rleland at apache.org)
   Vincent Massol  (vmassol at apache.org)
   Cedric Dumoulin (cedric.dumoulin at lifl.fr)
   Martin Cooper   (martinc at apache.org)
  +David Winterfeldt   (dwinterfeldt at apache.org)
  +Oleg Alexeev(oalexeev at apache.org)
   
   
   

   
  +David Geary
   Luis Arias
   Pierre Delilse
   
  @@ -267,5 +273,9 @@
   questions too. Now, I'm glad to be able to give something back to the 
   Struts community by helping others understand, and also by contributing 
   ideas and code to help make Struts even better than it already is.
  +
  +
  +
  +  Next: Struts Home
   
  -
  +
  
  
  
  1.1.2.6   +86 -58jakarta-struts/doc/userGuide/introduction.xml
  
  Index: introduction.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/introduction.xml,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- introduction.xml  2001/10/19 05:52:40 1.1.2.5
  +++ introduction.xml  2001/11/21 16:12:18 1.1.2.6
  @@ -15,24 +15,37 @@
   
 
   
  -  
  -
  +  
   
  -  Before getting started, you should know the basics of the following
  -  technologies:
  -
  +  This User Guide is written for active Web developers, and assumes a 
working 
  +  knowledge about how Java Web applications work. Before getting started, 
you should 
  +  understand the basics of these core technologies:
  +
  +
  +
  +  The HTTP Request/Response sequence.The canonical source for 
this
  +is http://www.ietf.org/rfc/rfc2616.txt?number=2616";>RFC 2616
  +- Hypertext Transfer Protocol (HTTP/1.1).
  +  Java Servlets. A good place to start is the
  +http://java.sun.com/products/jsp/product.html";>Sun Servlet product 
page
  +and the http://java.sun.com/docs/books/tutorial/";>Sun Java 
Tutorials.
  +  JavaServer Pages (JSP). Likewise, a good place to start is the
  +http://java.sun.com/products/jsp/product.html";>Sun JSP product 
page 
  +and the http://java.sun.com/docs/books/tutorial/";>Sun Java 
Tutorials.
  +  JavaBeans.Many Struts classes are written as JavaBeans. 
  +  If you haven't worked with JavaBeans before, see the 
  +  http://java.sun.com/products/javabeans/";>Sun JavaBean product 
page 
  +and the http://java.sun.com/docs/books/tutorial/";>Sun Java 
Tutorials
  +
  +
  +   If you've created Web applications on other platforms, you can probably 
follow along, 
  + and then visit the above references as needed. These are core technologies 
that 
  + will be used in nearly all Java Web development projects.
  +   
   
  - 
  -   The HTTP Request/Response sequence. The canonical source for this
  - is http://www.ietf.org/rfc/rfc2616.txt?number=2616";>RFC 2616
  - - Hypertext Transfer Protocol (HTTP/1.1).
  -   Java Servlets. A good place to start is the
  - http://java.sun.com/products/servlet/technical.html#tutorials";>
  - servlet tutorials.
  -   JavaServer Pages (JSP). Again, a good place to start is the
  - http://java.sun.com/products/jsp/technical.html#tutorials";>
  - JSP tutorials.
  - 
  + 
  +
  +  
   
   
 When Java servlets were first invented, many programmers quickly realized 
that they were a
  @@ -111,16 +124

cvs commit: jakarta-struts/doc release-notes.xml release-notes-1.0.1.xml

2001-11-21 Thread husted

husted  01/11/21 08:13:55

  Modified:doc  release-notes.xml release-notes-1.0.1.xml
  Log:
  Update release notes for fixes to upload package (thanks Mike!).
  
  Revision  ChangesPath
  1.8   +4 -1  jakarta-struts/doc/release-notes.xml
  
  Index: release-notes.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- release-notes.xml 2001/11/21 14:09:37 1.7
  +++ release-notes.xml 2001/11/21 16:13:55 1.8
  @@ -243,7 +243,10 @@
   package (package org.apache.struts.upload):
   
   Correct MultiboxTagdoAfterBody() to return SKIP_BODY instead of 
SKIP_PAGE.
  -Improved error-handling on out of bounds conditions.
  +Fixed lost byte problem in BufferedMultipartInputStream
  +Fixed ArrayIndexOutOfBoundsException situations
  +Better reporting for premature closing of input streams while reading
  +multipart requests.
   Additional fix for file corruption problem with uploads and new line 
characters.
   
   
  
  
  
  1.7   +4 -1  jakarta-struts/doc/release-notes-1.0.1.xml
  
  Index: release-notes-1.0.1.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes-1.0.1.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- release-notes-1.0.1.xml   2001/11/21 15:18:18 1.6
  +++ release-notes-1.0.1.xml   2001/11/21 16:13:55 1.7
  @@ -146,7 +146,10 @@
   The following changes and bug fixes have occurred in the file upload
   package (package org.apache.struts.upload):
   
  -Improved error-handling on out of bounds conditions.
  +Fixed lost byte problem in BufferedMultipartInputStream
  +Fixed ArrayIndexOutOfBoundsException situations
  +Better reporting for premature closing of input streams while reading
  +multipart requests.
   Additional fix for file corruption problem with uploads and new line 
characters.
   
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [VOTE] Struts 1.0.1 Release

2001-11-21 Thread Ted Husted

Ok, I'm +1 on a release candidate whenever you are Martin.

I tried to get the docs ready so all you would have to do is wrap it up
and post it.

Thanks for taking the lead on this!

(And now I'm off to see another wizard, Harry Potter ;-)

-T.

[EMAIL PROTECTED] wrote:
> 
> Many bug fixes and documentation updates have been made since the Struts 1.0
> release. Therefore, I propose that we release the tip of the
> STRUTS_1_0_BRANCH branch as Struts 1.0.1, to make these changes available as
> part of an official distribution of Struts. I have checked in a proposed
> release plan, which is available for review on the Struts web site:
> 
> http://jakarta.apache.org/struts/release-plan-1.0.1.html
> 
> Release plans must pass by a majority vote of committers on the project, but
> all other interested parties are welcome to cast their votes (and/or make
> comments or suggestions on the plan) as well.
> 
> --
> Vote:  Struts 1.0.1 Release Plan
> [ ] +1  I am in favor of the release, and will help support it
> [ ] +0  I am in favor of the release, but am unable to help support it
> [ ] -0  I am not in favor of the release
> [ ] -1  I am against this proposal (must include a reason).
> --
> 
> --
> Martin Cooper
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




About Log4j using

2001-11-21 Thread Oleg V Alexeev

Hello Struts,

  Now I try to make Jakarta-Log4j based Log4jService - service for
  ServiceManager - to make this service available for all Struts
  environment for common logging mechanism. But great part of Log4j is
  based on static methods and vars...

  My main idea is to write some kind of Adapter for various logging
  implementations - LogService. ServiceManager, ActionServlet and
  Action classes can use it to perform logging operations. Default
  implementation for LogService is Log4jService - ServiceManager
  instantiates it at init moment, if no one logger class is specified
  in config. By this scheme end developer can write his own LogService
  implementation (for example, JSR47 specification based) and all
  stuff will use it as standart logger.
  
  So logger instance must hide all details from Action classes.
  Concrete logger must work with some object to perform logging
  operations - create at init moment, configure it and use as internal
  resource. Static methods and vars in Log4j is not so good for such
  model

  Can anybody suppose any idea about logging mechanism or about some
  logging implementation without static stuff?
  
-- 
Best regards,
 Oleg  mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5008] New: - GenericeDataSource.getConnection not thread safe

2001-11-21 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

GenericeDataSource.getConnection not thread safe

   Summary: GenericeDataSource.getConnection not thread safe
   Product: Struts
   Version: 1.0 Final
  Platform: All
OS/Version: All
Status: NEW
  Severity: Minor
  Priority: Other
 Component: Utilities
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If multiple threads are started that access a virgin GenericDataSource with the
getConnection method it is possible to have more than one thread invoking
open(). This can result in several threads failing because of errors thrown in
the jdbc driver.

The code segment:

if (driver == null)
open();

should be made thread safe.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: About Log4j using

2001-11-21 Thread Incze Lajos

>   Can anybody suppose any idea about logging mechanism or about some
>   logging implementation without static stuff?
>   
> -- 
> Best regards,
>  Oleg  mailto:[EMAIL PROTECTED]

I'm not sure that with or without statics but some generic logger interface
work has started in the commons project. It's in a very early state and
gives you a generic Log interface and a LogSource factory which defaults
to log4j if available or to a NoOpLog logger if not. I think the plan was
to adapt this intterface to avalon's logkit and jdk1.4's log package, too.

incze

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/bean WriteTag.java

2001-11-21 Thread oalexeev

oalexeev01/11/21 10:47:05

  Modified:src/share/org/apache/struts/taglib/bean WriteTag.java
  Log:
  Add format, locale and bundle attributes to support values formatting according to 
current user locale, format string from attribute or format string from string 
resources.
  
  Revision  ChangesPath
  1.12  +187 -13   
jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java
  
  Index: WriteTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- WriteTag.java 2001/07/16 00:44:54 1.11
  +++ WriteTag.java 2001/11/21 18:47:05 1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java,v 1.11 
2001/07/16 00:44:54 craigmcc Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/07/16 00:44:54 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/WriteTag.java,v 1.12 
2001/11/21 18:47:05 oalexeev Exp $
  + * $Revision: 1.12 $
  + * $Date: 2001/11/21 18:47:05 $
*
* 
*
  @@ -62,11 +62,23 @@
   
   package org.apache.struts.taglib.bean;
   
  -
  +import java.sql.Timestamp;
  +import java.sql.Date;
  +import java.sql.Time;
  +import java.util.Locale;
  +import java.text.SimpleDateFormat;
  +import java.math.BigDecimal;
  +import java.math.BigInteger;
  +import java.text.Format;
  +import java.text.DateFormat;
  +import java.text.DecimalFormat;
  +import java.text.NumberFormat;
   import javax.servlet.jsp.JspException;
   import javax.servlet.jsp.PageContext;
   import javax.servlet.jsp.tagext.TagSupport;
   import org.apache.commons.beanutils.PropertyUtils;
  +import org.apache.struts.action.Action;
  +import org.apache.struts.util.MessageResources;
   import org.apache.struts.util.RequestUtils;
   import org.apache.struts.util.ResponseUtils;
   
  @@ -77,11 +89,52 @@
* output stream, optionally filtering characters that are sensitive in HTML.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.11 $ $Date: 2001/07/16 00:44:54 $
  + * @version $Revision: 1.12 $ $Date: 2001/11/21 18:47:05 $
*/
   
   public class WriteTag extends TagSupport {
   
  +/**
  + * The key to search default format string for timestamp
  + * in resources.
  + */
  +public static final String TIMESTAMP_FORMAT_KEY = 
  +  "org.apache.struts.taglib.bean.format.timestamp";
  +
  +/**
  + * The key to search default format string for date
  + * in resources.
  + */
  +public static final String DATE_FORMAT_KEY = 
  +  "org.apache.struts.taglib.bean.format.date";
  +
  +/**
  + * The key to search default format string for time
  + * in resources.
  + */
  +public static final String TIME_FORMAT_KEY = 
  +  "org.apache.struts.taglib.bean.format.time";
  +
  +/**
  + * The key to search default format string for int
  + * (byte, short, etc.) in resources.
  + */
  +public static final String INT_FORMAT_KEY = 
  +  "org.apache.struts.taglib.bean.format.int";
  +
  +/**
  + * The key to search default format string for float
  + * (double, BigDecimal) in resources.
  + */
  +public static final String FLOAT_FORMAT_KEY = 
  +  "org.apache.struts.taglib.bean.format.float";
  +
  +/**
  + * The message resources for this package.
  + */
  +protected static MessageResources messages =
  +MessageResources.getMessageResources
  +("org.apache.struts.taglib.bean.LocalStrings");
   
   // - Properties
   
  @@ -156,7 +209,45 @@
   this.scope = scope;
   }
   
  +/**
  + * The format string to be used as format to convert 
  + * value to String.
  + */
  +protected String formatStr = null;
  +
  +public String getFormat() {
  +return (this.formatStr);
  +}
  +
  +public void setFormat(String formatStr) {
  +this.formatStr = formatStr;
  +}
  +
  +/**
  + * The session scope key under which our Locale is stored.
  + */
  +protected String localeKey = Action.LOCALE_KEY;
  +
  +public String getLocale() {
  +return (this.localeKey);
  +}
  +
  +public void setLocale(String localeKey) {
  +this.localeKey = localeKey;
  +}
  +
  +/**
  + * The servlet context attribute key for our resources.
  + */
  +protected String bundle = Action.MESSAGES_KEY;
   
  +public String getBundle() {
  +return (this.bundle);
  +}
  +
  +public void setBundle(String bundle) {
  +this.bundle = bundle;
  +}
   
   // - Publi

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/bean LocalStrings.properties

2001-11-21 Thread oalexeev

oalexeev01/11/21 10:47:28

  Modified:src/share/org/apache/struts/taglib/bean
LocalStrings.properties
  Log:
  Add messages for new WriteTag version.
  
  Revision  ChangesPath
  1.14  +1 -0  
jakarta-struts/src/share/org/apache/struts/taglib/bean/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/LocalStrings.properties,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- LocalStrings.properties   2001/06/26 05:18:24 1.13
  +++ LocalStrings.properties   2001/11/21 18:47:28 1.14
  @@ -16,3 +16,4 @@
   size.collection=No valid collection specified for size tag
   struts.missing=No Struts internal object named {0} is available
   struts.selector=You must specify exactly one of formBean, forward, or mapping
  +write.format=Wrong format string: '{0}'
  \ No newline at end of file
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2001-11-21 Thread oalexeev

oalexeev01/11/21 10:48:42

  Modified:src/share/org/apache/struts/util RequestUtils.java
  Log:
  Add method retrieveUserLocale(PageContext pageContext, String localeKey)
  
  Revision  ChangesPath
  1.25  +21 -10
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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- RequestUtils.java 2001/11/21 14:00:28 1.24
  +++ RequestUtils.java 2001/11/21 18:48:42 1.25
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.24 
2001/11/21 14:00:28 husted Exp $
  - * $Revision: 1.24 $
  - * $Date: 2001/11/21 14:00:28 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v 1.25 
2001/11/21 18:48:42 oalexeev Exp $
  + * $Revision: 1.25 $
  + * $Date: 2001/11/21 18:48:42 $
*
* 
*
  @@ -102,7 +102,7 @@
*
* @author Craig R. McClanahan
* @author Ted Husted
  - * @version $Revision: 1.24 $ $Date: 2001/11/21 14:00:28 $
  + * @version $Revision: 1.25 $ $Date: 2001/11/21 18:48:42 $
*/
   
   public class RequestUtils {
  @@ -529,6 +529,22 @@
   
   
   /**
  + * Look up and return current user locale, based on the specified parameters.
  + * 
  + * @param pageContext The PageContext associated with this request
  + * @param locale Name of the session attribute for our user's Locale
  + */
  +public static Locale retrieveUserLocale( PageContext pageContext, String locale 
) {
  +if (locale == null)
  +locale = Action.LOCALE_KEY;
  +Locale userLocale = (Locale)
  +pageContext.getAttribute(locale, PageContext.SESSION_SCOPE);
  +if (userLocale == null)
  +userLocale = defaultLocale;
  +return userLocale;
  +}
  +
  +/**
* Look up and return a message string, based on the specified parameters.
*
* @param pageContext The PageContext associated with this request
  @@ -579,12 +595,7 @@
   }
   
   // Look up the requested Locale
  -if (locale == null)
  -locale = Action.LOCALE_KEY;
  -Locale userLocale = (Locale)
  -pageContext.getAttribute(locale, PageContext.SESSION_SCOPE);
  -if (userLocale == null)
  -userLocale = defaultLocale;
  +Locale userLocale = retrieveUserLocale( pageContext, locale );
   
   // Return the requested message
   if (args == null)
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2001-11-21 Thread oalexeev

oalexeev01/11/21 10:50:22

  Modified:doc  struts-bean.xml
  Log:
  Add descriptions for format, locale, bundle attributes of WriteTag.
  
  Revision  ChangesPath
  1.6   +65 -0 jakarta-struts/doc/struts-bean.xml
  
  Index: struts-bean.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/struts-bean.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- struts-bean.xml   2001/06/26 05:18:22 1.5
  +++ struts-bean.xml   2001/11/21 18:50:22 1.6
  @@ -966,6 +966,71 @@
 
   
   
  +
  +  format
  +  false
  +  true
  +  
  +  Specifies the format string to use to convert bean or property value 
  +  to the String. If nothing specified, then default format 
  +  string for value data type will be searched in message resources by
  +  according key.
  +  
  +   
  +   Key to search format string
  +   Data types
  +   
  +   
  +   org.apache.struts.taglib.bean.format.int
  +   java.lang.Byte, java.lang.Short, java.lang.Integer, java.lang.Long, 
  +   java.math.BigInteger
  +   
  +   
  +   org.apache.struts.taglib.bean.format.float
  +   java.lang.Float, java.lang.Double, java.math.BigDecimal
  +   
  +   
  +   org.apache.struts.taglib.bean.format.timestamp
  +   java.sql.Timestamp
  +   
  +   
  +   org.apache.struts.taglib.bean.format.date
  +   java.sql.Date
  +   
  +   
  +   org.apache.struts.taglib.bean.format.time
  +   java.sql.Time
  +   
  +  
  +  If nothing found, then will be used format string according to current 
  +  value data type and locale (object stored as session scope bean).
  +  
  +
  +
  +
  +  bundle
  +  false
  +  true
  +  
  +  The name of the application scope bean under which the
  +  MessageResources object containing our messages
  +  is stored.  If not specified, the default name (the value of
  +  the Action.MESSAGES_KEY constant string) is used.
  +  
  +
  +
  +
  +  locale
  +  false
  +  true
  +  
  +  The name of the session scope bean under which our currently
  +  selected Locale object is stored.  If not specified,
  +  the default name (the value of the Action.LOCALE_KEY
  +  constant string) is used.
  +  
  +
  +
 
   
   
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re[2]: About Log4j using

2001-11-21 Thread Oleg V Alexeev

Hello Incze,

Thursday, November 22, 2001, 12:23:34 AM, you wrote:

>>   Can anybody suppose any idea about logging mechanism or about some
>>   logging implementation without static stuff?
>>   
>> -- 
>> Best regards,
>>  Oleg  mailto:[EMAIL PROTECTED]

IL> I'm not sure that with or without statics but some generic logger interface
IL> work has started in the commons project. It's in a very early state and
IL> gives you a generic Log interface and a LogSource factory which defaults
IL> to log4j if available or to a NoOpLog logger if not. I think the plan was
IL> to adapt this intterface to avalon's logkit and jdk1.4's log package, too.

Thank you - good news...

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5002] - Add a "format" attribute to

2001-11-21 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Add a "format" attribute to 

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2001-11-21 14:13 ---
New version of bean:write is commited to the HEAD branch - now it supports 
formatting based of format string from attribute, from string resources. 
Default formatting is based on locale format.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




The resource page...

2001-11-21 Thread Arron Bates

How picky are we about getting names spelled right on the resources page 
right?...

:)


Arron.

( theKM*)
* no intelligence required.



DO NOT REPLY [Bug 4968] - Kambrium.net Technologies provides STRUTS consulting

2001-11-21 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Kambrium.net Technologies provides STRUTS consulting

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
Summary|Kambrium.net Technologies   |Kambrium.net Technologies
   |provides STRUTS consulting  |provides STRUTS consulting

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc/userGuide resources.xml

2001-11-21 Thread husted

husted  01/11/21 15:20:52

  Modified:doc/userGuide Tag: STRUTS_1_0_BRANCH resources.xml
  Log:
  Add Kambrium; fix Arron.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.4   +2 -1  jakarta-struts/doc/userGuide/resources.xml
  
  Index: resources.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/resources.xml,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- resources.xml 2001/11/21 15:19:19 1.1.2.3
  +++ resources.xml 2001/11/21 23:20:52 1.1.2.4
  @@ -9,7 +9,7 @@

   

  -http://husted.com/struts/resources/MonkeyStruts.htm";>MonkeyStruts by 
Aaron Bates. An approach to nesting beans.
  +http://husted.com/struts/resources/MonkeyStruts.htm";>MonkeyStruts by 
Arron Bates. An approach to nesting beans.
   http://www.multimania.com/bist77/struts.php";>REGEXP.VALIDATOR.STRUTS by Emmanuel Boudrant - A validation 
component that works with Struts 1.0, to manage form validation on server-side and 
client-side.
   http://husted.com/struts/resources/struts-was.zip";>Struts-WAS.jar by 
Christopher Assenza - Modified Struts 1.0 JAR for Websphere 3.5 or 4. Zipped for 
download. (For additional tips regarding Websphere 3.5 see http://jakarta.apache.org/struts/installation-was352-x.html";>http://jakarta.apache.org/struts/installation-was352-x.html.)
   http://struts.application-servers.com/";>Struts Layout by 
Improve - An extension library to  improve interfaces creation with Struts.
  @@ -228,6 +228,7 @@
 Husted dot Com   - http://husted.com/";>www.husted.com - 
mailto:[EMAIL PROTECTED]";>Ted Husted.
 JATEC AG - http://www.jatec.ch";> 
www.jatec.ch - mailto:[EMAIL PROTECTED]";>Sascha Urfer.
 jCorporate - http://www.jcorporate.com";>jcorporate.com - 
mailto:[EMAIL PROTECTED]";>Sandra Cann.
  +  Kambrium.net Technologies - http://www.kambrium.net/";>http://www.kambrium.net/";>kambrium.net - mailto:[EMAIL PROTECTED]";>Dirk Gabler.  
 Living Logic - http://www.livinglogic.de/";>www.livinglogic.de - mailto:[EMAIL PROTECTED]";>Matthias Bauer.
 Multitask Consulting - http://www.multitask.com.au/";>www.multitask.com.au - dIon Gillard.
 New Particles - http://www.newparticles.com/struts";>www.newparticles.com/struts - mailto:[EMAIL PROTECTED]";>Steve Wilkinson.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc/userGuide resources.xml

2001-11-21 Thread husted

husted  01/11/21 15:21:09

  Modified:doc/userGuide resources.xml
  Log:
  Add Kambrium; fix Arron.
  
  Revision  ChangesPath
  1.15  +2 -1  jakarta-struts/doc/userGuide/resources.xml
  
  Index: resources.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/resources.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- resources.xml 2001/11/21 12:05:49 1.14
  +++ resources.xml 2001/11/21 23:21:09 1.15
  @@ -9,7 +9,7 @@

   

  -http://husted.com/struts/resources/MonkeyStruts.htm";>MonkeyStruts by 
Aaron Bates. An approach to nesting beans.
  +http://husted.com/struts/resources/MonkeyStruts.htm";>MonkeyStruts by 
Arron Bates. An approach to nesting beans.
   http://www.multimania.com/bist77/struts.php";>REGEXP.VALIDATOR.STRUTS by Emmanuel Boudrant - A validation 
component that works with Struts 1.0, to manage form validation on server-side and 
client-side.
   http://husted.com/struts/resources/struts-was.zip";>Struts-WAS.jar by 
Christopher Assenza - Modified Struts 1.0 JAR for Websphere 3.5 or 4. Zipped for 
download. (For additional tips regarding Websphere 3.5 see http://jakarta.apache.org/struts/installation-was352-x.html";>http://jakarta.apache.org/struts/installation-was352-x.html.)
   http://struts.application-servers.com/";>Struts Layout by 
Improve - An extension library to  improve interfaces creation with Struts.
  @@ -228,6 +228,7 @@
 Husted dot Com   - http://husted.com/";>www.husted.com - 
mailto:[EMAIL PROTECTED]";>Ted Husted.
 JATEC AG - http://www.jatec.ch";> 
www.jatec.ch - mailto:[EMAIL PROTECTED]";>Sascha Urfer.
 jCorporate - http://www.jcorporate.com";>jcorporate.com - 
mailto:[EMAIL PROTECTED]";>Sandra Cann.
  +  Kambrium.net Technologies - http://www.kambrium.net/";>http://www.kambrium.net/";>kambrium.net - mailto:[EMAIL PROTECTED]";>Dirk Gabler.
 Living Logic - http://www.livinglogic.de/";>www.livinglogic.de - mailto:[EMAIL PROTECTED]";>Matthias Bauer.
 Multitask Consulting - http://www.multitask.com.au/";>www.multitask.com.au - dIon Gillard.
 New Particles - http://www.newparticles.com/struts";>www.newparticles.com/struts - mailto:[EMAIL PROTECTED]";>Steve Wilkinson.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2001-11-21 Thread husted

husted  01/11/21 15:24:56

  Modified:doc  release-notes.xml
  Log:
  Update release notes for bean:write enhancement.
  
  Revision  ChangesPath
  1.9   +2 -0  jakarta-struts/doc/release-notes.xml
  
  Index: release-notes.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/release-notes.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- release-notes.xml 2001/11/21 16:13:55 1.8
  +++ release-notes.xml 2001/11/21 23:24:56 1.9
  @@ -159,6 +159,8 @@
   struts-bean custom tag library (package
   org.apache.struts.taglib.bean):
   
  +Add format, locale and bundle attributes to support values formatting 
according to current
  +user locale, format string from attribute or format string from string 
resources.
   Correct the generated scripting variable type when the , 
, or  tag is used with the "multiple" 
attribute.
   Added name, property, and
   scope attributes to the 
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc/userGuide resources.xml

2001-11-21 Thread husted

husted  01/11/21 15:54:05

  Modified:doc/userGuide resources.xml
  Log:
  no message
  
  Revision  ChangesPath
  1.16  +1 -1  jakarta-struts/doc/userGuide/resources.xml
  
  Index: resources.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/resources.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- resources.xml 2001/11/21 23:21:09 1.15
  +++ resources.xml 2001/11/21 23:54:05 1.16
  @@ -228,7 +228,7 @@
 Husted dot Com   - http://husted.com/";>www.husted.com - 
mailto:[EMAIL PROTECTED]";>Ted Husted.
 JATEC AG - http://www.jatec.ch";> 
www.jatec.ch - mailto:[EMAIL PROTECTED]";>Sascha Urfer.
 jCorporate - http://www.jcorporate.com";>jcorporate.com - 
mailto:[EMAIL PROTECTED]";>Sandra Cann.
  -  Kambrium.net Technologies - http://www.kambrium.net/";>http://www.kambrium.net/";>kambrium.net - mailto:[EMAIL PROTECTED]";>Dirk Gabler.
  +  Kambrium.net Technologies - http://www.kambrium.net/";>http://www.kambrium.net/";>kambrium.net - mailto:[EMAIL PROTECTED]";>Dirk Gabler.
 Living Logic - http://www.livinglogic.de/";>www.livinglogic.de - mailto:[EMAIL PROTECTED]";>Matthias Bauer.
 Multitask Consulting - http://www.multitask.com.au/";>www.multitask.com.au - dIon Gillard.
 New Particles - http://www.newparticles.com/struts";>www.newparticles.com/struts - mailto:[EMAIL PROTECTED]";>Steve Wilkinson.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




cvs commit: jakarta-struts/doc/userGuide resources.xml

2001-11-21 Thread husted

husted  01/11/21 15:54:54

  Modified:doc/userGuide Tag: STRUTS_1_0_BRANCH resources.xml
  Log:
  no message
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.5   +1 -1  jakarta-struts/doc/userGuide/resources.xml
  
  Index: resources.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/resources.xml,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- resources.xml 2001/11/21 23:20:52 1.1.2.4
  +++ resources.xml 2001/11/21 23:54:53 1.1.2.5
  @@ -228,7 +228,7 @@
 Husted dot Com   - http://husted.com/";>www.husted.com - 
mailto:[EMAIL PROTECTED]";>Ted Husted.
 JATEC AG - http://www.jatec.ch";> 
www.jatec.ch - mailto:[EMAIL PROTECTED]";>Sascha Urfer.
 jCorporate - http://www.jcorporate.com";>jcorporate.com - 
mailto:[EMAIL PROTECTED]";>Sandra Cann.
  -  Kambrium.net Technologies - http://www.kambrium.net/";>http://www.kambrium.net/";>kambrium.net - mailto:[EMAIL PROTECTED]";>Dirk Gabler.  
  +  Kambrium.net Technologies - http://www.kambrium.net/";>http://www.kambrium.net/";>kambrium.net - mailto:[EMAIL PROTECTED]";>Dirk Gabler.  
 Living Logic - http://www.livinglogic.de/";>www.livinglogic.de - mailto:[EMAIL PROTECTED]";>Matthias Bauer.
 Multitask Consulting - http://www.multitask.com.au/";>www.multitask.com.au - dIon Gillard.
 New Particles - http://www.newparticles.com/struts";>www.newparticles.com/struts - mailto:[EMAIL PROTECTED]";>Steve Wilkinson.
  
  
  

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSTL (standard taglib) Early Access 2

2001-11-21 Thread John Yu

Camino Developers,

[DO NOT REPLY]

Keep an eye on this...

At 08:54 pm 21-11-2001 -0500, you wrote:
>Hi everyone -
>
>I'm pleased to announce Early Access Release 2 of the JSP Standard Tag
>Library, now called JSTL (which replaces the old acronym, JSPTL).  While
>it is important to realize that Early Access releases are not final and
>are always subject to change, JSTL EA2 moves us ever closer to a rich,
>robust standard.
>
>The EA2 release contains proposed standard tags for internationalization,
>data retrieval (via URLs), formatting, and XML manipulation (using XPath
>and XSLT).  It incorporates several new candidate scripting languages,
>notably including ECMAScript (most familiar in its incarnation as
>JavaScript).  The reference implementation is full of examples and
>supplemental support code, and we made sure it's actually well documented,
>so it can serve as a helpful guide for those wishing to implement and
>integrate custom tag libraries.  (Much of the code is intentionally
>written to be instructive.)
>
>The reference implementation is available from Jakarta Taglibs; its name
>is now the "standard" tag library.  Automated nightly builds for EA2 (and
>regular source distributions from the Taglibs site) will begin tonight,
>but if you want an early peek, you can use the following URLs:
>
>   Intro page:
> http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
>
>   Documentation:
> http://jakarta.apache.org/taglibs/doc/standard-doc/index.html
>
>   Binary dist:
> http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/
>
>Community support has been great so far; we're eager to get more feedback
>as we come closer to a feature-complete release.  Please send all comments
>to [EMAIL PROTECTED]  Many thanks!
>
>Enjoy Thanksgiving!
>
>Shawn Bayern
>JSTL reference-implementation lead
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 

-- 
John Yu   Scioworks Technologies
e: [EMAIL PROTECTED] w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Rapid WebApp Assembly for Struts"


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSTL (standard taglib) Early Access 2

2001-11-21 Thread John Yu

Oops, sent to the wrong email address...

At 09:55 am 22-11-2001 +0800, you wrote:
>Camino Developers,
>
>[DO NOT REPLY]
>
>Keep an eye on this...
>
>At 08:54 pm 21-11-2001 -0500, you wrote:
>>Hi everyone -
>>
>>I'm pleased to announce Early Access Release 2 of the JSP Standard Tag
>>Library, now called JSTL (which replaces the old acronym, JSPTL).  While
>>it is important to realize that Early Access releases are not final and
>>are always subject to change, JSTL EA2 moves us ever closer to a rich,
>>robust standard.
>>
>>The EA2 release contains proposed standard tags for internationalization,
>>data retrieval (via URLs), formatting, and XML manipulation (using XPath
>>and XSLT).  It incorporates several new candidate scripting languages,
>>notably including ECMAScript (most familiar in its incarnation as
>>JavaScript).  The reference implementation is full of examples and
>>supplemental support code, and we made sure it's actually well documented,
>>so it can serve as a helpful guide for those wishing to implement and
>>integrate custom tag libraries.  (Much of the code is intentionally
>>written to be instructive.)
>>
>>The reference implementation is available from Jakarta Taglibs; its name
>>is now the "standard" tag library.  Automated nightly builds for EA2 (and
>>regular source distributions from the Taglibs site) will begin tonight,
>>but if you want an early peek, you can use the following URLs:
>>
>>   Intro page:
>> http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
>>
>>   Documentation:
>> http://jakarta.apache.org/taglibs/doc/standard-doc/index.html
>>
>>   Binary dist:
>> http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/
>>
>>Community support has been great so far; we're eager to get more feedback
>>as we come closer to a feature-complete release.  Please send all comments
>>to [EMAIL PROTECTED]  Many thanks!
>>
>>Enjoy Thanksgiving!
>>
>>Shawn Bayern
>>JSTL reference-implementation lead
>>
>
>--
>John Yu   Scioworks Technologies
>e: [EMAIL PROTECTED] w: +(65) 873 5989
>w: http://www.scioworks.com   m: +(65) 9782 9610
>
>Scioworks Camino - "Rapid WebApp Assembly for Struts"


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts extensibility, multiple servlets, etc. (cont.)

2001-11-21 Thread Donnie Hale

Folks,

I know I'm jumping in late here, so please forgive me if I'm rehashing too
much old material, stepping on toes, etc. I've spent the last day or so
spelunking much of the ActionServlet and related code with an eye toward
extensibility. My motivation is adapting/extending Struts, preferably
without changes to its core source code (via non-committed changes), to
support Velocity as the view-rendering mechanism. I don't want to get into a
p***ing contest about JSPs vs. Velocity, etc. I'll also add that I took a
quick look at the ServiceManager stuff as well. Lastly, I did look at the
enhancement comments for the 1.0.1 release.

Here are some observations, etc.

- An implicit (or explicit) Struts premise, JSPs, results in a
predisposition to assume RequestDispatcher.forward is OK for every
app/view-rendering solution. For example, processValidate expects to be able
to forward if validation fails.

- The points in ActionServlet.process at which functionality can be
overridden are fragile, as you either have to call "super" or duplicate code
to get the current functionality plus add in your own.

- It seems odd to have code in ActionServlet.process specifically tied to
Forwarding/Redirecting ActionForwards. It would seem to be more "OO" to have
a virtual method on ActionMapping and/or ActionForward to achieve this in
the event that other types of ActionForwards need created.

I guess what I'd like to see is a decoupling of ActionServlet from the
"template method pattern" it attempts to follow (i.e. formalize the pattern
by specifying an interface). At the same time, I'd like to see the action /
action form / mapping decoupled from any assumptions about view rendering.
So we can keep all the great stuff for pre-populating beans, declarative
actions and mappings, etc.; but parameterize the mechanisms for initiating
the rendering of the view.

- A side effect of assuming forwarding is that lots of stuff gets put in the
various contexts (servlet, session, request). Just by looking at the key
names in Action.java, you can't tell which of those contexts to find them
in. I've thought that perhaps having a single object for each of those
contexts, accessible by name from those contexts, might be more flexible and
maintainable. For example:

class StrutsServletContext { ... }
getServletContext().setAttribute("org.apache...SERVLET_CONTEXT", // instance
of StrutsServletContext);

The StrutsServletContext class would have accessors for the message
resources, data sources, etc. Use the same pattern for request and session
contexts. I'm not sure, but I think that might ease moving to the multiple
controller support that's been discussed recently.

- I see that Digester has moved into Commons. Has any consideration been
given to moving MessageResources, etc. there? It seems like it's the kind of
self-contained, decoupled, reusable functionality that could go there.

Thanks for bearing with me. :)

Donnie


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DO NOT REPLY [Bug 5023] New: - html:form does not handle "action" attribute correctly

2001-11-21 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

html:form does not handle "action" attribute correctly

   Summary: html:form does not handle "action" attribute correctly
   Product: Struts
   Version: 1.0 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The bug is in the handling of the "action" attribute of the html:form tag. The 
form tag does not correctly process URL's that do not either start or end with a 
wildcard ("*"). The symptom is that a legitimate URL (e.g. "/MyLink" in the web 
app with root context "/rootcontext" gets mapped to "/rootcontext" rather than 
either leaving it as the relative URL "/MyLink" (which is my preferred approach) 
or mapping it to a server relative URL "/rootcontext/MyLink" as happens to the 
wildcard URL's.

The problem is in the FormTag.java file (no surprizes there). The following 
snippet is from that file and shows how the code does not handle the issue 
correctly.

The stated aim of this method is to return the action converted to a 
server-relative URL. The method creates a variable called "value" which it 
manipulates then returns as the action. The "value" variable is initially set to 
the context root (e.g. "/rootcontext"). A series of "if/then/else" statements 
precludes further processing of the "value" variable until it is finnaly 
returned containg only the context root. The particular case that affects me now 
is when the servletMapping is not null, and the action does not contain a "?", 
and doesn't start with or end with a "*".

/**
 * Return the form action converted into a server-relative URL.
 */
protected String getActionMappingURL() {

HttpServletRequest request =
(HttpServletRequest) pageContext.getRequest();
StringBuffer value = new StringBuffer(request.getContextPath());

// Use our servlet mapping, if one is specified
String servletMapping = (String)
pageContext.getAttribute(Action.SERVLET_KEY,
 PageContext.APPLICATION_SCOPE);
if (servletMapping != null) {
String queryString = null;
int question = action.indexOf("?");
if (question >= 0)
queryString = action.substring(question);
String actionMapping = getActionMappingName();
if (servletMapping.startsWith("*.")) {
value.append(actionMapping);
value.append(servletMapping.substring(1));
} else if (servletMapping.endsWith("/*")) {
value.append(servletMapping.substring
 (0, servletMapping.length() - 2));
value.append(actionMapping);
}
if (queryString != null)
value.append(queryString);
}

// Otherwise, assume extension mapping is in use and extension is
// already included in the action property
else {
if (!action.startsWith("/"))
value.append("/");
value.append(action);
}

// Return the completed value
return (value.toString());

}

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: i think i screwed up cvs...

2001-11-21 Thread Martin Cooper

You're off the hook now, Mike. ;-)

I managed to delete the bogus branch (using 'cvs rtag -d', as suggested by
you and Pete Donald), and label the tip of the 1.0 branch as 1.0.1, so we're
back on track.

--
Martin Cooper


- Original Message -
From: SCHACHTER,MICHAEL (HP-NewJersey,ex2) <[EMAIL PROTECTED]>
To: 'Struts Developers List' <[EMAIL PROTECTED]>
Sent: Wednesday, November 21, 2001 8:03 AM
Subject: RE: i think i screwed up cvs...


> Would it work if I did a
> "cvs rtag -d STRUTS_1_0_1 jakarta-struts"?
> I got that from here:
> http://www.cvshome.org/docs/manual/cvs_4.html#SEC51
>
> I'm really sorry about all this, I thought I wasn't
> connected to cvs.apache.org when I did it.
>
>
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 21, 2001 2:58 AM
> To: Struts Developers List
> Subject: Re: i think i screwed up cvs...
>
>
> Ack ... I don't know of any "undo" commands for this (hope somebody else
> does).  Of course, it is the "-b" part of the command that is the problem
> here.
>
> If it can't be undone, life can still go on ... just tag the right files
> with "STRUTS_1_0_1_RELEASE" or something, and post a comment to STRUTS-DEV
> on what the real tag is (for posterity).
>
> Craig
>
>
> On Tue, 20 Nov 2001, SCHACHTER,MICHAEL (HP-NewJersey,ex2) wrote:
>
> > Date: Tue, 20 Nov 2001 20:57:29 -0800
> > From: "SCHACHTER,MICHAEL (HP-NewJersey,ex2)" <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> > Subject: i think i screwed up cvs...
> >
> > Hey,
> >
> > I did a
> > "cvs rtag -b -r STRUTS_1_0 STRUTS_1_0_1 jakarta-struts", thinking
> > it would create a local copy of STRUTS_1_0_1 stuff on my
> > machine and I created another branch on the CVS repository
> > called STRUTS_1_0_1... is there a way to get rid of that
> > branch, base it off of STRUTS_1_0_BRANCH instead, or something
> > else to un-screwup cvs?
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
> >
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Fwd: Re: Extensibility of struts

2001-11-21 Thread Stefan Wachter

Hi Oleg,

we want to add automaticallly additional javascript code to all input
fields, links, and (non-submitting) buttons to implement a dirty-check-mechanism.

The original problem is that if some enters lots of data in a form and then
clicks a link then all the the entered form data is lost. Our customer does
not accept this behaviour (because many unskilled people use the application).
Therefore we added onchange-javascript-code to all input fields and
checking-javascript-code to all links and (non-submitting) buttons. Now in case of
dirtyness of a form a dialog pops up saying that the entered data will be lost
and allowing to cancel the request.

We already use the -tags in all our JSPs but we don't want to
have the necessary javascript code repeated everywhere (for consistency and
maintainance reasons). Therefore we want the necessary javascript code to be
added automatically.

If you think our solution is general enough then maybe this behaviour could
also be directly incorparted into struts.

Ciao,
--Stefan

> Hello Stefan,
> 
> Wednesday, November 21, 2001, 6:33:38 PM, you wrote:
> 
> SW> our first proposal concerning the extensibility of struts concerns the
> SW> html-taglib. Currently in the org.apache.struts.taglib.BaseHandlerTag
> the
> SW> members
> SW> (onClick, onDblClick, ...) are directly accessed. If the prepare
> methods
> SW> would use getter methods then you could easily extend the tags by
> SW> overloading the
> SW> getter method:
> 
> SW> Current version of BaseHandler has methods like this:
> 
> SW> private void prepareKeyEvents(StringBuffer handlers) {
> 
> SW> if (onKeyDown != null) {
> SW> handlers.append(" onKeyDown=\"");
> SW> handlers.append(onKeyDown);
> SW> handlers.append("\"");
> SW> }
> 
> SW> if (onKeyUp != null) {
> SW> handlers.append(" onKeyUp=\"");
> SW> handlers.append(onKeyUp);
> SW> handlers.append("\"");
> SW> }
> 
> SW> if (onKeyPress != null) {
> SW> handlers.append(" onKeyPress=\"");
> SW> handlers.append(onKeyPress);
> SW> handlers.append("\"");
> SW> }
> SW> }
> 
> SW> Our proposed version is:
> 
> SW> private void prepareKeyEvents(StringBuffer handlers) {
> 
> SW> if (getOnKeyDown() != null) {
> SW> handlers.append(" onKeyDown=\"");
> SW> handlers.append(getOnKeyDown());
> SW> handlers.append("\"");
> SW> }
> 
> SW> if (getOnKeyUp() != null) {
> SW> handlers.append(" onKeyUp=\"");
> SW> handlers.append(getOnKeyUp());
> SW> handlers.append("\"");
> SW> }
> 
> SW> if (getOnKeyPress() != null) {
> SW> handlers.append(" onKeyPress=\"");
> SW> handlers.append(getOnKeyPress());
> SW> handlers.append("\"");
> SW>}
> SW> }
> 
> SW> Admittedly this is not a great change, but it would help extensibility
> a
> SW> lot. Who decides if this proposal is incorporated into the next
> version?
> 
> SW> I will send you some more proposals soon.
> 
> It is good addition. But what reason to do so? Can you explain any
> situation when such methods can be used?
> 
> -- 
> Best regards,
>  Olegmailto:[EMAIL PROTECTED]
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JSTL (standard taglib) Early Access 2

2001-11-21 Thread Shawn Bayern

Hi everyone -

I'm pleased to announce Early Access Release 2 of the JSP Standard Tag
Library, now called JSTL (which replaces the old acronym, JSPTL).  While
it is important to realize that Early Access releases are not final and
are always subject to change, JSTL EA2 moves us ever closer to a rich,
robust standard.

The EA2 release contains proposed standard tags for internationalization,
data retrieval (via URLs), formatting, and XML manipulation (using XPath
and XSLT).  It incorporates several new candidate scripting languages,
notably including ECMAScript (most familiar in its incarnation as
JavaScript).  The reference implementation is full of examples and
supplemental support code, and we made sure it's actually well documented,
so it can serve as a helpful guide for those wishing to implement and
integrate custom tag libraries.  (Much of the code is intentionally
written to be instructive.)

The reference implementation is available from Jakarta Taglibs; its name
is now the "standard" tag library.  Automated nightly builds for EA2 (and
regular source distributions from the Taglibs site) will begin tonight,
but if you want an early peek, you can use the following URLs:

  Intro page:
http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

  Documentation:
http://jakarta.apache.org/taglibs/doc/standard-doc/index.html

  Binary dist:
http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/

Community support has been great so far; we're eager to get more feedback
as we come closer to a feature-complete release.  Please send all comments
to [EMAIL PROTECTED]  Many thanks!

Enjoy Thanksgiving!

Shawn Bayern
JSTL reference-implementation lead


--
To unsubscribe, e-mail:   
For additional commands, e-mail: