You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by James Mitchell <jm...@apache.org> on 2004/10/18 18:10:03 UTC
Re: Proposed patch for bug 31761
This message did not make it to dev@struts.apache.org. I was hung in
moderation.
1. Make sure you are subscribed from the same address you are sending from.
2. Always attach patches to the bugzilla ticket for which it applies (I see
you've already done that...thanks)
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
----- Original Message -----
From: jdaviestx@comcast.net
To: dev@struts.apache.org
Sent: Monday, October 18, 2004 12:06 PM
Subject: Proposed patch for bug 31761
The included patch file addresses a NullPointerException that occurs when a
user mistypes a config-file entry in the struts action servlet config in
web.xml. See http://issues.apache.org/bugzilla/show_bug.cgi?id=31761 for
more information.
--- src/share/org/apache/struts/action/ActionServlet.java 2004-10-18
11:00:20.087672000 -0500
+++ src/share/org/apache/struts/action/ActionServlet.java 2004-10-18
10:58:16.019270400 -0500
@@ -702,6 +702,13 @@
InputStream input = null;
try {
URL url = getServletContext().getResource(path);
+
+ if ( url == null )
+ {
+ throw new UnavailableException( "Module configuration file
'" +
+ path + "' not found. Unable to start Struts." );
+ }
+
InputSource is = new InputSource(url.toExternalForm());
input = getServletContext().getResourceAsStream(path);
is.setByteStream(input);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org