• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is required in WAR file?

 
Jeff Schuler
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a mock question that stated /WEB-INF/classes was required. Is this true? From what I have read only /WEB-INF/web.xml is required.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the spec is not clear enough about that. It tells us that WEB-INF contains
  • web.xml
  • classes directory
  • lib directory

  • I don't see it saying that those are mandatory. The funny thing is that if you look at Tomcat's webapps/ROOT directory, you'll find a WEB-INF with only web.xml in it ! (I'm not saying that Tomcat something to refer to though). If I were asked if classes is mandatory, I'd say no. You can package your classes in a jar file and put it in the lib directory after all. I guess that the container looks for those directories, but if there not here, who cares No classes loaded, no libraries loaded.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic