You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by yo...@apache.org on 2006/12/25 15:15:54 UTC
svn commit: r490151 - in /tomcat/container/tc5.5.x:
catalina/src/share/org/apache/catalina/core/LocalStrings.properties
catalina/src/share/org/apache/catalina/core/StandardContext.java
webapps/docs/changelog.xml
Author: yoavs
Date: Mon Dec 25 06:15:53 2006
New Revision: 490151
URL: http://svn.apache.org/viewvc?view=rev&rev=490151
Log:
Bugzilla 40133: better handling and error message for undefined context path
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties?view=diff&rev=490151&r1=490150&r2=490151
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/LocalStrings.properties Mon Dec 25 06:15:53 2006
@@ -79,6 +79,7 @@
standardContext.notWrapper=Child of a Context must be a Wrapper
standardContext.parameter.duplicate=Duplicate context initialization parameter {0}
standardContext.parameter.required=Both parameter name and parameter value are required
+standardContext.pathRequired=Context path must be configured
standardContext.reloadingCompleted=Reloading this Context is completed
standardContext.reloadingFailed=Reloading this Context failed due to previous errors
standardContext.reloadingStarted=Reloading this Context has started
Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?view=diff&rev=490151&r1=490150&r2=490151
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java Mon Dec 25 06:15:53 2006
@@ -3827,15 +3827,21 @@
* or <code>false</code> otherwise.
*/
public boolean resourcesStart() {
-
boolean ok = true;
Hashtable env = new Hashtable();
- if (getParent() != null)
+ if (getParent() != null) {
env.put(ProxyDirContext.HOST, getParent().getName());
- env.put(ProxyDirContext.CONTEXT, getName());
+ }
try {
+ // Bugzilla 40133: http://issues.apache.org/bugzilla/show_bug.cgi?id=40133
+ if (getName() == null) {
+ throw new IllegalArgumentException(
+ sm.getString("standardContext.pathRequired"));
+ }
+ env.put(ProxyDirContext.CONTEXT, getName());
+
ProxyDirContext proxyDirContext =
new ProxyDirContext(env, webappResources);
if (webappResources instanceof FileDirContext) {
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=490151&r1=490150&r2=490151
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Dec 25 06:15:53 2006
@@ -204,6 +204,10 @@
<bug>40241</bug>: Catch Exceptions instead of Throwables in Default and SSI servlets.
Also improve relevant logging while we're at it. (yoavs)
</fix>
+ <fix>
+ <bug>40133</bug>: Better error message when context name is not available on startup,
+ as suggested by Andreas Plesner Jacobsen. (yoavs)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org