Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deploying servlet on Tomcat using "ant install" not working. Please help.

843841Feb 4 2004 — edited Nov 8 2006
Hello. Normally I can find answers by using search, but I can't today for some reason. So please bare with me if this has been mentioned before. I will try to provide as much info as possible so that helping me isn't too much a chore. Thank you.

I have downloaded and installed the JWSDP 1.3. and Tomcat is running. I am also using Ant 1.5.4 (previous installation - not one included with JWSDP) and modeled my build.xml file after the template provided here:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt.

When I run ant on my respository, everything builds fine. But when I run Ant with the install target, I get the following error:

BUILD FAILED
file:C:/owl/build.xml:366: java.io.IOException: Server returned HTTP response co
de: 401 for URL: http://localhost:8080/manager/deploy?path=%2Fowl&war=file%3A%2F
%2FC%3A%5Cowl%2Fbuild

Here is line 366 build.xml:

localWar="file://${build.home}"/>

...which is included in this block for the target "install":

<target name="install" depends="compile"
description="Install application to servlet container">

<deploy url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"
localWar="file://${build.home}"/>

</target>

When I point my brower to the url located in the error verbose, I get the following:

FAIL - Encountered exception java.lang.NullPointerException

I am trying to get my environment set up correctly before I start spending time developing servlets, but I am getting tempted to just develop to servlets and "manually" installing/deploying them either by copying and pasting or by using the Tomcat manager. I would really like to do everything from Ant though if possible. Please help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2006
Added on Feb 4 2004
5 comments
334 views