DO NOT REPLY [Bug 24656] - Digestor failes to initialize with MalformedURLException

2003-11-15 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=24656.
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=24656

Digestor failes to initialize with MalformedURLException





--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 12:51 ---
this looks like an entity resolution issue. this probably means that some DTD or other 
can't be 
found. the most likely cause of an intermittant failure is either some documents have 
DTDs and 
some don't or that your loading them from the web (which is unreliable) rather than 
from local 
copies (which are not). 

jakarta-struts is open source. one option you have (which isn't usually available for 
commercial 
software) is to rewrite the bit of the software that's causing the problem. if it's an 
entity resolution 
problem then add code that loads DTDs from local paths.

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



Re: Struts throwing away exceptions

2003-11-15 Thread Ted Husted
We appreciate the report. If you have any concrete suggestions, please 
feel free to submit a report to Bugzilla with any fixes. As it stands, 
Struts is relying on the logging subsystem to pass the messages along to 
the servlet container (Tomcat). If the subsystem responds normally to 
Struts, then it's not possible for Struts to know that anything is broken.

If it were me, I'd try a fresh deployment, preferrably on another 
machine, in case the underlying problem is corrupt JARs.

An array of test cases can also help in cases like this, since they can 
pinpoint where things have gone awry. Often, things like NPEs can be 
exposed by testing the underlying business logic directly.

-Ted.

Graham Leggett wrote:
Hi all,

I ran into this problem a while back, worked around it, but now it is back.

Something has gone haywire with a struts web application I am trying to 
debug. When accessing an URL, I get an HTTP 400 error, with the 
explanation The request sent by the client was syntactically incorrect 
()..

 From my last experience with this problem, it turned out then to be a 
NullPointerException with no reason string - thus the empty string 
between the brackets. The problem is, the original exception has been 
thrown away by struts, so I have no clue where to start looking for the 
problem.

The cause of this issue is that all messages, including HTTP error 
codes, are being logged via commons-logging, which in this case has gone 
haywire along with the application. The correct behaviour IMHO in a 
situation where struts is in a broken state, is to pass the exception 
along with the HTTP error code to the servlet container, thus removing 
an enormous source of frustration for struts developers where a problem 
is reported seamingly by tomcat, but with no clue where the problem came 
from.

Regards,
Graham
--


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


DO NOT REPLY [Bug 24727] New: - Non existent URLs return HTTP error 400 instead of 404

2003-11-15 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=24727.
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=24727

Non existent URLs return HTTP error 400 instead of 404

   Summary: Non existent URLs return HTTP error 400 instead of 404
   Product: Struts
   Version: 1.1 Final
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Controller
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If an attempt is made to access an URL that is not defined in the struts-config
file, the following message is shown in the browser: The request sent by the
client was syntactically incorrect ().

What should happen is that a standard HTTP 404 Not Found error should be returned.

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



Re: Struts throwing away exceptions

2003-11-15 Thread David Graham


Graham Leggett [EMAIL PROTECTED] wrote:
Hi all,

I ran into this problem a while back, worked around it, but now it is back.

Something has gone haywire with a struts web application I am trying to 
debug. When accessing an URL, I get an HTTP 400 error, with the 
explanation The request sent by the client was syntactically incorrect 
()..

From my last experience with this problem, it turned out then to be a 
NullPointerException with no reason string - thus the empty string 
between the brackets. The problem is, the original exception has been 
thrown away by struts, so I have no clue where to start looking for the 
problem.

What makes you think Struts is throwing away the exception?  What was the stack trace 
for the NPE?

David



The cause of this issue is that all messages, including HTTP error 
codes, are being logged via commons-logging, which in this case has gone 
haywire along with the application. The correct behaviour IMHO in a 
situation where struts is in a broken state, is to pass the exception 
along with the HTTP error code to the servlet container, thus removing 
an enormous source of frustration for struts developers where a problem 
is reported seamingly by tomcat, but with no clue where the problem came 
from.

