Howdy, Add a valid web.xml to your war file and try again ;)
Yoav Shapira Millennium ChemInformatics
i tried adding the one below, but no joy :(
same unzip problem as before:
install:
[deploy] FAIL - Encountered exception java.util.zip.ZipException: error in opening zip file
but, the myapp.war that ends up in akarta-tomcat-5.0.16\webapps/ is only 36 bytes long, so something else is afu.
hmm, the deploy task has: war="file://${build.home}"/> while the dist task has: jarfile="${dist.home}/${app.name}-${app.version}.war". changed this to war="file://${dist.home}"/, stil no joy.
changed it to: war="file://${dist.home}/${app.name}-${app.version}.war"/> and ant says it deployed ok.
so it looks like the war line was just bad in the sample build.xml.
i still get a 404 trying the servlet link on http://localhost:8080/myapp/ which links to http://localhost:8080/myapp/hello and the jsp link which takes me to http://localhost:8080/myapp/hello.jsp says:
Context Path: /myapp Path Information: null Query String: null Request Method: GET Servlet Path: /hello.jsp
is there something wrong with my web.xml perhaps?
who builds the the web.xml file for my app and where should it be kept? (i made in the base dir of my project and did a <copy todir="${build.home}/WEB-INF" file="web.xml"/> in the prepare step).
will i still have to mung the .xml in conf/?
thanks
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Hello, World Application</display-name>
<description>
This is a simple web application with a source code organization
based on the recommendations of the Application Developer's Guide.
</description>
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>mypackage.Hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>/myapp</url-pattern>
</servlet-mapping>
</web-app>
>-----Original Message----- >From: Ray Tayek [mailto:[EMAIL PROTECTED] >Sent: Wednesday, December 17, 2003 1:20 AM >To: [EMAIL PROTECTED] >Subject: 5.0.16 sample can't deploy, gets zip exception > >hi, just tried 5.0.16 (trying to get this to work for a class i am teaching >this thursday). all is well until the install. i get a: > >install: > [deploy] FAIL - Encountered exception java.util.zip.ZipException: error >in opening zip file > >BUILD FAILED >file:H:/htdocs/ltu/servlets/sample/build.xml:90: FAIL - Encountered >exception java.util.zip.ZipException: error in opening zip file > >the complete output from the build is at the end. i modified the build file >by making install depend on dist and removed a lot of comments. > >the myapp.war unjars fine ... > ... >but the servlet class can not be found as it is asking for hello, i guess >this is because i did not alter the .xml files where the mappings live. >iirc, there was some mention of supplying your own. > >has anyone gotten the sample to install from ant? > >if not, where can find the doc on making my own .xml files to define the >mappings (assuming that works) instead of munging tomcat's files or should >i just go back to doing it the old way? ...
--- ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work vice chair orange county java users group http://www.ocjug.org/ hate spam? http://samspade.org/ssw/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
