• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Problem with context in server.xml

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I'm having problems manually creating a context in my server.xml. If I just dump my generated war file into the webapps directory tomcat unpacks the war and everything is fine, however because I need to delcare some resources for this particular context I have to manually enter the context into the server.xml.
When I declare the context in the server.xml and try to start up tomcat the following error is logged by tomcat:

The .war file never gets unpacked the unpackWARs has been set to 'true' so I know that's not the problem. I thought it might be a problem with the resources I've declared but if I remove them I still get the same result when I try to deploy the war file.
Any ideas?
 
Simon Good
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No need to reply, I've sorted it.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you give a short summary of what the solution turned out to be, just for the archives.
Bill
 
Simon Good
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd incorrectly specified the docbase in the context. When I specified the docbase to be the name of the war file I was trying to deploy tomcat successfully unpacked the war file ie
However, that's not the end of it. What I'm now seeing is that the war file (quickstart.war) has been unpacked in the directory specified in the 'Engine' tag. So in the {TOMCAT_HOME}/work/Standalone/localhost directory I now have
  • quickstart/web-inf/web.xml
  • quickstart/web-inf/lib/numerous .jar files


  • Any servlets I have in the web-inf/lib directory are served up ok but none of the jsp files which are present in the war file are being unpacked to the {TOMCAT_HOME}/work/Standalone/localhost/quickstart directory so I can't run them. Something is very wrong and I'm failing to see what it is.
    FYI
    The Engine tags reads as follows:

    The Host tag reads as follows:

    The first part of the context reads as follows:

    All suggestions welcome
     
    I didn't say it. I'm just telling you what this tiny ad said.
    We need your help - Coderanch server fundraiser
    https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    reply
      Bookmark Topic Watch Topic
    • New Topic