File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes using .war file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "using .war file" Watch "using .war file" New topic

using .war file

Sudd Ghosh
Ranch Hand

Joined: Oct 23, 2002
Posts: 187
I am trying to use a war file for my webapp called "/webapp/chapter16". Do I need to create the war file from inside the "/webapp/chapter16" dir or from a level higher "/webapp/" dir? Also after the war file is created, do I need to place it inside the "chapter16" dir or outside ? What else do I need to do to get this running ?

Sam Dalton
Ranch Hand

Joined: Jul 26, 2001
Posts: 170
You should be able to drop your WAR file into the webapps directory.

<a href="" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of []Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
You create the war in the chapter16 directory and name it chapter16.war. You can do a quick test and see if it was created properly using jar-tf chapter16.war. The list will show all the files in a the same structure that exists under chapter16 (But, not include the directory chapter16). Then placing it under webapp on Tomcat will do the trick.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
I agree. Here's the link:
subject: using .war file
It's not a secret anymore!