creating and deploying WAR file

Hello,

I have problem with deploying WAR file.

My dir structure:

C:\apache-tomcat-5.5.17\webapps\working

WEB-INF/ (web.xml)

classes/ (prj.class, prj.java, oracle/)

lib/

If I deploying prj servlet: http://localhost:8088/working/servlet/prj

It works OK, but if I trying to create WAR file it does not work.

in cmd (C:\Program Files\Java\jdk1.5.0_06\bin>) I run a comand "jar cvf working.war ."

When the WAR file is created it is in (C:\Program Files\Java\jdk1.5.0_06\bin\) directory, I copied it into my (C:\apache-tomcat-5.5.17\webapps\), restarted tomcat but it didn't work.

Can anybody help me with this problem? How corectly to create and deploy WAR file.

Thanks in advance.

Andrew

[773 byte] By [forumaica] at [2007-10-3 0:04:27]
# 1

My guess would be that when you created the war file the internal paths were incorrect. Open the war file using WinZIp and check the file paths. They should be relative to the web application directory (ie prj.java should have the file path "WEB-INF/classses")

As an added thought you may want to put your servlet file into packages.

tolmanka at 2007-7-14 16:52:29 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I solve this problem.Correct syntax:jar cvf \path\to\war\file\MyWar.war -C \path\of\files\to\archive .I hope it helps who will have this kind of problem.
forumaica at 2007-7-14 16:52:29 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...