This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hello, Can anyone tell me how to do this. i've placed the files I want in one folder and I've typed in the command line : jar cvf test.war ServletSimplePublisher.java ServletSimplePublisher.class SimplePublisher.html web.xml is it correct to copy all files you r gonna pack in a folder and then jar it? Now, I've got a test.war file. How do I unpack it? thanks
I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
You don't have the correct WAR file structure, your WAR needs to look something like this:
Then to jar it you can type: jar cvf test.war * or jar cvf test.war SimplePublisher.html WEB-INF/web.xml WEB-INF/classes/ServletSimplePublisher.class WEB-INF/src/ServletSimplePublisher.java There's no need to unpack your WAR file in order to deploy it to your application server. But, if for some odd reason you want to explode the WAR, you can use a program such as WinZip, or you can use the jar tool: jar xvf test.war The HP Application Server comes with some great TrailMaps that will introduce you to WAR files, their structure, and how they work. HP-AS also comes with a deployment tool called RadPak that makes creating and deploying WAR files quite easy. -- And better yet, HP-AS is totally free. [ February 14, 2002: Message edited by: Jessica (Bradley) Sant ]
Ant can be used to copy files, make directories, complile source, run tests, pack into jars, wars and ears. I you want a detailed intro to how to get ant to do all this look at: Java Tools for eXtreme Programming (Hightower & Lesiecki ) -steve