cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: svn commit: r635881 - /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/spring/ServletFactoryBean.java
Date Tue, 11 Mar 2008 22:05:03 GMT
reinhard@apache.org pisze:
> Author: reinhard
> Date: Tue Mar 11 03:58:38 2008
> New Revision: 635881
> 
> URL: http://svn.apache.org/viewvc?rev=635881&view=rev
> Log:
> the context attribute might not exist
> 
[...]

> +        if(contextPath != null) {
> +            int tmp = contextPath.indexOf(':');
> +            boolean tmp2 = !(contextPath.startsWith("file:") || contextPath.startsWith("/")
|| contextPath.indexOf(':') == -1);

This is not a solution IMHO. I forgot to bring this issue to mailing list, my fault. Actually,
I
think we should disallow empty context-path and mount-path attributes because there is no
sane way
to handle such cases. If you don't set contextPath, then you break a contract in ServletContext
class because getResource() method no longer works.

I think we should just change our schema and throw an exception when any of attributes is
null.

WDYT?

-- 
Grzegorz Kossakowski

Mime
View raw message