You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/04/12 20:58:24 UTC
svn commit: r1738850 - in /tomcat/trunk:
java/org/apache/catalina/startup/ContextConfig.java
webapps/docs/changelog.xml
Author: markt
Date: Tue Apr 12 18:58:24 2016
New Revision: 1738850
URL: http://svn.apache.org/viewvc?rev=1738850&view=rev
Log:
Correctly configure the base path for a resources directory provided by an expanded JAR file.
Patch provided by hengyunabc.
This closes #31
Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1738850&r1=1738849&r2=1738850&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Apr 12 18:58:24 2016
@@ -1693,7 +1693,7 @@ public class ContextConfig implements Li
if (resources.isDirectory()) {
context.getResources().createWebResourceSet(
WebResourceRoot.ResourceSetType.RESOURCE_JAR,
- "/", file.getAbsolutePath(), null, "/");
+ "/", resources.getAbsolutePath(), null, "/");
}
}
} catch (IOException ioe) {
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1738850&r1=1738849&r2=1738850&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 12 18:58:24 2016
@@ -124,6 +124,10 @@
mapping type information for the current request to reflect discussions
within the EG. (markt)
</update>
+ <fix>
+ Correctly configure the base path for a resources directory provided by
+ an expanded JAR file. Patch provided by hengyunabc. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1738850 - in /tomcat/trunk:
java/org/apache/catalina/startup/ContextConfig.java
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 13/04/2016 12:03, Violeta Georgieva wrote:
> 2016-04-13 13:37 GMT+03:00 Mark Thomas <ma...@apache.org>:
>>
>> On 13/04/2016 10:26, Violeta Georgieva wrote:
>>> Hi Mark,
>>>
>>> 2016-04-12 21:58 GMT+03:00 <ma...@apache.org>:
>>>>
>>>> Author: markt
>>>> Date: Tue Apr 12 18:58:24 2016
>>>> New Revision: 1738850
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1738850&view=rev
>>>> Log:
>>>> Correctly configure the base path for a resources directory provided by
>>> an expanded JAR file.
>>>> Patch provided by hengyunabc.
>>>> This closes #31
>>>
>>> With this change a META-INF/resources folder placed in WEB-INF/classes
> will
>>> also be able to supply static resources.
>>> Currently GUMP is failing because of this.
>>
>> Thanks for the heads up. I'll take another look at this.
>>
>> Mark
>>
>
> I had to be more specific.
> The problem is with Tomcat 8.0.x when addWebinfClassesResources=false.
>
> However I think that the problem here is because of a missing fix that is
> available in Tomcat 9/8.5 only
>
> Revision: 1728664
> Author: markt
> Date: Friday, February 5, 2016 3:39:13 PM
> Message:
> Ensure that /WEB-INF/classes is never processed as a web fragment.
> ----
> Modified :
> /tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java
> Modified : /tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java
> Modified :
> /tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
> Modified : /tomcat/trunk/webapps/docs/changelog.xml
>
>
> Regards,
> Violeta
Thank you. That just saved me a bunch of time tracking down the root
cause. I owe you one.
I'll get that back-ported.
Mark
>
>>
>>>
>>> Regards,
>>> Violeta
>>>
>>>> Modified:
>>>> tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>>>> tomcat/trunk/webapps/docs/changelog.xml
>>>>
>>>> Modified:
> tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>>>> URL:
>>>
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1738850&r1=1738849&r2=1738850&view=diff
>>>>
>>>
> ==============================================================================
>>>> --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>>> (original)
>>>> +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> Tue
>>> Apr 12 18:58:24 2016
>>>> @@ -1693,7 +1693,7 @@ public class ContextConfig implements Li
>>>> if (resources.isDirectory()) {
>>>> context.getResources().createWebResourceSet(
>>>>
>>> WebResourceRoot.ResourceSetType.RESOURCE_JAR,
>>>> - "/", file.getAbsolutePath(), null,
> "/");
>>>> + "/", resources.getAbsolutePath(),
> null,
>>> "/");
>>>> }
>>>> }
>>>> } catch (IOException ioe) {
>>>>
>>>> Modified: tomcat/trunk/webapps/docs/changelog.xml
>>>> URL:
>>>
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1738850&r1=1738849&r2=1738850&view=diff
>>>>
>>>
> ==============================================================================
>>>> --- tomcat/trunk/webapps/docs/changelog.xml (original)
>>>> +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 12 18:58:24 2016
>>>> @@ -124,6 +124,10 @@
>>>> mapping type information for the current request to reflect
>>> discussions
>>>> within the EG. (markt)
>>>> </update>
>>>> + <fix>
>>>> + Correctly configure the base path for a resources directory
>>> provided by
>>>> + an expanded JAR file. Patch provided by hengyunabc. (markt)
>>>> + </fix>
>>>> </changelog>
>>>> </subsection>
>>>> <subsection name="Coyote">
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1738850 - in /tomcat/trunk: java/org/apache/catalina/startup/ContextConfig.java
webapps/docs/changelog.xml
Posted by Violeta Georgieva <mi...@gmail.com>.
2016-04-13 13:37 GMT+03:00 Mark Thomas <ma...@apache.org>:
>
> On 13/04/2016 10:26, Violeta Georgieva wrote:
> > Hi Mark,
> >
> > 2016-04-12 21:58 GMT+03:00 <ma...@apache.org>:
> >>
> >> Author: markt
> >> Date: Tue Apr 12 18:58:24 2016
> >> New Revision: 1738850
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1738850&view=rev
> >> Log:
> >> Correctly configure the base path for a resources directory provided by
> > an expanded JAR file.
> >> Patch provided by hengyunabc.
> >> This closes #31
> >
> > With this change a META-INF/resources folder placed in WEB-INF/classes
will
> > also be able to supply static resources.
> > Currently GUMP is failing because of this.
>
> Thanks for the heads up. I'll take another look at this.
>
> Mark
>
I had to be more specific.
The problem is with Tomcat 8.0.x when addWebinfClassesResources=false.
However I think that the problem here is because of a missing fix that is
available in Tomcat 9/8.5 only
Revision: 1728664
Author: markt
Date: Friday, February 5, 2016 3:39:13 PM
Message:
Ensure that /WEB-INF/classes is never processed as a web fragment.
----
Modified :
/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback.java
Modified : /tomcat/trunk/java/org/apache/tomcat/util/scan/Constants.java
Modified :
/tomcat/trunk/java/org/apache/tomcat/util/scan/StandardJarScanner.java
Modified : /tomcat/trunk/webapps/docs/changelog.xml
Regards,
Violeta
>
> >
> > Regards,
> > Violeta
> >
> >> Modified:
> >> tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> >> tomcat/trunk/webapps/docs/changelog.xml
> >>
> >> Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> >> URL:
> >
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1738850&r1=1738849&r2=1738850&view=diff
> >>
> >
==============================================================================
> >> --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> > (original)
> >> +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Tue
> > Apr 12 18:58:24 2016
> >> @@ -1693,7 +1693,7 @@ public class ContextConfig implements Li
> >> if (resources.isDirectory()) {
> >> context.getResources().createWebResourceSet(
> >>
> > WebResourceRoot.ResourceSetType.RESOURCE_JAR,
> >> - "/", file.getAbsolutePath(), null,
"/");
> >> + "/", resources.getAbsolutePath(),
null,
> > "/");
> >> }
> >> }
> >> } catch (IOException ioe) {
> >>
> >> Modified: tomcat/trunk/webapps/docs/changelog.xml
> >> URL:
> >
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1738850&r1=1738849&r2=1738850&view=diff
> >>
> >
==============================================================================
> >> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> >> +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 12 18:58:24 2016
> >> @@ -124,6 +124,10 @@
> >> mapping type information for the current request to reflect
> > discussions
> >> within the EG. (markt)
> >> </update>
> >> + <fix>
> >> + Correctly configure the base path for a resources directory
> > provided by
> >> + an expanded JAR file. Patch provided by hengyunabc. (markt)
> >> + </fix>
> >> </changelog>
> >> </subsection>
> >> <subsection name="Coyote">
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: dev-help@tomcat.apache.org
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
Re: svn commit: r1738850 - in /tomcat/trunk:
java/org/apache/catalina/startup/ContextConfig.java
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 13/04/2016 10:26, Violeta Georgieva wrote:
> Hi Mark,
>
> 2016-04-12 21:58 GMT+03:00 <ma...@apache.org>:
>>
>> Author: markt
>> Date: Tue Apr 12 18:58:24 2016
>> New Revision: 1738850
>>
>> URL: http://svn.apache.org/viewvc?rev=1738850&view=rev
>> Log:
>> Correctly configure the base path for a resources directory provided by
> an expanded JAR file.
>> Patch provided by hengyunabc.
>> This closes #31
>
> With this change a META-INF/resources folder placed in WEB-INF/classes will
> also be able to supply static resources.
> Currently GUMP is failing because of this.
Thanks for the heads up. I'll take another look at this.
Mark
>
> Regards,
> Violeta
>
>> Modified:
>> tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>> tomcat/trunk/webapps/docs/changelog.xml
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
>> URL:
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1738850&r1=1738849&r2=1738850&view=diff
>>
> ==============================================================================
>> --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> (original)
>> +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue
> Apr 12 18:58:24 2016
>> @@ -1693,7 +1693,7 @@ public class ContextConfig implements Li
>> if (resources.isDirectory()) {
>> context.getResources().createWebResourceSet(
>>
> WebResourceRoot.ResourceSetType.RESOURCE_JAR,
>> - "/", file.getAbsolutePath(), null, "/");
>> + "/", resources.getAbsolutePath(), null,
> "/");
>> }
>> }
>> } catch (IOException ioe) {
>>
>> Modified: tomcat/trunk/webapps/docs/changelog.xml
>> URL:
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1738850&r1=1738849&r2=1738850&view=diff
>>
> ==============================================================================
>> --- tomcat/trunk/webapps/docs/changelog.xml (original)
>> +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 12 18:58:24 2016
>> @@ -124,6 +124,10 @@
>> mapping type information for the current request to reflect
> discussions
>> within the EG. (markt)
>> </update>
>> + <fix>
>> + Correctly configure the base path for a resources directory
> provided by
>> + an expanded JAR file. Patch provided by hengyunabc. (markt)
>> + </fix>
>> </changelog>
>> </subsection>
>> <subsection name="Coyote">
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1738850 - in /tomcat/trunk: java/org/apache/catalina/startup/ContextConfig.java
webapps/docs/changelog.xml
Posted by Violeta Georgieva <mi...@gmail.com>.
Hi Mark,
2016-04-12 21:58 GMT+03:00 <ma...@apache.org>:
>
> Author: markt
> Date: Tue Apr 12 18:58:24 2016
> New Revision: 1738850
>
> URL: http://svn.apache.org/viewvc?rev=1738850&view=rev
> Log:
> Correctly configure the base path for a resources directory provided by
an expanded JAR file.
> Patch provided by hengyunabc.
> This closes #31
With this change a META-INF/resources folder placed in WEB-INF/classes will
also be able to supply static resources.
Currently GUMP is failing because of this.
Regards,
Violeta
> Modified:
> tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> tomcat/trunk/webapps/docs/changelog.xml
>
> Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
> URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1738850&r1=1738849&r2=1738850&view=diff
>
==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
(original)
> +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue
Apr 12 18:58:24 2016
> @@ -1693,7 +1693,7 @@ public class ContextConfig implements Li
> if (resources.isDirectory()) {
> context.getResources().createWebResourceSet(
>
WebResourceRoot.ResourceSetType.RESOURCE_JAR,
> - "/", file.getAbsolutePath(), null, "/");
> + "/", resources.getAbsolutePath(), null,
"/");
> }
> }
> } catch (IOException ioe) {
>
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1738850&r1=1738849&r2=1738850&view=diff
>
==============================================================================
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 12 18:58:24 2016
> @@ -124,6 +124,10 @@
> mapping type information for the current request to reflect
discussions
> within the EG. (markt)
> </update>
> + <fix>
> + Correctly configure the base path for a resources directory
provided by
> + an expanded JAR file. Patch provided by hengyunabc. (markt)
> + </fix>
> </changelog>
> </subsection>
> <subsection name="Coyote">
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>