You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Benson Margulies <bi...@gmail.com> on 2011/11/23 19:06:59 UTC

Adding an additional static resource directory to a webapp via API

I'm launching Tomcat 7 via the API.

One of the uses of this is that I can launch from Eclipse and
'live-edit' my static files, without tangling myself up in the Eclipse
JEE facilities, which I have never succeeded in using very well.

Now, I want to meld some shared content into the webapp. In the maven
build, I use the maven 'overlay' concept. For live development, I'm
looking to do the same thing.

Essentially, I want to map in a directory of additional static
resources into the Context. I see addResourceJarUrl, and I wonder what
it does with a file:/ url, though the comment in the javadoc about
META-INF/resources suggests that I'd need to conform to that directory
structure. (and reading the code in BaseDirContext confirms this).

Is 'addAlias' the way to go here?

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


Re: Adding an additional static resource directory to a webapp via API

Posted by Benson Margulies <bi...@gmail.com>.
Yes. It's a jquery theme at the moment.

I just posted a bz with code I wrote involving subclasses of
StandardContext and also FileDirContext that pulls this off.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52236. What do you
think?

On Wed, Nov 23, 2011 at 2:29 PM, Pid <pi...@pidster.com> wrote:
> On 23/11/2011 18:06, Benson Margulies wrote:
>> I'm launching Tomcat 7 via the API.
>>
>> One of the uses of this is that I can launch from Eclipse and
>> 'live-edit' my static files, without tangling myself up in the Eclipse
>> JEE facilities, which I have never succeeded in using very well.
>>
>> Now, I want to meld some shared content into the webapp. In the maven
>> build, I use the maven 'overlay' concept. For live development, I'm
>> looking to do the same thing.
>>
>> Essentially, I want to map in a directory of additional static
>> resources into the Context. I see addResourceJarUrl, and I wonder what
>> it does with a file:/ url, though the comment in the javadoc about
>> META-INF/resources suggests that I'd need to conform to that directory
>> structure. (and reading the code in BaseDirContext confirms this).
>>
>> Is 'addAlias' the way to go here?
>
> What is the shared content?  Static files?
>
>
> p
>
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> --
>
> [key:62590808]
>
>

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


Re: Adding an additional static resource directory to a webapp via API

Posted by Pid <pi...@pidster.com>.
On 23/11/2011 18:06, Benson Margulies wrote:
> I'm launching Tomcat 7 via the API.
> 
> One of the uses of this is that I can launch from Eclipse and
> 'live-edit' my static files, without tangling myself up in the Eclipse
> JEE facilities, which I have never succeeded in using very well.
> 
> Now, I want to meld some shared content into the webapp. In the maven
> build, I use the maven 'overlay' concept. For live development, I'm
> looking to do the same thing.
> 
> Essentially, I want to map in a directory of additional static
> resources into the Context. I see addResourceJarUrl, and I wonder what
> it does with a file:/ url, though the comment in the javadoc about
> META-INF/resources suggests that I'd need to conform to that directory
> structure. (and reading the code in BaseDirContext confirms this).
> 
> Is 'addAlias' the way to go here?

What is the shared content?  Static files?


p


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


-- 

[key:62590808]