tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <dmik...@gopivotal.com>
Subject Re: Tomcat 8 what happened to VirtualWebappLoader ?
Date Tue, 15 Oct 2013 17:58:49 GMT
On Oct 15, 2013, at 1:39 PM, Johan Compagner <jcompagner@servoy.com> wrote:

First, please don't top post.  Either post at the bottom or inline.  That is the convention
that we try to follow on this list.

> yes i figure this out for the classes
> works quite nice,
> The only problem is that for web-inf/lib
> i can't get it to work to mount multiply external folders into that one.

I saw this in the other thread you created.  I have to apologize though, I read it and didn't
really understand what you were reporting.  At the time I didn't have time to investigate
further, so I deleted the email.

Perhaps if you were able to be more specific, someone on the list could help.  You've indicated
that some Resources configurations work and some don't.  Specifically which ones work, including
example <Resources/> tags?  Specifically which one's don't work, also including example
<Resource/> tags?  When it doesn't work as you would expect, what is the observed behavior
(i.e. what happens) and what is your expected behavior (what do you think should happen)?

Please also include the version of Tomcat 8 you're using.  Is it trunk or one of the release
candidates?

Dan

> 
> 
> 
> On 15 October 2013 15:21, Daniel Mikusa <dmikusa@gopivotal.com> wrote:
> 
>> On Oct 14, 2013, at 5:20 PM, Johan Compagner <jcompagner@servoy.com>
>> wrote:
>> 
>>> thx,
>>> 
>>> i already found it, through the changelog, i noticed that those where
>>> changed and where now all replaced by <Resources>
>>> 
>>> Would be nice that there are some sample context.xml files in the final
>>> release so that people can see exactly what they could be using.
>> 
>> For what it's worth, here's an example:
>> 
>> <?xml version='1.0' encoding='utf-8'?>
>> <Context>
>>    <Resources>
>>        <PreResources
>> className="org.apache.catalina.webresources.FileResourceSet"
>> base="/app/files/special.txt" webAppMount="/static/special. txt" />
>>        <PostResources
>> className="org.apache.catalina.webresources.DirResourceSet"
>> base="/app/files/static" webAppMount="/static" />
>>    </Resources>
>> </Context>
>> 
>> Here's how I understand this...
>> 
>> The first tag exposes a single resource located locally at
>> "/app/files/special.txt" on the application relative path of
>> "/static/special.txt".  The second tag exposes a directory located locally
>> at "/app/files/static" on the application relative path of "/static".
>> 
>>   Ex:
>> 
>>      http://<server>/<context>/static/special.txt  -> would return
the
>> file "/app/files/special.txt".
>>      http://<server>/<context>/static/<some-file>  -> would
return
>> <some-file> from "/app/files/static/".
>> 
>> The first tag is a PreResource so it would be selected before a file of
>> the same name in "/app/files/static".  It would also get selected before a
>> resource of the same name exposed by the application or a JAR file.  The
>> second tag is a PostResource so it would only be checked if nothing else
>> (i.e. PreResources, the app or JAR files) provided the resource.
>> 
>> Dan
>> 
>>> 
>>> 
>>> 
>>> On 14 October 2013 18:10, Mark Thomas <markt@apache.org> wrote:
>>> 
>>>> On 14/10/2013 16:26, Johan Compagner wrote:
>>>>> That seems to be removed from the Tomcat8 build
>>>>> Is there something else that we now have to use?
>>>> 
>>>> http://tomcat.apache.org/migration-8.html#Web_application_resources
>>>> 
>>>> Mark
>>>> 
>>>> 
>>>>> 
>>>>> How can i now setup a debug environment easy by using a context file
>> like
>>>>> this:
>>>>> 
>>>>> <Context path="/webclient2"
>>>>> docBase="C:/workspace_trunk/servoy_webclient2/war/" >
>>>>> <!--
>>>>> <Resources className="org.apache.naming.resources.VirtualDirContext"
>>>>> 
>>>> 
>> extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes,/pictures=/Users/theuser/mypictures,/movies=/Users/theuser/mymovies"
>>>>> />
>>>>> -->
>>>>> <Loader className="org.apache.catalina.loader.VirtualWebappLoader"
>>>>> virtualClasspath="/users/theuser/xxxx;/users/theuser/test.jar"
>>>>> />
>>>>> <JarScanner scanAllDirectories="true" />
>>>>> </Context>
>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Johan Compagner
>>> Servoy
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
> 
> -- 
> Johan Compagner
> Servoy


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message