File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes how to open a WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to open a WAR file" Watch "how to open a WAR file" New topic

how to open a WAR file

gaurav chhabra
Ranch Hand

Joined: Jul 24, 2004
Posts: 109
sir i have downloaded some chapters from net and in that each chapter is in WAR fromat and one main thing is that chapter 1 consist of two war file ,,,,,,, one is of chapter that is cho1.war and other is index1.jsp file and i try to run jsp file and it is giving error....plz tell me that how to use that files.
thank you
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
WAR file is a normal ZIP file, you can open it as a ZIP file.
If you want to run the application which is packaged in war file you must deploy it on application server (servlet & JSP container) - Tomcat, JBoss, WebSphere, WebLogic etc.
Simple JSP must be also packaged in WAR file.
If you have some IDE you could use integrated test environment - in WebSphere Studio just import that WAR file.

SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

With Tomcat, all you need to do is drop the war file in your webapps folder.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
subject: how to open a WAR file
It's not a secret anymore!