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

2002-07-27 Thread craigmcc

craigmcc2002/07/27 11:55:57

  Modified:.STATUS
   src/share/org/apache/struts/util RequestUtils.java
   web/example/WEB-INF struts-config.xml
  Log:
  Correct recycling of DynaActionForm beans in session scope.  Previously,
  and DynaActionForm subclass that was stored under the same session attribute
  key would be used -- now it needs to be a DynaActionForm for the requested
  form bean name.
  
  PR: Bugzilla #10979
  Submitted by: Gen Kagawa kagawa at sun12.tis.co.jp
  
  Revision  ChangesPath
  1.41  +1 -2  jakarta-struts/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/jakarta-struts/STATUS,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- STATUS25 Jul 2002 00:53:45 -  1.40
  +++ STATUS27 Jul 2002 18:55:56 -  1.41
  @@ -43,7 +43,6 @@
   
   10322 Problems with LookupDispatchAction and other locales
   10953 sub-application loses message resource
  -10979 DynaActionForm in session losts datas.
   
   
   Tiles Framework:
  
  
  
  1.50  +5 -5  
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- RequestUtils.java 24 Jul 2002 13:01:46 -  1.49
  +++ RequestUtils.java 27 Jul 2002 18:55:56 -  1.50
  @@ -568,7 +568,7 @@
   if (config.getDynamic()) {
   String className =
   ((DynaBean) instance).getDynaClass().getName();
  -if (className.equals(config.getType())) {
  +if (className.equals(config.getName())) {
   if (LOG.isDebugEnabled()) {
   LOG.debug
   ( Recycling existing DynaActionForm instance  +
  
  
  
  1.25  +1 -1  jakarta-struts/web/example/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===
  RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/struts-config.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- struts-config.xml 14 Jul 2002 01:35:18 -  1.24
  +++ struts-config.xml 27 Jul 2002 18:55:57 -  1.25
  @@ -113,7 +113,7 @@
   actionpath=/logon
  type=org.apache.struts.webapp.example.LogonAction
  name=logonForm
  -  scope=request
  +  scope=session
 input=logon
 exception
   key=expired.password
  
  
  

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




DO NOT REPLY [Bug 10979] - DynaActionForm in session losts datas.

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10979.
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=10979

DynaActionForm in session losts datas.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-07-27 18:59 ---
Fixed in nightly build 20020728.  Your analysis of how
RequestUtils.createActionForm() was checking for whether an existing instance
can be recycled is correct -- it was incorrectly accepting *any* DynaActionForm
instance stored under the same session attribute key, instead of just one for
the particular form bean being requested.

However, it is unlikely that anyone would have actually run into this bug,
unless they were using the attribute attribute on an action to cause the
form beans for different forms to be stored under the same key.

The contract for form beans is that the reset() method should reset all
properties to their initial state.  In particular, this is required to make sure
that boolean properties corresponding to checkboxes are set correctly.  If you
need your reset() method to have different behavior, you will need to subclass
DynaActionFormBean and implement a custom reset() method.

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




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

2002-07-27 Thread jholmes

jholmes 2002/07/27 14:50:22

  Modified:doc/resources examples.xml
  Log:
  added Vic's basicPortal
  
  Revision  ChangesPath
  1.2   +2 -3  jakarta-struts/doc/resources/examples.xml
  
  Index: examples.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/resources/examples.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- examples.xml  23 Jun 2002 17:40:36 -  1.1
  +++ examples.xml  27 Jul 2002 21:50:21 -  1.2
  @@ -10,9 +10,8 @@
   chapter name=Struts Resources href=http://husted.com/struts/resources; 
   
   section name=Projects and Examples
  -!-- pa href=http://www.basebeans.com/downloads.jsp;/a/p --
  -pa 
href=http://geocities.yahoo.com/dominique_plante/sdstuff/strutsGuessingGame1.0.zip;
  -bStruts Guessing Game v1.0/b/a by Dominique Plante - A guessing game written 
with Struts like the one that comes with Tomcat's examples, includes sources, ANT 
build script and a Struts jar distribution/p
  +pa href=http://basicportal.sourceforge.net/;bbasicPortal/b/a by Vic 
Cekvenich - Sample Struts + JSTL Vertical apps/p
  +pa 
href=http://geocities.yahoo.com/dominique_plante/sdstuff/strutsGuessingGame1.0.zip;bStruts
 Guessing Game v1.0/b/a by Dominique Plante - A guessing game written with Struts 
like the one that comes with Tomcat's examples, includes sources, ANT build script and 
a Struts jar distribution/p
   pa href=http://chiki.emaho.org/;bChiki/b/a by GhootEmaho - A Wiki-like 
webapp built using Struts and J2EE,  and runs on Tomcat./p
   pa href=http://husted.com/struts/resources/artimus.zip;bArtimus/b/a by 
Ted  Husted - News poster application. Demonstrates using beans beans and a JDBC 
database with Struts, along with other niceties. WAR zipped for download. Uses 
Scaffold package. See WEB-INF/README.txt for setup./p
   pa href=http://husted.com/struts/resources/scaffold.zip;bScaffold/b/a by 
Ted Husted - Utility package of classes that can be used with various Web 
applications./p
  
  
  

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




cvs commit: jakarta-struts/src/upload/org/apache/struts/webapp/upload UploadForm.java

2002-07-27 Thread martinc

martinc 2002/07/27 14:53:13

  Modified:.STATUS
   conf/share struts-config_1_1.dtd
   doc/userGuide building_controller.xml
   src/share/org/apache/struts/action ActionServlet.java
   src/share/org/apache/struts/config ControllerConfig.java
   src/upload/org/apache/struts/webapp/upload UploadForm.java
  Added:   src/share/org/apache/struts/upload
CommonsMultipartRequestHandler.java
  Log:
  Add new multipart file handler, based on the Commons FileUpload package,
  and make this the default. This new handler fixes several outstanding bugs
  related to file uploads, and should generally be more robust.
  
  If you need to use the original multipart handler for any reason, you
  should configure it by setting the 'multipartClass' attribute on the
  controller element in your struts-config.xml file.
  
  These changes will appear in the Struts 20020728 nightly build.
  
  PR: 4170, 5274, 9198
  Submitted by: Mike Schachter, Renaud Waldura, Alexander Lamm
  
  Revision  ChangesPath
  1.42  +2 -5  jakarta-struts/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/jakarta-struts/STATUS,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- STATUS27 Jul 2002 18:55:56 -  1.41
  +++ STATUS27 Jul 2002 21:53:13 -  1.42
  @@ -6,7 +6,7 @@
   OUTSTANDING BUGS IN STRUTS 1.1-b1 AND NIGHTLY BUILDS
   
   
  -   19 open bugs to swat!!
  +   15 open bugs to swat!!
   
   
   Controller:
  @@ -33,9 +33,6 @@
   
   File Upload:
   ---
  - 4170 MaxLengthExceeded doesn't stop file upload
  - 5274 OutOfMemoryError when uploading big files
  - 9198 First line feed in text parameters lost
   10388 ServletException: Multipart data doesn't start with boundary
   
   
  
  
  
  1.28  +2 -2  jakarta-struts/conf/share/struts-config_1_1.dtd
  
  Index: struts-config_1_1.dtd
  ===
  RCS file: /home/cvs/jakarta-struts/conf/share/struts-config_1_1.dtd,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- struts-config_1_1.dtd 24 Jul 2002 05:28:04 -  1.27
  +++ struts-config_1_1.dtd 27 Jul 2002 21:53:13 -  1.28
  @@ -514,7 +514,7 @@
   
multipartClass  The fully qualified Java class name of the multipart request
handler class to be used with this module.
  - [org.apache.struts.upload.DiskMultipartRequestHandler]
  + [org.apache.struts.upload.CommonsMultipartRequestHandler]
   
nocache Set to true if you want the controller to add HTTP headers
for defeating caching to every response from this module.
  
  
  
  1.23  +1 -1  jakarta-struts/doc/userGuide/building_controller.xml
  
  Index: building_controller.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/building_controller.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- building_controller.xml   6 Jul 2002 17:19:31 -   1.22
  +++ building_controller.xml   27 Jul 2002 21:53:13 -  1.23
  @@ -625,7 +625,7 @@
 megabytes, or gigabytes, respectively.  [250M]/li
 listrongmultipartClass/strong - The fully qualified name of the
 MultipartRequestHandler implementation class to be used for processing
  -  file uploads.  [org.apache.struts.upload.DiskMultipartRequestHandler]
  +  file uploads.  
[org.apache.struts.upload.CommonsMultipartRequestHandler]
 /li
 listrongnocache/strong - If set to codetrue/code, add HTTP 
headers
 to every response intended to defeat browser caching of any response 
we
  
  
  
  1.119 +5 -5  
jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
  
  Index: ActionServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
  retrieving revision 1.118
  retrieving revision 1.119
  diff -u -r1.118 -r1.119
  --- ActionServlet.java24 Jul 2002 05:28:04 -  1.118
  +++ ActionServlet.java27 Jul 2002 21:53:13 -  1.119
  @@ -278,7 +278,7 @@
* listrongmultipartClass/strong - The fully qualified name of the
* MultipartRequestHandler implementation class to be used for processing
* file uploads. If set to codenone/code, disables Struts multipart
  - * request handling.  [org.apache.struts.upload.DiskMultipartRequestHandler]
  + * request 

DO NOT REPLY [Bug 5274] - OutOfMemoryError when uploading big files

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5274.
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=5274

OutOfMemoryError when uploading big files

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-07-27 22:08 ---
This is fixed in the new CommonsMultipartRequestHandler, which is the default 
multipart handler as of the 20020728 nightly build.

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




DO NOT REPLY [Bug 9198] - First line feed in text parameters lost

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9198.
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=9198

First line feed in text parameters lost

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-07-27 22:08 ---
This is fixed in the new CommonsMultipartRequestHandler, which is the default 
multipart handler as of the 20020728 nightly build.

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




DO NOT REPLY [Bug 10388] - ServletException: Multipart data doesn't start with boundary (when calling form.validate() in Action)

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10388.
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=10388

ServletException: Multipart data doesn't start with boundary (when calling 
form.validate() in Action)





--- Additional Comments From [EMAIL PROTECTED]  2002-07-27 22:36 ---
There is a new multipart file handler in Struts as of the 20020728 nightly 
builds. This may resolve the problem you are seeing, so you might want to try 
it.

Looking at your code again, though, I guess I don't understand what you are 
trying to do. You should never have to write code that works directly with the 
MultipartRequestHandler, either in your form beans or in your actions. All of 
this is intended to be transparent to you, so that you only need to write code 
that extracts the uploaded file information from the FormFile objects in your 
form bean.

Your form bean should have the following:

protected FormFile theFile;

public FormFile getTheFile() {
return theFile;
}

public void setTheFile(FormFile theFile) {
this.theFile = theFile;
}

Then you simply access the uploaded file in your action using:

FormFile uploadedFile = myForm.getTheFile();

and go from there.

See the struts-upload web app included in the Struts distribution for more 
detail on how to handle this.

If these comments help you resolve your problem, or you have otherwise resolved 
it, then please mark this bug as resolved, or add a comment to let us know, and 
we'll do that.

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




DO NOT REPLY [Bug 10953] - sub-application loses message resource

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10953.
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=10953

sub-application loses message resource

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME



--- Additional Comments From [EMAIL PROTECTED]  2002-07-27 22:49 ---
Without a concrete test case to show what's wrong, it is not possible to do
anything with this bug report.

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




cvs commit: jakarta-struts STATUS

2002-07-27 Thread craigmcc

craigmcc2002/07/27 15:50:38

  Modified:.STATUS
  Log:
  Pick off a couple more.
  
  Revision  ChangesPath
  1.43  +2 -4  jakarta-struts/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/jakarta-struts/STATUS,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- STATUS27 Jul 2002 21:53:13 -  1.42
  +++ STATUS27 Jul 2002 22:50:38 -  1.43
  @@ -6,7 +6,7 @@
   OUTSTANDING BUGS IN STRUTS 1.1-b1 AND NIGHTLY BUILDS
   
   
  -   15 open bugs to swat!!
  +   13 open bugs to swat!!
   
   
   Controller:
  @@ -18,7 +18,6 @@
   Custom Tags:
   ---
1586 The html:form tag generates incorrect focus javascript for radio buttons.
  - 8460 using null=false in message-resources adds alt  title element to generated 
html
   
   
   Documentation:
  @@ -39,7 +38,6 @@
   Standard Actions:
   
   10322 Problems with LookupDispatchAction and other locales
  -10953 sub-application loses message resource
   
   
   Tiles Framework:
  
  
  

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




DO NOT REPLY [Bug 11021] - ActionForward or html:link tag does not support absolute URIs

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11021.
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=11021

ActionForward or html:link tag does not support absolute URIs

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-07-27 23:26 ---
Fixed in nightly build 20020728 -- I'm hoping I did not also break something
with forwards that point at Tiles definitions.

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




cvs commit: jakarta-struts/src/test/org/apache/struts/util TestRequestUtils.java

2002-07-27 Thread craigmcc

craigmcc2002/07/27 16:26:09

  Modified:.STATUS
   src/share/org/apache/struts/util RequestUtils.java
   src/test/org/apache/struts/mock TestMockBase.java
   src/test/org/apache/struts/util TestRequestUtils.java
  Log:
  Fixed computeURL() so that it supports absolute and relative URLs again.  This
  fixes the bug in html:link that Ted reported, but I don't know what it does
  to forwards that are actually tiles definitions -- can someone please check
  that I didn't break this?
  
  PR: Bugzilla #11021
  Submitted by: Ted Husted husted at apache.org
  
  Revision  ChangesPath
  1.44  +2 -3  jakarta-struts/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/jakarta-struts/STATUS,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- STATUS27 Jul 2002 22:50:38 -  1.43
  +++ STATUS27 Jul 2002 23:26:08 -  1.44
  @@ -6,12 +6,11 @@
   OUTSTANDING BUGS IN STRUTS 1.1-b1 AND NIGHTLY BUILDS
   
   
  -   13 open bugs to swat!!
  +   12 open bugs to swat!!
   
   
   Controller:
   --
  -11021 ActionForward or html:link tag does not support absolute URIs
   11089 Data source keys are global, even when using application modules
   
   
  
  
  
  1.51  +10 -6 
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.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- RequestUtils.java 27 Jul 2002 18:55:56 -  1.50
  +++ RequestUtils.java 27 Jul 2002 23:26:08 -  1.51
  @@ -412,8 +412,12 @@
   if (fc.getRedirect()) {
   redirect = true;
   }
  -url.append(request.getContextPath());
  -url.append(forwardURL(request, fc));
  +if (fc.getPath().startsWith(/)) {
  +url.append(request.getContextPath());
  +url.append(forwardURL(request, fc));
  +} else {
  +url.append(fc.getPath());
  +}
   } else if (href != null) {
   url.append(href);
   } else /* if (page != null) */ {
  
  
  
  1.5   +14 -4 jakarta-struts/src/test/org/apache/struts/mock/TestMockBase.java
  
  Index: TestMockBase.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/mock/TestMockBase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestMockBase.java 10 Jul 2002 20:36:23 -  1.4
  +++ TestMockBase.java 27 Jul 2002 23:26:09 -  1.5
  @@ -160,6 +160,11 @@
   appConfig = new ApplicationConfig();
   context.setAttribute(Action.APPLICATION_KEY, appConfig);
   
  +// Forward external to http://jakarta.apache.org/;
  +appConfig.addForwardConfig
  +(new ActionForward(external, http://jakarta.apache.org/;,
  +   false, false));
  +
   // Forward foo to /bar.jsp
   appConfig.addForwardConfig
   (new ActionForward(foo, /bar.jsp, false, false));
  @@ -223,6 +228,11 @@
   
   appConfig2 = new ApplicationConfig(/2);
   context.setAttribute(Action.APPLICATION_KEY + /2, appConfig2);
  +
  +// Forward external to http://jakarta.apache.org/;
  +appConfig2.addForwardConfig
  +(new ActionForward(external, http://jakarta.apache.org/;,
  +   false, false));
   
   // Forward foo to /baz.jsp (different from default)
   appConfig2.addForwardConfig
  
  
  
  1.10  +53 -8 
jakarta-struts/src/test/org/apache/struts/util/TestRequestUtils.java
  
  Index: TestRequestUtils.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/util/TestRequestUtils.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestRequestUtils.java 24 Jul 2002 13:01:46 -  1.9
  +++ TestRequestUtils.java 27 Jul 2002 23:26:09 -  1.10
  @@ -605,7 +605,8 @@
   }
   assertNotNull(url present, url);
   assertEquals(url value,
  - /myapp/relative.jsp,
  + // /myapp/relative.jsp,
  + relative.jsp,
url);
   }
   
  @@ -625,7 +626,28 @@
   }
   assertNotNull(url present, url);
   assertEquals(url value,
  - /myapp/relative.jsp,
  +   

DO NOT REPLY [Bug 10322] - Problems with LookupDispatchAction and other locals

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10322.
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=10322

Problems with LookupDispatchAction and other locals

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-07-27 23:48 ---
Fixed in nightly build 20020728.

I don't have a good test case for this -- please verify that it is working
correctly and set the status of this bug to CLOSED.

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




cvs commit: jakarta-struts/src/share/org/apache/struts/actions LookupDispatchAction.java

2002-07-27 Thread craigmcc

craigmcc2002/07/27 16:49:58

  Modified:.STATUS
   src/share/org/apache/struts/actions
LookupDispatchAction.java
  Log:
  Fix LookupDispatchAction to work when the button labels are generated
  from other locales.
  
  PR: Bugzilla #10322
Bug report submitted by Henning Schmidt h.schmidt at mkg-bank.de
Patch (thanks!) submitted by Scott Carlson scott.carlson at yahoo.com
  
  Revision  ChangesPath
  1.45  +2 -3  jakarta-struts/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/jakarta-struts/STATUS,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- STATUS27 Jul 2002 23:26:08 -  1.44
  +++ STATUS27 Jul 2002 23:49:58 -  1.45
  @@ -6,7 +6,7 @@
   OUTSTANDING BUGS IN STRUTS 1.1-b1 AND NIGHTLY BUILDS
   
   
  -   12 open bugs to swat!!
  +   11 open bugs to swat!!
   
   
   Controller:
  @@ -36,7 +36,6 @@
   
   Standard Actions:
   
  -10322 Problems with LookupDispatchAction and other locales
   
   
   Tiles Framework:
  
  
  
  1.6   +29 -15
jakarta-struts/src/share/org/apache/struts/actions/LookupDispatchAction.java
  
  Index: LookupDispatchAction.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/actions/LookupDispatchAction.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LookupDispatchAction.java 25 Jun 2002 18:26:15 -  1.5
  +++ LookupDispatchAction.java 27 Jul 2002 23:49:58 -  1.6
  @@ -60,6 +60,7 @@
   import java.lang.reflect.Method;
   import java.util.HashMap;
   import java.util.Iterator;
  +import java.util.Locale;
   import java.util.Map;
   
   import javax.servlet.ServletException;
  @@ -143,6 +144,7 @@
*  is found then an exception will be thrown.
*
*@author Erik Hatcher
  + *@author Scott Carlson
*/
   
   public abstract class LookupDispatchAction extends DispatchAction {
  @@ -150,7 +152,7 @@
   /**
* Reverse lookup map from resource value to resource key.
*/
  -protected Map lookupMap = null;
  +protected Map localeMap = new HashMap();
   
   /**
* Resource key to method name lookup
  @@ -198,20 +200,32 @@
   throw new ServletException(message);
   }
   
  -if (lookupMap == null) {
  -// Build the key lookup map
  -lookupMap = new HashMap();
  -MessageResources resources = (MessageResources)
  -request.getAttribute(Action.MESSAGES_KEY);
  -
  -keyMethodMap = getKeyMethodMap();
  -
  -Iterator iter = keyMethodMap.keySet().iterator();
  -while (iter.hasNext()) {
  -String key = (String) iter.next();
  -String text = resources.getMessage(key);
  -if ((text != null)  !lookupMap.containsKey(text)) {
  -lookupMap.put(text, key);
  +// Based on this request's Locale get the lookupMap
  +Map lookupMap = null;
  +Locale userLocale = getLocale(request);
  +boolean newLookupMap = false;
  +synchronized (localeMap) {
  +lookupMap = (Map) localeMap.get(userLocale);
  +if (lookupMap == null) {
  +newLookupMap = true;
  +lookupMap = new HashMap();
  +localeMap.put(userLocale, lookupMap);
  +}
  +}
  +synchronized (lookupMap) {
  +if (newLookupMap) {
  +// This is the first time this Locale is used
  +// Build the reverse lookup Map.
  +MessageResources resources = (MessageResources)
  +request.getAttribute(Action.MESSAGES_KEY);
  +keyMethodMap = getKeyMethodMap();
  +Iterator iter = keyMethodMap.keySet().iterator();
  +while (iter.hasNext()) {
  +String key = (String) iter.next();
  +String text = resources.getMessage(userLocale, key);
  +if ((text != null)  !lookupMap.containsKey(text)) {
  +lookupMap.put(text, key);
  +}
   }
   }
   }
  
  
  

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




DO NOT REPLY [Bug 11089] - Data source keys are global, even when using application modules

2002-07-27 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11089.
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=11089

Data source keys are global, even when using application modules

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-07-28 00:16 ---
It turns out that the data sources were already being stored under
application-specific attributes (because the app prefix was appended, just as we
do for message resources instances.

Added convenience accessors getDataSource() and getResources() in Action that
will grab you the requested (non-default) DataSource or MessageResources
instance for your application module, using the value you specified for the
key attribute in the corresponding data-source or message-resources
element in struts-config.xml.  This is available in nightly build 20020728.

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




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

2002-07-27 Thread craigmcc

craigmcc2002/07/27 17:17:27

  Modified:.STATUS
   src/share/org/apache/struts/action Action.java
  Log:
  Add convenience accessors for application module specific DataSource and
  MessageResources instances, based on the key values specified in the
  data-source and message-resources elements in your application module's
  struts-config.xml file.
  
  PR:  #11089
  
  Revision  ChangesPath
  1.46  +2 -3  jakarta-struts/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/jakarta-struts/STATUS,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- STATUS27 Jul 2002 23:49:58 -  1.45
  +++ STATUS28 Jul 2002 00:17:27 -  1.46
  @@ -6,12 +6,11 @@
   OUTSTANDING BUGS IN STRUTS 1.1-b1 AND NIGHTLY BUILDS
   
   
  -   11 open bugs to swat!!
  +   10 open bugs to swat!!
   
   
   Controller:
   --
  -11089 Data source keys are global, even when using application modules
   
   
   Custom Tags:
  
  
  
  1.46  +83 -5 jakarta-struts/src/share/org/apache/struts/action/Action.java
  
  Index: Action.java
  ===
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/Action.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- Action.java   24 Jul 2002 05:06:05 -  1.45
  +++ Action.java   28 Jul 2002 00:17:27 -  1.46
  @@ -68,13 +68,16 @@
   import java.security.NoSuchAlgorithmException;
   import java.util.Locale;
   import java.util.Hashtable;
  +import javax.servlet.ServletContext;
   import javax.servlet.ServletException;
   import javax.servlet.ServletRequest;
   import javax.servlet.ServletResponse;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpSession;
  +import javax.sql.DataSource;
   import org.apache.struts.Globals;
  +import org.apache.struts.config.ApplicationConfig;
   import org.apache.struts.taglib.html.Constants;
   import org.apache.struts.util.MessageResources;
   import org.apache.struts.upload.MultipartRequestHandler;
  @@ -495,6 +498,51 @@
   
   
   /**
  + * Return the default data source for the current application module.
  + *
  + * @param request The servlet request we are processing
  + *
  + * @since Struts 1.1b2
  + */
  +protected DataSource getDataSource(HttpServletRequest request) {
  +
  +return (getDataSource(request, DATA_SOURCE_KEY));
  +
  +}
  +
  +
  +
  +/**
  + * Return the specified data source for the current application
  + * module.
  + *
  + * @param request The servlet request we are processing
  + * @param key The key specified in the
  + *  codelt;message-resourcesgt;/code element for the
  + *  requested bundle
  + *
  + * @since Struts 1.1b2
  + */
  +protected DataSource getDataSource(HttpServletRequest request,
  +   String key) {
  +
  +// Identify the current application module
  +ServletContext context = getServlet().getServletContext();
  +ApplicationConfig appConfig = (ApplicationConfig)
  +request.getAttribute(Action.APPLICATION_KEY);
  +if (appConfig == null) {
  +appConfig = (ApplicationConfig)
  +context.getAttribute(Action.APPLICATION_KEY);
  +}
  +
  +// Return the requested data source instance
  +return ((DataSource) context.getAttribute
  +(key + appConfig.getPrefix()));
  +
  +}
  +
  +
  +/**
* Return the user's currently selected Locale.
*
* @param request The request we are processing
  @@ -526,7 +574,7 @@
   
   
   /**
  - * Return the message resources for the current application module.
  + * Return the default message resources for the current application module.
*
* @param request The servlet request we are processing
* @since Struts 1.1
  @@ -537,6 +585,36 @@
   
   }
   
  +
  +
  +/**
  + * Return the specified message resources for the current application
  + * module.
  + *
  + * @param request The servlet request we are processing
  + * @param key The key specified in the
  + *  codelt;message-resourcesgt;/code element for the
  + *  requested bundle
  + *
  + * @since Struts 1.1b2
  + */
  +protected MessageResources getResources(HttpServletRequest request,
  +String key) {
  +
  +// Identify the current application module
  +ServletContext context = getServlet().getServletContext();
  +

Last Few Bugs for Struts 1.1-beta-2

2002-07-27 Thread Craig R. McClanahan

It looks like we're on the home stretch for fixing the remaining bugs
standing in the way of a 1.1-beta-2 release.  Could someone (especially
David) take a look at the outstanding bug reports against validator (both
here and on commons)?  If the proposed patches look reasonable but you
don't have time to commit them, just add a note on the bug reports and
someone else can do the grunt work.

Then, we just need someone to be release manager again.  Martin, would you
be willing to do the honors for another round?

Craig



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




cvs commit: jakarta-struts/doc/userGuide index.xml preface.xml

2002-07-27 Thread craigmcc

craigmcc2002/07/27 19:25:58

  Modified:doc/userGuide index.xml preface.xml
  Log:
  Check in a bunch more pointers to further information, and start filling
  out the sections on servlet topics.
  
  Revision  ChangesPath
  1.13  +10 -8 jakarta-struts/doc/userGuide/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/index.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- index.xml 5 Jul 2002 15:55:48 -   1.12
  +++ index.xml 28 Jul 2002 02:25:58 -  1.13
  @@ -18,14 +18,16 @@
   ul
   lia href=preface.html0. Preface/a
   ul
  -  lia href=preface.html#httpHTTP, HTML, and User Agents/a/li
  -  lia href=preface.html#cycleThe HTTP Request/Response 
Cycle/a/li
  -  lia href=preface.html#javaThe Java Language and Application 
Frameworks/a/li
  -  lia href=preface.html#javabeansJavaBeans/a/li
  -  lia href=preface.html#resourcesProperties files and  
ResourceBundles/a/li
  -  lia href=preface.html#servletsJava Servlets/a/li
  -  lia href=preface.html#jspJavaServer Pages and JSP Tag 
Libraries/a/li
  -  lia href=preface.html#xmlExtensible Markup Language/a/li
  +  lia href=preface.html#suspects0.1 The Usual Suspects/a/li
  +  lia href=preface.html#http0.2 HTTP, HTML, and User 
Agents/a/li
  +  lia href=preface.html#cycle0.3 The HTTP Request/Response 
Cycle/a/li
  +  lia href=preface.html#java0.4 The Java Language and Application 
Frameworks/a/li
  +  lia href=preface.html#javabeans0.5 JavaBeans/a/li
  +  lia href=preface.html#resources0.6 Properties Files and  
ResourceBundles/a/li
  +  lia href=preface.html#servlets0.7 Java Servlets/a/li
  +  lia href=preface.html#jsp0.8 JavaServer Pages and JSP Tag 
Libraries/a/li
  +  lia href=preface.html#xml0.9 Extensible Markup Language/a/li
  +  lia href=preface.html#jaas0.10 JAAS/a/li
   /ul/li

  
  
  
  
  1.6   +327 -32   jakarta-struts/doc/userGuide/preface.xml
  
  Index: preface.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/preface.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- preface.xml   12 Jul 2002 03:59:32 -  1.5
  +++ preface.xml   28 Jul 2002 02:25:58 -  1.6
  @@ -11,7 +11,7 @@
   
 chapter name=0. Preface: Core Technologies
   
  -  section name=0.1 The Usual Suspects href=prereqs
  +  section name=0.1 The Usual Suspects href=suspects
   
   p
 This User Guide is written for active web developers and assumes a working
  @@ -24,7 +24,7 @@
 lia href=#cycleThe HTTP Request/Response Cycle/a/li
 lia href=#javaThe Java Language and Application Frameworks/a/li
 lia href=#javabeansJavaBeans/a/li
  -  lia href=#resourcesProperties files and  ResourceBundles/a/li
  +  lia href=#resourcesProperties Files and  ResourceBundles/a/li
 lia href=#servletsJava Servlets/a/li
 lia href=#jspJavaServer Pages and JSP Tag Libraries/a/li
 lia href=#xmlExtensible Markup Language/a/li
  @@ -72,6 +72,12 @@
   lia href=http://www.w3.org/MarkUp/Guide/;bGetting started with 
HTML/b/a by Dave Raggett/li
   lia 
href=http://java.sun.com/webservices/docs/1.0/tutorial/doc/HTTP.html#63796;
   bHTTP Overview/b/a in the Java Web Services Tutorial./li
  +lia href=http://www.rfc-editor.org/rfc/rfc2616.txt;strongHTTP/1.1
  +/strong/a Specification/li
  +lia href=http://www.rfc-editor.org/rfc/rfc2617.txt;strongHTTP
  +Basic and Digest Authentication/strong/a Specification/li
  +lia href=http://www.rfc-editor.org/rfc/rfc2109.txt;strongState
  +Management Mechanism/strong/a Specification (Cookies)/li
   /ul
   /section
   
  @@ -94,14 +100,20 @@
   
   pStruts is written in the popular and versatile
   a href=http://java.sun.com/docs/books/jls/first_edition/html/index.html;Java 
programming language/a.
  -Java is an object-orientated language, and Struts makes good use of many 
object-orientated techniques.
  -A good understanding of Java, and especially object-orientated programming 
(OOP) will help
  +Java is an object-orientated language, and Struts makes good use of many
  +object-orientated techniques.  In addition, Java natively supports the
  +concept of emthreads/em, which allows more than one task to be
  +performed at the same time.  A good understanding of Java, and especially
  +object-orientated programming (OOP) and threading, will help
   you get the most out of Struts and this User Guide. /p
   
  -pFor more about Java and 

Re: Last Few Bugs for Struts 1.1-beta-2

2002-07-27 Thread @Basebeans.com

Subject: Re: Last Few Bugs for Struts 1.1-beta-2
From: Vic C [EMAIL PROTECTED]
 ===
Bug 8798

and the bug  has an attached CVS source code to fix it.

When you do multi row update (which my clients do a lot) you also want 
multi row validation to work. Not sure if it is a show stoper.

(so then clients used the custom jar with attached CVS source code 
fix, not ideal)

I pinged David way back on it.

(also, next build of basicPortal will use the newer nightly jars, things 
seem to work well with the new JSTL jars, and I am going arround to my 
client to bump them to the newer nightly jars to see if anything shakes)

hth,

Vic


Craig R. McClanahan wrote:
 It looks like we're on the home stretch for fixing the remaining bugs
 standing in the way of a 1.1-beta-2 release.  Could someone (especially
 David) take a look at the outstanding bug reports against validator (both
 here and on commons)?  If the proposed patches look reasonable but you
 don't have time to commit them, just add a note on the bug reports and
 someone else can do the grunt work.
 
 Then, we just need someone to be release manager again.  Martin, would you
 be willing to do the honors for another round?
 
 Craig
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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