File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Context and WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Context and WAR file" Watch "Context and WAR file" New topic
Author

Context and WAR file

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I have a context entry for my web app. And when i deploy my WAR file, Tomcat won't extract the WAR file. But if I remove the context entry for the web app, Tomcat will extract the WAR file.
Any ideas why? I would really like this to work.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

This is really a pain in the butt. Anyone have any ideas?
ramdas pradeep kumar
Ranch Hand

Joined: Aug 27, 2003
Posts: 36
i am new to tomcat. actually what is context entry?
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Hmm. I agree that a bit more information is required.
Are you saying that if you have some information about a web application in some Tomcat-specific file, Tomcat won't expand and load a war file? If so, my feeling would be that this is probably the intended behaviour - you have achoice of either manually telling Tomcat about your application, or letting the war deployment proces do it for you.
What "context" information are you trying to tell Tomcat? Can that information be put in the war file? Can you give us a snippet of the appropriate config file?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Ok, the reason I have specified a context for my web app is for ConnectionPooling. Here is my context entry

Now originally, I had this in my server.xml file, but I didn't want users to have to touch that file, so I put this in a seperate file called holocron.xml and put it in %TOMCATHOME%/webapps/. It works just fine, except for the whole unpackaging of the WAR file.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Well, seeing as how this must be default tomcat behavior, I have reworked my ant build.xml file to deploy the directory structure instead of a WAR file. This at least lets me easily test as I go. I can worry about the other problem later.
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context and WAR file