Regards,
Graham
--


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




-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

cvs commit: jakarta-struts/src/test/org/apache/struts/action TestActionMessage.java

2003-11-15 Thread dgraham
dgraham 2003/11/15 13:22:33

  Modified:src/test/org/apache/struts/action TestActionMessage.java
  Log:
  Formatting changes only.
  
  Revision  ChangesPath
  1.4   +54 -44
jakarta-struts/src/test/org/apache/struts/action/TestActionMessage.java
  
  Index: TestActionMessage.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/test/org/apache/struts/action/TestActionMessage.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestActionMessage.java7 Feb 2003 00:29:21 -   1.3
  +++ TestActionMessage.java15 Nov 2003 21:22:33 -  1.4
  @@ -1,7 +1,13 @@
   /*
  + * $Header$
  + * $Revision$
  + * $Date$
  + *
  + * 
  + * 
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -52,7 +58,9 @@
* http://www.apache.org/.
*
*/
  +
   package org.apache.struts.action;
  +
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  @@ -63,67 +71,69 @@
* @author Dominique Plante
* @version $Revision$ $Date$
*/
  -
  -public class TestActionMessage extends TestCase
  -{
  - protected ActionMessage amWithNoValue = null;
  - protected ActionMessage amWithOneValue = null;
  +public class TestActionMessage extends TestCase {
  +
  +protected ActionMessage amWithNoValue = null;
  +
  +protected ActionMessage amWithOneValue = null;
  +
   /**
* Defines the testcase name for JUnit.
*
* @param theName the testcase's name.
*/
  - public TestActionMessage(String theName)
  - {
  - super(theName);
  - }
  +public TestActionMessage(String theName) {
  +super(theName);
  +}
   
   /**
* Start the tests.
*
* @param theArgs the arguments. Not used
*/
  -public static void main(String[] theArgs)
  -{
  -junit.awtui.TestRunner.main(new String[] 
{TestActionMessage.class.getName()});
  +public static void main(String[] theArgs) {
  +junit.awtui.TestRunner.main(
  +new String[] { TestActionMessage.class.getName()});
   }
   
   /**
* @return a test suite (codeTestSuite/code) that includes all methods
* starting with test
*/
  -public static Test suite()
  -{
  +public static Test suite() {
   // All methods starting with test will be executed in the test suite.
   return new TestSuite(TestActionMessage.class);
   }
   
  - public void setUp()
  - {
  - amWithNoValue = new ActionMessage(amWithNoValue);
  - amWithOneValue = new ActionMessage(amWithOneValue, new 
String(stringValue));
  - }
  -
  - public void tearDown()
  - {
  - amWithNoValue = null;
  - }
  - public void testActionMessageWithNoValue()
  - {
  - assertTrue(testActionMessageWithNoValue value is not null,
  -   amWithNoValue.getValues() == null);
  - assertTrue(testActionMessageWithNoValue key is not amWithNoValue,
  - amWithNoValue.getKey() == amWithNoValue);
  - }
  -
  - public void testActionMessageWithAStringValue()
  - {
  - Object [] values = amWithOneValue.getValues();
  - assertTrue(testActionMessageWithAStringValue value is not null,
  -   values != null);
  - assertTrue(testActionMessageWithAStringValue value[0] is not the 
string stringValue,
  -   values[0].equals(stringValue));
  - assertTrue(testActionMessageWithAStringValue key is not 
amWithOneValue,
  - amWithOneValue.getKey() == amWithOneValue);
  - }
  +public void setUp() {
  +amWithNoValue = new ActionMessage(amWithNoValue);
  +amWithOneValue =
  +new ActionMessage(amWithOneValue, new String(stringValue));
  +}
  +
  +public void tearDown() {
  +amWithNoValue = null;
  +}
  +
  +public void testActionMessageWithNoValue() {
  +assertTrue(
  +testActionMessageWithNoValue value is not null,
  +amWithNoValue.getValues() == null);
  +assertTrue(
  +testActionMessageWithNoValue key is not amWithNoValue,
  +amWithNoValue.getKey() == amWithNoValue);
  +}
  +
  +public void testActionMessageWithAStringValue() {
  +Object[] values = amWithOneValue.getValues();
  +assertTrue(
  +testActionMessageWithAStringValue 

DO NOT REPLY [Bug 24190] - Incorrect message in TestActionMessage

2003-11-15 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=24190.
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=24190

Incorrect message in TestActionMessage

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 21:25 ---
Fixed.

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



DO NOT REPLY [Bug 24137] - Struts causing the VM to crash

2003-11-15 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=24137.
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=24137

Struts causing the VM to crash

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 21:27 ---
Closing as there is nothing we can do about Sun's JIT compiler.

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



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

2003-11-15 Thread dgraham
dgraham 2003/11/15 13:33:57

  Modified:src/share/org/apache/struts/taglib/html MultiboxTag.java
  Log:
  Minor formatting changes such as using braces for one line if blocks
  to prevent confusion.
  
  Revision  ChangesPath
  1.22  +24 -16
jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java
  
  Index: MultiboxTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/MultiboxTag.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- MultiboxTag.java  31 Jul 2003 00:34:15 -  1.21
  +++ MultiboxTag.java  15 Nov 2003 21:33:57 -  1.22
  @@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -188,12 +188,15 @@
*/
   public int doAfterBody() throws JspException {
   
  -if (bodyContent != null)
  +if (bodyContent != null) {
   this.constant = bodyContent.getString().trim();
  -if (.equals(this.constant))
  +}
  +
  +if (.equals(this.constant)) {
   this.constant = null;
  -return (SKIP_BODY);
  -
  +}
  +
  +return SKIP_BODY;
   }
   
   /**
  @@ -219,9 +222,8 @@
   results.append(\);
   }
   results.append( value=\);
  -String value = this.value;
  -if (value == null)
  -value = this.constant;
  +String value = (this.value == null) ? this.constant : this.value;
  +
   if (value == null) {
   JspException e = new 
JspException(messages.getMessage(multiboxTag.value));
   pageContext.setAttribute(Globals.EXCEPTION_KEY, e, 
PageContext.REQUEST_SCOPE);
  @@ -231,12 +233,17 @@
   results.append(\);
   Object bean = TagUtils.getInstance().lookup(pageContext, name, null);
   String values[] = null;
  -if (bean == null)
  +
  +if (bean == null) {
   throw new JspException(messages.getMessage(getter.bean, name));
  +}
  +
   try {
   values = BeanUtils.getArrayProperty(bean, property);
  -if (values == null)
  +if (values == null) {
   values = new String[0];
  +}
  +
   } catch (IllegalAccessException e) {
   throw new JspException(messages.getMessage(getter.access, property, 
name));
   } catch (InvocationTargetException e) {
  @@ -245,20 +252,21 @@
   } catch (NoSuchMethodException e) {
   throw new JspException(messages.getMessage(getter.method, property, 
name));
   }
  +
   for (int i = 0; i  values.length; i++) {
   if (value.equals(values[i])) {
   results.append( checked=\checked\);
   break;
   }
   }
  +
   results.append(prepareEventHandlers());
   results.append(prepareStyles());
   results.append(getElementClose());
   
   TagUtils.getInstance().write(pageContext, results.toString());
   
  -return (EVAL_PAGE);
  -
  +return EVAL_PAGE;
   }
   
   /**
  
  
  

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



DO NOT REPLY [Bug 24732] New: - HTTP 400 is send to unauthorized user instead of HTTP 403

2003-11-15 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=24732.
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=24732

HTTP 400 is send to unauthorized user instead of HTTP 403

   Summary: HTTP 400 is send to unauthorized user instead of HTTP
403
   Product: Struts
   Version: 1.1 Final
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Controller
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When a user has no access to an action because it is has not a required role as 
defined in the roles attribute of an action, an HTTP 400 is returned instead of 
an HTTP 403.
With this behaviour is is difficult to redirect to a login page for an 
authorized user without the required role.

See RequestProcessor.java line 890.
// The current user is not authorized for this action
if (log.isDebugEnabled()) {
log.debug( User ' + request.getRemoteUser() +
  ' does not have any required role, denying access);
}
response.sendError(HttpServletResponse.SC_BAD_REQUEST,
   getInternal().getMessage(notAuthorized,
mapping.getPath()));

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



DO NOT REPLY [Bug 24732] - HTTP 400 is send to unauthorized user instead of HTTP 403

2003-11-15 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=24732.
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=24732

HTTP 400 is send to unauthorized user instead of HTTP 403

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement
 Status|NEW |RESOLVED
 Resolution||DUPLICATE



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 22:36 ---


*** This bug has been marked as a duplicate of 17276 ***

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



DO NOT REPLY [Bug 23522] - Erroneous trim in doAfterBody of MultiboxTag

2003-11-15 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=23522.
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=23522

Erroneous trim in doAfterBody of MultiboxTag

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 22:44 ---
Actually, the trimming should remain in place.  It's quite likely that people 
have used the tag like this:
html:multibox
  c:out value=${myval}/
/html:multibox

The user expects the tag to trim the whitespace and use the value output from 
c:out.  Changing this may break existing applications.

This is just one reason that using whitespace in database keys is an 
exceptionally bad idea.  Others include:
1. Are these 2 keys the same?
mykey
mykey 

Maybe, depending on if you know that whitespace is allowed at the end of the 
key.

2.  Table joins are typically faster when performed on INTEGER columns rather 
than CHAR columns.

3.  XML processors are allowed to trim leading and trailing whitespace.

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



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

2003-11-15 Thread dgraham
dgraham 2003/11/15 15:08:54

  Modified:src/share/org/apache/struts/taglib/html BaseFieldTag.java
  Log:
  Added formatValue() method for PR# 24608.
  
  Revision  ChangesPath
  1.22  +30 -13
jakarta-struts/src/share/org/apache/struts/taglib/html/BaseFieldTag.java
  
  Index: BaseFieldTag.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/BaseFieldTag.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- BaseFieldTag.java 31 Jul 2003 00:34:15 -  1.21
  +++ BaseFieldTag.java 15 Nov 2003 23:08:54 -  1.22
  @@ -7,7 +7,7 @@
*
* The Apache Software License, Version 1.1
*
  - * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -189,23 +189,40 @@
   
   results.append( value=\);
   if (value != null) {
  -results.append(TagUtils.getInstance().filter(value));
  +results.append(this.formatValue(value));
   
   } else if (redisplay || !password.equals(type)) {
  -Object value = TagUtils.getInstance().lookup(pageContext, name, 
property, null);
  -if (value == null) {
  -value = ;
  -}
  -
  -results.append(TagUtils.getInstance().filter(value.toString()));
  +Object value =
  +TagUtils.getInstance().lookup(pageContext, name, property, null);
  +
  +results.append(this.formatValue(value));
   }
   
  -results.append(\);
  +results.append('');
   results.append(this.prepareEventHandlers());
   results.append(this.prepareStyles());
   results.append(this.getElementClose());
   
   return results.toString();
  +}
  +
  +/**
  + * Return the given value as a formatted codeString/code.  This 
  + * implementation escapes potentially harmful HTML characters.
  + *
  + * @param value The value to be formatted. codenull/code values will
  + * be returned as the empty String .
  + * 
  + * @throws JspException if a JSP exception has occurred
  + * 
  + * @since Struts 1.2
  + */
  +protected String formatValue(Object value) throws JspException {
  +if (value == null) {
  +return ;
  +}
  +
  +return TagUtils.getInstance().filter(value.toString());
   }
   
   /**
  
  
  

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



DO NOT REPLY [Bug 24608] - Enhance BaseFieldTag - refactor value attribute retrieval

2003-11-15 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=24608.
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=24608

Enhance BaseFieldTag - refactor value attribute retrieval

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 23:10 ---
Fixed.  formatValue is called in both places the value is output.  Also, 
formatValue() is responsible for filtering harmful HTML characters.

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



DO NOT REPLY [Bug 24021] - parsing exception fails to report which file being parsed....

2003-11-15 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=24021.
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=24021

parsing exception fails to report which file being parsed

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 23:22 ---
Struts does not parse XML files directly.  It uses Jakarta Commons Digester 
which typically uses Xerces to perform the parsing.

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



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

2003-11-15 Thread dgraham
dgraham 2003/11/15 15:43:01

  Modified:src/share/org/apache/struts/action RequestProcessor.java
  Log:
  Send HTTP 404 Not Found instead of 400 Bad Request when a request
  for an unmapped url is made.  PR# 24727
  
  Revision  ChangesPath
  1.39  +17 -16
jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java
  
  Index: RequestProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- RequestProcessor.java 10 Oct 2003 22:03:33 -  1.38
  +++ RequestProcessor.java 15 Nov 2003 23:43:01 -  1.39
  @@ -678,12 +678,11 @@
   }
   
   // No mapping can be found to process this request
  -log.error(getInternal().getMessage(processInvalid, path));
  -response.sendError(HttpServletResponse.SC_BAD_REQUEST,
  -   getInternal().getMessage
  -   (processInvalid, path));
  -return (null);
  -
  +String msg = getInternal().getMessage(processInvalid, path);
  +log.error(msg);
  +response.sendError(HttpServletResponse.SC_NOT_FOUND, msg);
  +
  +return null;
   }
   
   
  @@ -764,13 +763,15 @@
   }
   String prefix = moduleConfig.getPrefix();
   if (!path.startsWith(prefix)) {
  -log.error(getInternal().getMessage(processPath,
  - request.getRequestURI()));
  -response.sendError(HttpServletResponse.SC_BAD_REQUEST,
  -   getInternal().getMessage
  -   (processPath, request.getRequestURI()));
  -return (null);
  +String msg =
  +getInternal().getMessage(processPath, request.getRequestURI());
  +
  +log.error(msg);
  +response.sendError(HttpServletResponse.SC_BAD_REQUEST, msg);
  +
  +return null;
   }
  +
   path = path.substring(prefix.length());
   int slash = path.lastIndexOf(/);
   int period = path.lastIndexOf(.);
  
  
  

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



DO NOT REPLY [Bug 24727] - Non existent URLs return HTTP error 400 instead of 404

2003-11-15 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=24727.
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=24727

Non existent URLs return HTTP error 400 instead of 404

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 23:43 ---
Fixed.

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



DO NOT REPLY [Bug 24497] - validwhen / underscore in filed names

2003-11-15 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=24497.
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=24497

validwhen / underscore in filed names

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Enhancement



--- Additional Comments From [EMAIL PROTECTED]  2003-11-15 23:45 ---
Marking as enhancement because using underscores in Java variable names violates 
the standard Java coding guidelines.  IMO, this should not be changed to 
accomodate underscores.

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



[struts chain] Investigating Dynamic / Proxy Commands?

2003-11-15 Thread Peter A. Pilgrim
I am investigating the possibility of commands that can branch
dynamically.
Why was the ChainBase frozen in the execute() method?
What is the design decision or intention of NonDelegatingCommand.java?
What do you need to successfully compile and build the chain module?

--
Peter Pilgrim
   __ _ _ _
  / //__  // ___// ___/   +  Serverside Java
 / /___/ // /__ / /__ +  Struts
/ // ___// ___// ___/ +  Expresso Committer
 __/ // /__ / /__ / /__   +  Independent Contractor
/___///////   +  Intrinsic Motivation
On Line Resume
   ||
   \\===  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]