• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Tomcat is unable to detect web.xml from WAR

 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created a ware file and following is the contents of the war file.
It just has a Servlet and a index.html file.
D:\myapp>jar -tf kar.war
META-INF/
META-INF/MANIFEST.MF
index.html
web-inf/
web-inf/classes/
web-inf/classes/pack/
web-inf/classes/pack/HelloServlet.class
web-inf/classes/pack/HelloServlet.java
web-inf/web.xml

I copied it to the webapps directory.
When i start tomcat it is able to extract the war file and i see the directory structure as well.
But while adding the web application it complains about web.xml file.
BUT i can see the web.xml file in
D:\Apache Tomcat 4.0\webapps\kar\web-inf
directory.
This is the trace..
2002-03-16 13:01:19 StandardHost[localhost]: Installing web application at context path /kar from URL jar:file :\Apache Tomcat 4.0\webapps\kar.war!/
2002-03-16 13:01:19 WebappLoader[/kar]: Deploying class repositories to work directory D:\Apache Tomcat 4.0\work\localhost\kar
2002-03-16 13:01:19 StandardManager[/kar]: Seeding random number generator class java.security.SecureRandom
2002-03-16 13:01:19 StandardManager[/kar]: Seeding of random number generator has been completed
2002-03-16 13:01:19 ContextConfig[/kar]: Missing application web.xml, using defaults only
2002-03-16 13:01:19 StandardWrapper[/kar efault]: Loading container servlet default
2002-03-16 13:01:19 default: init
2002-03-16 13:01:19 StandardWrapper[/kar:invoker]: Loading container servlet invoker
2002-03-16 13:01:19 invoker: init
2002-03-16 13:01:19 jsp: init
2002-03-16 13:01:19 Internal Error: File /WEB-INF/web.xml not found
2002-03-16 13:01:19 StandardContext[/kar]: Servlet /kar threw load() exception
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WEB-INF must be in all caps, and yours is in lower case.
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mike Curwen:
WEB-INF must be in all caps, and yours is in lower case.


thanks! it works now.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! I have the same error as yours although WEB-INF is in capitals...Kindly help to solve it...Here's the trace..
Thanks,
Raja

2003-09-05 17:06:12 WebappLoader[/test_struts]: Deploying class repositories to work directory C:\Tomcat 4.1\work\Standalone\localhost\test_struts
2003-09-05 17:06:12 WebappLoader[/test_struts]: Reloading checks are enabled for this Context
2003-09-05 17:06:12 ContextConfig[/test_struts]: Missing application web.xml, using defaults only
2003-09-05 17:06:12 StandardManager[/test_struts]: Seeding random number generator class java.security.SecureRandom
2003-09-05 17:06:12 StandardManager[/test_struts]: Seeding of random number generator has been completed
2003-09-05 17:06:12 StandardWrapper[/test_struts efault]: Loading container servlet default
2003-09-05 17:06:12 StandardWrapper[/test_struts:invoker]: Loading container servlet invoker
Missing application web.xml
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic