Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with war files

 
Komal Amaresh
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 300
Eclipse IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic