How to Deploy WAR using a sub-context path?

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

How to Deploy WAR using a sub-context path?

Eric B.-2
Hi,

I have a Tomcat 6 server that is mapped to my httpd server using jkmounts.
Under normal conditions, everything is working fine.   I am able to deploy
my wars as webapps using Tomcat's maanger & autodeployer without any issues.
However, I now have a need to deploy my WAR under a context path that is not
at the root level of my tomcat server.

For example, I need to deploy my application.war under:
    http://www.domain.com/demo/application

When I was configuring all my contexts manually directly in server.xml, I
would be able to specify that the context path was /demo/application.
However, when I am now using the autodeployer, is there any way to specify
that the path should be /demo/application?

I have tried putting my context.xml file into Meta-Inf/demo/context.xml, but
Tomcat doesnt even recognize it when it is there.  I tried to create a
directory demo under webapps and put my war there, but that doesn't work
either.

Are there any settings that I can set/create in tomcat to allow me to do
something like this?



Short of that, is there anyway I could remap my JkMount in httpd to point
from /demo/application to /application in my tomcat instance?  Currently, my
JkMount is the following:
JkMount /demo/application/* JkDemo

Although, this mount redirects application correctly over the jk connection,
Tomcat ends up looking for the /demo/application context, which I am having
trouble creating.


Any help / suggestions and/or ideas would be greatly appreciated!

Thanks!

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to Deploy WAR using a sub-context path?

Caldarale, Charles R
> From: news [mailto:[hidden email]] On Behalf Of Eric B.
> Subject: How to Deploy WAR using a sub-context path?
>
> However, I now have a need to deploy my WAR under a context
> path that is not at the root level of my tomcat server.
>
> For example, I need to deploy my application.war under:
>     http://www.domain.com/demo/application

You need to put your <Context> element in
conf/Catalina/[hostname]/demo#application.xml; include a docBase
attribute to point to the location of the appropriate war file (or
directory).  Do not put the application under the <Host> appBase
directory, or it will be deployed twice.

I don't know if you can do this with the autodeployer, but a simple
script should suffice.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
>"Caldarale, Charles R" <[hidden email]> wrote in message
>news:[hidden email]...
>> However, I now have a need to deploy my WAR under a context
>> path that is not at the root level of my tomcat server.
>>
>> For example, I need to deploy my application.war under:
>>     http://www.domain.com/demo/application
>
>You need to put your <Context> element in
>conf/Catalina/[hostname]/demo#application.xml; include a docBase
>attribute to point to the location of the appropriate war file (or
>directory).  Do not put the application under the <Host> appBase
>directory, or it will be deployed twice.
>
>I don't know if you can do this with the autodeployer, but a simple
>script should suffice.

Yeah - that much I had somewhat figured out.  Although, I have to admit, the
naming convention of the context file is really bizarre.  Is it really with
a # in the file name??

My bigger problem, however, is that I am starting to really push ppl to use
the tomcat manager as much as possible to avoid manual manipulations on the
server itself; ideally I would like everything packaged in the war file to
limit the number of potential mistakes and problems that can arise when you
work directly on the server's filesystem.

Is there anyway to instruct tomcat to rename the META-INF/context.xml file
to be demo#application.xml instead of application.xml?  Maybe an instruction
within the context tag itself or even somewhere else (another file, or in
the server.xml file)?

Thanks!

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to Deploy WAR using a sub-context path?

Caldarale, Charles R
> From: news [mailto:[hidden email]] On Behalf Of Eric B.
> Subject: Re: How to Deploy WAR using a sub-context path?
>
> Is it really with a # in the file name??

Yup.

> Is there anyway to instruct tomcat to rename the
> META-INF/context.xml file to be demo#application.xml
> instead of application.xml?

The manager isn't actually part of Tomcat proper, but rather it's just
an application that ships with Tomcat.  It's all open-source, so you're
free to make it work as you wish.  Shouldn't be too hard to parse the
optional "Context Path" field to handle slash delimiters.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
In reply to this post by Eric B.-2
"Eric B." <[hidden email]> wrote in message
news:fht01v$1cd$[hidden email]...

> >"Caldarale, Charles R" <[hidden email]> wrote in message
> >news:[hidden email]...
>>> However, I now have a need to deploy my WAR under a context
>>> path that is not at the root level of my tomcat server.
>>>
>>> For example, I need to deploy my application.war under:
>>>     http://www.domain.com/demo/application
>>
>>You need to put your <Context> element in
>>conf/Catalina/[hostname]/demo#application.xml; include a docBase
>>attribute to point to the location of the appropriate war file (or
>>directory).  Do not put the application under the <Host> appBase
>>directory, or it will be deployed twice.
>>
>>I don't know if you can do this with the autodeployer, but a simple
>>script should suffice.
>
> Yeah - that much I had somewhat figured out.  Although, I have to admit,
> the naming convention of the context file is really bizarre.  Is it really
> with a # in the file name??
>
> My bigger problem, however, is that I am starting to really push ppl to
> use the tomcat manager as much as possible to avoid manual manipulations
> on the server itself; ideally I would like everything packaged in the war
> file to limit the number of potential mistakes and problems that can arise
> when you work directly on the server's filesystem.
>
> Is there anyway to instruct tomcat to rename the META-INF/context.xml file
> to be demo#application.xml instead of application.xml?  Maybe an
> instruction within the context tag itself or even somewhere else (another
> file, or in the server.xml file)?
>

I had the brilliant idea of trying to name my war as demo#application.war,
but the auto-deployer rejected it upon startup.  It did extract the
META-INF/context.xml to conf/Catalina/[hostname]/demo#application.xml
properly, but couldn't unpack the war the demo/application directory.
(Currently have unpackWARs=true in my Host tag).

Still open to ideas / suggestions if anyone has any.

Thanks,

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Johnny Kewl
In reply to this post by Caldarale, Charles R

---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
Chuck is right... the application has to be there already.

Another slight variation on what Chuck is saying is this...

http://localhost:8080/manager/deploy?config=file://D:\\GARBAGE\\TestSite\\META-INF\\context.xml&path=/demo/test

The above URL will deploy it...BUT
Unpack the war file at a "TestSite" location outside of Tomcat/WebApps
Make the context.xml file in that unpacked file look like this.
<Context docBase="D:\GARBAGE\TestSite" path="/Ignored"/>

It will become /demo/test
NOT /Ignored

I think you could deliver the WAR to "TestSite"
And just a reference context.xml file and do it as well... it will ignore
the internal context, I think.

Its weird because it picks up docBase from the context, but looks at the
path (context) in the URL.
I tried it, normal deployment does not work with a sub context... as soon as
you do that it looks for a docBase.

Two ways... but not as slick as the normal deployer... not too Auto ;)


----- Original Message -----
From: "Caldarale, Charles R" <[hidden email]>
To: "Tomcat Users List" <[hidden email]>
Sent: Monday, November 19, 2007 9:41 PM
Subject: RE: How to Deploy WAR using a sub-context path?


> From: news [mailto:[hidden email]] On Behalf Of Eric B.
> Subject: How to Deploy WAR using a sub-context path?
>
> However, I now have a need to deploy my WAR under a context
> path that is not at the root level of my tomcat server.
>
> For example, I need to deploy my application.war under:
>     http://www.domain.com/demo/application

You need to put your <Context> element in
conf/Catalina/[hostname]/demo#application.xml; include a docBase
attribute to point to the location of the appropriate war file (or
directory).  Do not put the application under the <Host> appBase
directory, or it will be deployed twice.

I don't know if you can do this with the autodeployer, but a simple
script should suffice.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
In reply to this post by Caldarale, Charles R
>"Caldarale, Charles R" <[hidden email]> wrote in message
>news:[hidden email]...
>> From: news [mailto:[hidden email]] On Behalf Of Eric B.
>> Subject: Re: How to Deploy WAR using a sub-context path?
>>
>> Is it really with a # in the file name??
>
>Yup.
>
>> Is there anyway to instruct tomcat to rename the
>> META-INF/context.xml file to be demo#application.xml
>> instead of application.xml?
>
>The manager isn't actually part of Tomcat proper, but rather it's just
>an application that ships with Tomcat.  It's all open-source, so you're
>free to make it work as you wish.  Shouldn't be too hard to parse the
>optional "Context Path" field to handle slash delimiters.

Sure.  I realize that.  But after more fishing around in the auto deployer
of Tomcat, it seems that there are greater issues within Tomcat itself.  If
I rename the war to demo#application.war, with unpackWAR set to true, I get
the following error:

SEVERE: Exception fixing docBase: {0}
java.net.MalformedURLException: no !/ in spec
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)
        at
org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:889)


The application still tries to launch, but fails miserably:
java.lang.IllegalArgumentException: Document base
/usr/local/tomcat/apache-tomcat-6.0/demo/webapps/demo/application does not
exist or is not a readable directory


If I turn off the unpackWAR setting, the first error goes away (as it is no
longer trying to unpack the war), but it still fails on the second error -
it is still looking for the war as demo/application.war instead of
demo#application.war.

From a cursory inspection, it looks like the # naming convention wasn't
thoroughly tested out for these types of scenarios in Tomcat's autodeployer.
Either that, or I am missing something somewhere obvious.

Thanks,

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Johnny Kewl
In reply to this post by Johnny Kewl

---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message -----
From: "Johnny Kewl" <[hidden email]>
To: "Tomcat Users List" <[hidden email]>
Sent: Tuesday, November 20, 2007 12:31 AM
Subject: Re: How to Deploy WAR using a sub-context path?


>
> ---------------------------------------------------------------------------
> HARBOR: http://coolharbor.100free.com/index.htm
> Now Tomcat is also a cool pojo application server
> ---------------------------------------------------------------------------
> Chuck is right... the application has to be there already.
>
> Another slight variation on what Chuck is saying is this...
>
> http://localhost:8080/manager/deploy?config=file://D:\\GARBAGE\\TestSite\\META-INF\\context.xml&path=/demo/test
>
> The above URL will deploy it...BUT
> Unpack the war file at a "TestSite" location outside of Tomcat/WebApps
> Make the context.xml file in that unpacked file look like this.
> <Context docBase="D:\GARBAGE\TestSite" path="/Ignored"/>
>
> It will become /demo/test
> NOT /Ignored
>
> I think you could deliver the WAR to "TestSite"
> And just a reference context.xml file and do it as well... it will ignore
> the internal context, I think.

YES! that works as well...
If its a WAR... it unpacks it in WEB-Apps
If its unpacked already... it runs that... interesting because this is
exactly how Netbeans makes TC use the build code in a project.

>
> Its weird because it picks up docBase from the context, but looks at the
> path (context) in the URL.
> I tried it, normal deployment does not work with a sub context... as soon
> as you do that it looks for a docBase.
>
> Two ways... but not as slick as the normal deployer... not too Auto ;)
>
>
> ----- Original Message -----
> From: "Caldarale, Charles R" <[hidden email]>
> To: "Tomcat Users List" <[hidden email]>
> Sent: Monday, November 19, 2007 9:41 PM
> Subject: RE: How to Deploy WAR using a sub-context path?
>
>
>> From: news [mailto:[hidden email]] On Behalf Of Eric B.
>> Subject: How to Deploy WAR using a sub-context path?
>>
>> However, I now have a need to deploy my WAR under a context
>> path that is not at the root level of my tomcat server.
>>
>> For example, I need to deploy my application.war under:
>>     http://www.domain.com/demo/application
>
> You need to put your <Context> element in
> conf/Catalina/[hostname]/demo#application.xml; include a docBase
> attribute to point to the location of the appropriate war file (or
> directory).  Do not put the application under the <Host> appBase
> directory, or it will be deployed twice.
>
> I don't know if you can do this with the autodeployer, but a simple
> script should suffice.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [hidden email]
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [hidden email]
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

markt
In reply to this post by Eric B.-2
Eric B. wrote:
>>From a cursory inspection, it looks like the # naming convention wasn't
> thoroughly tested out for these types of scenarios in Tomcat's autodeployer.
> Either that, or I am missing something somewhere obvious.

What you are missing is that it was never intended to work in this way. The
# convention is currently only for webapps hosted outside the appBase. If
you'd like to submit a patch...

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Johnny Kewl
In reply to this post by Eric B.-2

---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message -----
From: "Eric B." <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, November 20, 2007 12:34 AM
Subject: Re: How to Deploy WAR using a sub-context path?


> >"Caldarale, Charles R" <[hidden email]> wrote in message
> >news:[hidden email]...
>>> From: news [mailto:[hidden email]] On Behalf Of Eric B.
>>> Subject: Re: How to Deploy WAR using a sub-context path?
>>>
>>> Is it really with a # in the file name??
>>
>>Yup.
>>
>>> Is there anyway to instruct tomcat to rename the
>>> META-INF/context.xml file to be demo#application.xml
>>> instead of application.xml?
>>
>>The manager isn't actually part of Tomcat proper, but rather it's just
>>an application that ships with Tomcat.  It's all open-source, so you're
>>free to make it work as you wish.  Shouldn't be too hard to parse the
>>optional "Context Path" field to handle slash delimiters.
>
> Sure.  I realize that.  But after more fishing around in the auto deployer
> of Tomcat, it seems that there are greater issues within Tomcat itself.
> If I rename the war to demo#application.war, with unpackWAR set to true, I
> get the following error:
>
> SEVERE: Exception fixing docBase: {0}
> java.net.MalformedURLException: no !/ in spec
>        at java.net.URL.<init>(Unknown Source)
>        at java.net.URL.<init>(Unknown Source)
>        at java.net.URL.<init>(Unknown Source)
>        at
> org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:889)
>
>
> The application still tries to launch, but fails miserably:
> java.lang.IllegalArgumentException: Document base
> /usr/local/tomcat/apache-tomcat-6.0/demo/webapps/demo/application does not
> exist or is not a readable directory
>
>
> If I turn off the unpackWAR setting, the first error goes away (as it is
> no longer trying to unpack the war), but it still fails on the second
> error - it is still looking for the war as demo/application.war instead of
> demo#application.war.
>
> From a cursory inspection, it looks like the # naming convention wasn't
> thoroughly tested out for these types of scenarios in Tomcat's
> autodeployer. Either that, or I am missing something somewhere obvious.

No, I dont think so, I think this is just an incredibly complex area with a
million tradeoffs.
IDE's have to use it.
It must be able to send a war from a remote machine, or install it locally,
or run one that is unpacked already, sometimes ignore the context, sometimes
not. Allow an IDE to test complex context paths but discourage it from use.
Like I dont know, we figured out how to make it do /Demo/TheWebApp, what
happens if someone drops in a WebApp called Demo now?
Its just complicated.
When the contexts break, but its convenient, we dont mind.
Like when we just change the WebApp name and magic... the /NewName just
happens.
That actually breaks the internal context.xml... but the alternative is to
unpack, change, repack... what user is going to do that.... I think its a
very complicated area... "fix" something like this, you'll have an issue
with an IDE, or something.

Scary stuff ;)



---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Johnny Kewl
In reply to this post by Caldarale, Charles R
---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------

Chuck... check me here ;)
I started wondering why I have never wanted to do this.
ie never wanted to deploy a web-app to a /Demo/WebAppName/ context and I
realized its because I use the MVC model.

So what I would do is rename the WebApp to Demo... and just change the
Servlet Mapping to

    <servlet-mapping>
        <servlet-name>start</servlet-name>
        <url-pattern>/WebAppName</url-pattern>
    </servlet-mapping>

Same URL results....

Becaue my JSP's are always called from a servlet... that works.

With static JSP pages... if one moved them to a folder /WebAppName

Is it not the same thing?... in other words all these deployment tricks can
be thrown away... we back to a normal webapp.

In either case I think if the contexts have been hard coded, nothing will
work, but if not, maybe its the same thing with no pain ;)

If we see it like this  /Demo/WebAppName/
We wanna play with contexts
But if we see it like this
 /WebAppName/WhatEver
We wanna play with mapping and folders?

Maybe its just meant to be done another way... thats what I'm getting at.


---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
In reply to this post by markt
"Mark Thomas" <[hidden email]> wrote in message
news:[hidden email]...

> Eric B. wrote:
>>>From a cursory inspection, it looks like the # naming convention wasn't
>> thoroughly tested out for these types of scenarios in Tomcat's
>> autodeployer.
>> Either that, or I am missing something somewhere obvious.
>
> What you are missing is that it was never intended to work in this way.
> The
> # convention is currently only for webapps hosted outside the appBase. If
> you'd like to submit a patch...

Am in the midst of a rush for a major release here right now, but once I'm
done I'll take a look at the deployment code and see if I can patch it.  I
suspect it to be something relatively minor (a couple of hours), but will
let you know once I'm done.

Thanks!

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

markt
Eric B. wrote:

> "Mark Thomas" <[hidden email]> wrote in message
> news:[hidden email]...
>> Eric B. wrote:
>>> >From a cursory inspection, it looks like the # naming convention wasn't
>>> thoroughly tested out for these types of scenarios in Tomcat's
>>> autodeployer.
>>> Either that, or I am missing something somewhere obvious.
>> What you are missing is that it was never intended to work in this way.
>> The
>> # convention is currently only for webapps hosted outside the appBase. If
>> you'd like to submit a patch...
>
> Am in the midst of a rush for a major release here right now, but once I'm
> done I'll take a look at the deployment code and see if I can patch it.  I
> suspect it to be something relatively minor (a couple of hours), but will
> let you know once I'm done.

Great. If you need a pointer or two - just ask.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
"Mark Thomas" <[hidden email]> wrote in message
news:[hidden email]...

>>>> >From a cursory inspection, it looks like the # naming convention
>>>> >wasn't
>>>> thoroughly tested out for these types of scenarios in Tomcat's
>>>> autodeployer.
>>> The
>>> # convention is currently only for webapps hosted outside the appBase.
>>> If
>>> you'd like to submit a patch...
>>
>> Am in the midst of a rush for a major release here right now, but once
>> I'm
>> done I'll take a look at the deployment code and see if I can patch it.
>> I
>> suspect it to be something relatively minor (a couple of hours), but will
>> let you know once I'm done.
>
> Great. If you need a pointer or two - just ask.


Ok - have looked through the code, and actually, turns out to be quite a
simplistic patch for the autodeployer to handle wars with #s.  How / where
do I submit a patch for this?

Thanks!

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

markt
Eric B. wrote:
> "Mark Thomas" <[hidden email]> wrote in message
>> Great. If you need a pointer or two - just ask.
>
>
> Ok - have looked through the code, and actually, turns out to be quite a
> simplistic patch for the autodeployer to handle wars with #s.  How / where
> do I submit a patch for this?

That is good news. Open a bugzilla item and attach the patch (in diff -u
format) to the bugzilla entry.

Cheers,

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
"Mark Thomas" <[hidden email]> wrote in message
news:[hidden email]...

> Eric B. wrote:
>> "Mark Thomas" <[hidden email]> wrote in message
>>> Great. If you need a pointer or two - just ask.
>>
>>
>> Ok - have looked through the code, and actually, turns out to be quite a
>> simplistic patch for the autodeployer to handle wars with #s.  How /
>> where
>> do I submit a patch for this?
>
> That is good news. Open a bugzilla item and attach the patch (in diff -u
> format) to the bugzilla entry.

Okay - will look into doing that.

In the meantime, I've run into an issue with the undeployer that I'm not
sure how to handle.

I'm testing with an application of mine that uses webwork-2.1.6.jar as a lib
in the WEB-INF/lib directory.  The unpackWARs is set to true.  So the war
gets properly exploded into its directory.  However, when I try to undeploy
it, the undeployer seems unable to delete the webwork-2.1.6.jar file.  If I
try to delete it manually, I see that there is a "lock" on it by the Tomcat
process.  Until I stop Tomcat, I am unable to delete (and consequently
unable to redeploy) the war.

Any ideas what can be done about this?

Tx,

Eric







---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: How to Deploy WAR using a sub-context path?

Caldarale, Charles R
> From: news [mailto:[hidden email]] On Behalf Of Eric B.
> Subject: Re: How to Deploy WAR using a sub-context path?
>
> I see that there is a "lock" on it by the Tomcat process.

You need to set the antiJARLocking and antiResourceLocking attributes of
the <Context> element to true.  This should only be needed on Windows
systems.

Doc page:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
In reply to this post by markt
"Mark Thomas" <[hidden email]> wrote in message
news:[hidden email]...

> Eric B. wrote:
>> "Mark Thomas" <[hidden email]> wrote in message
>>> Great. If you need a pointer or two - just ask.
>>
>>
>> Ok - have looked through the code, and actually, turns out to be quite a
>> simplistic patch for the autodeployer to handle wars with #s.  How /
>> where
>> do I submit a patch for this?
>
> That is good news. Open a bugzilla item and attach the patch (in diff -u
> format) to the bugzilla entry.

Done.  Actually, turned out to be a little more complicated than I had
originally reported; ran into some difficulties with the undeployer, but
working now.

I have submitted the bug & patch to Bugzilla
(http://issues.apache.org/bugzilla/show_bug.cgi?id=44021).  However, I am
not 100% sure that my patch is in the right format/etc.  Can you take a
quick look at it and let me know if it is submitted properly?

Any idea if/when this patch would be available in a release version of
Tomcat?

Thanks,

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

Eric B.-2
In reply to this post by Caldarale, Charles R
"Caldarale, Charles R" <[hidden email]> wrote in message
news:[hidden email]...
> From: news [mailto:[hidden email]] On Behalf Of Eric B.
> Subject: Re: How to Deploy WAR using a sub-context path?
>
> I see that there is a "lock" on it by the Tomcat process.

You need to set the antiJARLocking and antiResourceLocking attributes of
the <Context> element to true.  This should only be needed on Windows
systems.

Doc page:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

 - Chuck


Awesome.  Thanks!

Eric




---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to Deploy WAR using a sub-context path?

markt
In reply to this post by Eric B.-2
Eric B. wrote:
> I have submitted the bug & patch to Bugzilla
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=44021).  However, I am
> not 100% sure that my patch is in the right format/etc.  Can you take a
> quick look at it and let me know if it is submitted properly?

Format looks good.

> Any idea if/when this patch would be available in a release version of
> Tomcat?

This is on my things to do list but I do want to resolve some DBCP issues
first.

I would expect to get to this in time for the next 6.0.x or the one after
that. Unless, of course, one of the other committers gets there first.

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: [hidden email]
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

12