aspose file tools
The moose likes Servlets and the fly likes Problem with war files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Problem with war files" Watch "Problem with war files" New topic
Author

Problem with war files

Komal Amaresh
Ranch Hand

Joined: Oct 06, 2008
Posts: 67
Hello,
I had visited the codebarn of javaranch to try the servlet given there. The page tells to download the SimpleServlet.war file to the webapps folder in the Tomcat directory. it further warns us to be careful not to store the file as zip file. But everytime i try to download it, it opens as ZIP archive file. How am i supposed to download/store war files as they are?

Thanks in advance.

regards,
Komal
[ November 08, 2008: Message edited by: Komal Amaresh ]
carina caoor
Ranch Hand

Joined: Jun 23, 2007
Posts: 300

1)Download the file(save it as it is) as zip and then unzip it... you will get actual files,
run the command prompt command jar -cvf . SampleServlet.war *
this will pack all your files in to war file.
2)place the war file in your CATALINA HOME$/webapps/
3)run the application..

[ November 09, 2008: Message edited by: ruquia tabassum ]
[ November 09, 2008: Message edited by: ruquia tabassum ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You don't need to unzip it yourself.

MSIE sees that war files are zip files and changes the extension for you.
You can either, download it and let MSIE do what it will and then rename the file; changing the extension from *.zip to *.war OR, when downloading, select the "Download as ALL FILES" option instead of "Download as a zip file".

You may also want to consider grabbing a copy of Firefox.
There are a lot of FireFox plugins that make life easier for web developers.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with war files
 
Similar Threads
Do I need context name
Struts
how to open war file
how to put my .war file into netbean IDE and make it run?
class file is not loading while running JSP file