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

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.

I don't think this is at all correct:
localWar="file://${build.home}"/>You've got to create a real WAR file - a JAR file with WEB-INF and all its minions inside it:
http://access1.sun.com/techarticles/simple.WAR.html
That's the file you need to refer to there. You can manage that with Ant too, of course.
Here's what my Ant build.xml looks like for Web apps (there's a build-web.properties file that follows):
build-web.xml
<project name="Tomcat Build Tasks" default="clean" basedir=".">
    <target name="init-props">
        <tstamp>
            <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" />
        </tstamp>
        <filterset id="ant.filters">
            <filter token="DATE" value="${TODAY}" />
            <filter token="TIME" value="${TSTAMP}" />
        </filterset>
        <!-- Load in all the settings in the properties file -->
        <property file="build.properties" />
        <!-- Load in all Tomcat settings in the properties file -->
        <property file="build-web.properties" />
    </target>
    <target name="prepare" depends="init-props">
        <mkdir dir="${war.classes}"/>
        <mkdir dir="${war.lib}"/>       
        <mkdir dir="${manifest}" />
    </target>
    <target name="clean" depends="init-props" description="clean up temporary files">
        <delete file="${project}.war" />   
        <delete dir="${war.root}"/>
        <delete dir="${manifest}" />
    </target>
    <target name="set-tomcat-classpath" depends="prepare">
        <path id="tomcat.class.path">                  
            <fileset dir="${tomcat.home}/bin">
                <patternset>
                    <include name="**/*.jar" />
                </patternset>
            </fileset>
            <fileset dir="${tomcat.home}/shared/lib">
                <patternset>
                    <include name="**/*.jar" />
                </patternset>
            </fileset>
            <fileset dir="${tomcat.home}/common/lib">
                <patternset>
                    <include name="**/*.jar" />
                </patternset>
            </fileset>
            <fileset dir="${tomcat.home}/server/lib">
                <patternset>
                    <include name="**/*.jar" />
                </patternset>
            </fileset>
            <fileset dir="${ant.home}/lib">
                <patternset>
                    <include name="**/*.jar" />
                </patternset>
            </fileset>
        </path>              
    </target>
    <target name="create" depends="set-tomcat-classpath" description="create the war file">
        <!-- All files at root level -->       
        <!-- Temporarily put the JSPs at root until you figure this out -->
        <copy todir="${war.root}">
            <fileset dir="${src.jsp}"/>
        </copy>
<!--
        <copy todir="${war.root}">
            <fileset dir="${src.html}" includes="*.html"/>
        </copy>
-->
        <copy todir="${war.root}/css">
            <fileset dir="${src.css}"/>
        </copy>
        <copy todir="${war.root}/images">
            <fileset dir="${src.images}"/>
        </copy>
        <copy todir="${war.root}/js">
            <fileset dir="${src.js}"/>
        </copy>
        <!-- All files at the WEB-INF level and below -->       
        <copy todir="${war.web}">
            <fileset dir="${src.etc}" includes="web.xml"/>
        </copy>
        <!-- All files in the CLASSPATH lib -->
        <copy todir="${war.web}/lib">
            <fileset dir="${src.lib}" includes="**/*.jar" excludes="**/*-tests.jar, **/junit.jar"/>
        </copy>
        <!-- Put the dispatcher XML in WEB-INF/config -->
        <copy todir="${war.web}/config">
            <fileset dir="${src.etc}" includes="${project}-config.xml"/>
        </copy>
        <!-- Put XSL stylesheets in WEB-INF/xsl -->
        <copy todir="${war.web}/xsl">
            <fileset dir="${src.xsl}" includes="**/*.xsl"/>
        </copy>
        <!-- Put the project JAR file in WEB-INF/lib -->
        <copy todir="${war.web}/lib">
            <fileset dir="${deploy}" includes="**/${project}.jar"/>
        </copy>
        <!-- Create the manifest -->
        <buildnumber />
        <manifest file="${manifest}/manifest.mf">
            <attribute name="Implementation-Title"      value="${project}" />
            <attribute name="Built-By"                  value="${user.name}"/>
            <attribute name="Build-Date"                value="${TODAY}" />
            <attribute name="Major-Version"             value="${major}" />
            <attribute name="Minor-Version"             value="${minor}" />
            <attribute name="Build-Number"              value="${build.number}" />
        </manifest>
        <!-- Create the WAR file -->
        <jar jarfile="${project}.war"
             manifest="${manifest}/manifest.mf">
            <fileset dir="${war.root}"/>
            <metainf dir="${src.etc}" includes="context.xml"/>
        </jar>
    </target>
    <target name="create-tomcat-admin-tasks" depends="set-tomcat-classpath">
<!--
        <pathconvert targetos="windows" refid="tomcat.class.path" property="converted.class.path" />
        <echo message="CLASSPATH: ${converted.class.path}" />
-->       
        <taskdef name="install"     classname="org.apache.catalina.ant.InstallTask"     classpath="tomcat.class.path"/>
        <taskdef name="remove"      classname="org.apache.catalina.ant.RemoveTask"      classpath="tomcat.class.path"/>       
        <taskdef name="reload"      classname="org.apache.catalina.ant.ReloadTask"      classpath="tomcat.class.path"/>
        <taskdef name="deploy"      classname="org.apache.catalina.ant.DeployTask"      classpath="tomcat.class.path"/>       
        <taskdef name="undeploy"    classname="org.apache.catalina.ant.UndeployTask"    classpath="tomcat.class.path"/>       
        <taskdef name="start"       classname="org.apache.catalina.ant.StartTask"       classpath="tomcat.class.path"/>       
        <taskdef name="stop"        classname="org.apache.catalina.ant.StopTask"        classpath="tomcat.class.path"/>       
        <taskdef name="list"        classname="org.apache.catalina.ant.ListTask"        classpath="tomcat.class.path"/>       
        <taskdef name="resources"   classname="org.apache.catalina.ant.ResourcesTask"   classpath="tomcat.class.path"/>       
        <taskdef name="roles"       classname="org.apache.catalina.ant.RolesTask"       classpath="tomcat.class.path"/>
    </target>
    <target name="install" depends="create-tomcat-admin-tasks" description="install the war file on Tomcat">
        <install    url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    path="/${project}"
                    config="file:/${basedir}/${src.etc}/context.xml"
                    war="file:/${basedir}/${project}.war" />
    </target>
    <target name="remove" depends="create-tomcat-admin-tasks" description="remove the war file on Tomcat">
        <remove     url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    path="/${project}" />
    </target>
    <target name="reload" depends="create-tomcat-admin-tasks" description="reload the war file on Tomcat">
        <reload     url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    path="/${project}" />
    </target>
    <target name="deploy" depends="create-tomcat-admin-tasks" description="deploy the war file on Tomcat">
        <deploy    url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    path="/${project}"
                    config="file:/${basedir}/${src.etc}/context.xml"
                    war="file:/${basedir}/${project}.war" />
    </target>
    <target name="undeploy" depends="create-tomcat-admin-tasks" description="undeploy the war file on Tomcat">
        <undeploy   url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    path="/${project}" />
    </target>
    <target name="start" depends="create-tomcat-admin-tasks" description="start an application on Tomcat">
        <start      url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    path="/${project}"/>
    </target>
    <target name="stop" depends="create-tomcat-admin-tasks" description="stop an application on Tomcat">
        <stop       url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    path="/${project}" />
    </target>
    <target name="list" depends="create-tomcat-admin-tasks" description="list all applications running on Tomcat">
        <list       url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"/>
    </target>
    <target name="resources" depends="create-tomcat-admin-tasks" description="list all resources on Tomcat">
        <resources  url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"/>
    </target>
    <target name="data-sources" depends="create-tomcat-admin-tasks" description="list all data sources on Tomcat">
        <resources  url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"
                    type="javax.sql.DataSource"/>
    </target>
    <target name="roles" depends="create-tomcat-admin-tasks" description="list all user roles on Tomcat">
        <roles      url="${tomcat.manager.url}"
                    username="${tomcat.username}"
                    password="${tomcat.password}"/>
    </target>
</project>
build.properties
# Properties file for setting up an Ant build.xml
# Project specific items that change each time
project=api-prototype
major=1
minor=0
version=${major}.${minor}
jar.name=${project}
versiondate=${TODAY}
# Directory structure (these should never change)
bin=bin
deploy=deploy
doc=doc
manifest=META-INF
xml=xml
# Everything under src should come out of a repository
src=src
src.bin=${src}/bin
src.config=${src}/config
src.data=${src}/data
src.dtd=${src}/dtd
src.java=${src}/java
src.lib=${src}/lib
src.profile=${src}/profile
src.properties=${src}/properties
src.schema=${src}/schema
src.sql=${src}/sql
src.templates=${src}/templates
src.testdata=${src}/testdata
src.xml=${src}/xml
src.xsl=${src}/xsl
# These are created and deleted by Ant each time
javadocs=javadocs
reports=reports
output=output
output.classes=${output}/classes
output.lib=${output}/lib
# Required for proper use of XDoclet
xdoclet.home = C:/Tools/xdoclet-1.2b3
build-web.properties
war.root=war-root
war.pages=${war.root}/pages
war.web=${war.root}/WEB-INF
war.classes=${war.web}/classes
war.css=${war.web}/css
war.js=${war.web}/js
war.lib=${war.web}/lib
war.tld=${war.web}/tld
# Properties needed by Tomcat tasks
ant.home =
tomcat.home         =
tomcat.manager.url  = http://localhost:8080/manager
tomcat.username     =
tomcat.password     = MOD

Similar Messages

  • Adobe install not working - PLEASE HELP!

    Hi, I seem to be having trouble installing the updated Adobe Flash Player verison.
    I'm trying to download Adobe Flash Player 11.2.202.233 for Firefox 11.0 (x86 en-us) and when I try downloading the file I recieve one of two error messages.
    This is the first one 
    Opening install_flashplayer11x32_mssd_aih.exe
    C:\Users\Daniel\AppData\Local\Temp\DjHhSRiS.exe.part could not be saved, because the source file could not be read.
    Try again later, or contact the server administrator.
    The odd time I get pass this part of the problem but then when I try to run the installation this window pops up.
    Host
    Certificate authentication failed, please re-install to correct the problem.
    I've tried countless times over the past 12 or so hours (most over a 2-3 hour stretch mind you) but I always get the same messages.
    I even restored my system so I could have my previous version of Adobe Flash Player back so I could view some videos on YouTube to see if I could solve the problem through that.
    I have also tried installing Adobe Flash Player 11.2.202.233 for IE (I'm not sure what version I have, I think 9) but it also won't download from there. It says the installation has been interrupted. I saw on another help site someone posted that you should enable Adboe PDF Link Helper when installing the flash player for IE but I did that and the installation still wouldn't complete.
    I'm not sure what else I should try and do.
    I would really appreciate some help on this.
    Thank you.
    UPDATE: I tried downloading Adobe Flash Player 11.2.202.233 on another laptop to see if I coulnd transfer the file over on a USB Key however I got the same error message on that laptop as well. I was using IE on the second latop and wanted to try it for Firefox but that laptop did not have Firefox installed. Now that this message has appeared on a second computer could this mean that the majority of people are having problems updating to this flash version?
    UPDATE #2: I've also uploaded a picture of the Open File - Security window that pops up before it allows me to run the installation (or attempt too). It's the bottom of the window that catches my attention, it says "This file does not have a valid digital signature that verifies it's publisher."  I don't understand why it would say that if I'm downloading straight from Adobe's website.
    Any thoughts?

    Try downloading the offline installers from http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html#Ins tall_in_a_firewall_proxy_server_environment

  • I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

  • I installed windows 7 on my macbook pro. all is working but lan adaptor and sound od laptop is not working. please help me or send the link where i can download the these drivers.

    I installed windows 7 on my macbook pro. all is working but lan adaptor and sound od laptop is not working. please help me or send the link where i can download the these drivers.I have lost my resource cd .

    If you are running Lion or Mountain Lion, the drivers are downloaded from within Bootcamp Assistant. If you are running Snow Leopard the drivers are on your Snow Leopard install disk.
    Read the Bootcamp Install Guide for your version of OSx. http://www.apple.com/support/bootcamp/
    Bootcamp questions should be asked in the Bootcamp forum where the Bootcamp gurus hang out https://discussions.apple.com/community/windows_software/boot_camp

  • HT201320 I have ne iphone 5, i been setting my email using AT&T global but it is not working, please help me on the correct configuration

    I have ne iphone 5, i been setting my email using AT&T global but it is not working, please help me on the correct configuration

    Contact the email provider and obtain the correct setup information.

  • Hi,my name is Hemanth.Im using ipod touch and my ipod is not detecting in itunes  but detecting in my computer.Im using windows7 os.I tried the troubleshooting process given in web but still it not working please help me.

    Hi,my name is Hemanth.Im using ipod touch and my ipod is not detecting in itunes  but detecting in my computer.Im using windows7 os.I tried the troubleshooting process given in web but still it not working please help me.

    Did you try everything here:
    iOS: Device not recognized in iTunes for Windows
    Then try a different computer to help determine if yo have an IPod or computer problem.

  • My ipad mini and iphone 4s are not connecting over bluetooth. iphone cannot locate ipad mini or says it is not supported. It used to work perfectly but now its not working. please help.

    my ipad mini and iphone 4s are not connecting over bluetooth. iphone cannot locate ipad mini or says it is not supported. It used to work perfectly but now its not working. please help.

    Hi
    Thanks for the support but I had already tried this . Again did it as you advised. Still not able to connect the ipad mini with Bluetooth.
    Could it be that some app is causing issue. I can connect my car and computer over Bluetooth but not ipad mini.
    On the other had ipad is connecting to other iPhone but only not mine.
    Still showing ipad not supported message. And also shows not paired.
    Please help.

  • I have 4s iPhone , I download the iOS 7. Now the front receiver microphone is not working , please help me that how to fix the problem.

    I have 4s iPhone , I download the iOS 7. Now the front receiver microphone is not working , please help me that how to fix the problem.

    I live in South Africa, and I had the same problem with my iPhone 4.
    After weeks of frustration and swearing, I was in the process of restoring my phone to a previous iOS. To do that you need to turn the "Find my iPhone" option off, since i turned it off, my problem was solved. No need to repair anything or revert back to old iOS.
    ***** that i cant use Find my iPhone, but atleast i can use my phone.

  • HT1414 my handsfree is not working please help me

    Hi There!
    I am using Iphone 4s and ny handsfree in not working please help me

    Try restarting you iPhone by holding down the on/off and the home buttons at the same time until you see the Apple logo. 

  • The built-in mic in g50 122ca laptop model is not working. please help me out.

    the built-in mic in g50 122ca laptop model is not working. please help me out. OS: Windows Vista (32-bit)

    here is a sample code .
    so far you procedure looks good but
    i bet you have to specify the name of report , instead of 'filename'.
    see this
    Plist_id := GET_PARAMETER_LIST('P_name');
    IF NOT ID_NULL(Plist_id) THEN
    DESTROY_PARAMETER_LIST(Plist_id);
    END IF;
    Plist_id := CREATE_PARAMETER_LIST('P_name');
    ADD_PARAMETER( Plist_id, 'P_Receive_date', TEXT_PARAMETER, TO_CHAR(Receive_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Hearing_date', TEXT_PARAMETER, TO_CHAR(Hearing_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Hearing_time', TEXT_PARAMETER, TO_CHAR(Hearing_time,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Issue_date', TEXT_PARAMETER, TO_CHAR(Issue_date,'mm/dd/yyyy'));
    ADD_PARAMETER( Plist_id, 'P_Workshop_date', TEXT_PARAMETER, TO_CHAR(Workshop_date,'mm/dd/yyyy'));
    -- RUN_PRODCT(REPORTS,'..\Reports\Pro_License',SYNCHRONOUS, RUNTIME, FILESYSTEM, Plist_id, NULL);
    -- here Pro_License is the name of report.
    did you tried to see if the parameter passed using a message ?
    try
    message('parameter name'); pause; write this before "run_report".

  • The click at touchpad is not working, please help!!!

    I use Macpro, recently the click at touchpad is not working, please help!!! Thank you !!

    For this issue AppleCare support told me to so a SMC reset as follows:
    Power the machine OFF.
    At the SAME TIME hold down the following buttons:
    Shift
    Control
    Option
    Power
    Then release all buttons.  Power up the Macbook and see if the trackpad button work.
    Hope this helps.
    Bill

  • TS1702 After I updated my new Ipad  with IOS 6, now Map& Dictation icon are not working. please help me

    After I updated my new Ipad  with IOS 6, now Map& Dictation icon are not working. please help me

    Thank you wjsten for your soon reply. Unfortunately on these days I'm in a country that Apple don't have any retail store here and for sake of time I prefer to fix it myself to DHL it to the nearest country to use its warranty. Do you have any idea how can I fix it? Do you think it's a software issue?

  • I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    You mean an image such as a scanned document?
    If that is the case, the file doesn't contain any text for Reader Out Loud to read. In order to fix that, you would need an application such as Adobe Acrobat that does Optical Character Recognition to convert the images to actual text.
    You can also try to export the file as a Word document or something else using ExportPDF which I believe offers OCR and is cheaper than Acrobat.

  • I backed up my Iphone to itunes so i can do the new Update to IOs 7 and so now that i updated it i want to backup and restore and its not working, Please help!

    I backed up my Iphone to itunes so i can do the new Update to IOs 7 and so now that i updated it i want to backup and restore and its not working, Please help!

    An iPhone backup to a computer via iTunes stores the photos in a backup file that is only meant to be be used if needed to restore back to the phone. There is 3rd party "extractor" software available but otherwise the photos are not directly viewable.
    The backup via iTunes was a good idea and your Camera Roll photos should be there and should be able to be restored to your new phone. However if it was me I wouldn't rely on that alone. I would also import the photos to a computer where you can see and verify that you have a copy. That is a good idea at any time (not just when you know you might need it). Any phone can be lost, broken, suffer hardware issues, etc at any time and lose all data on it. Following is a link with information on how to import the photos to a computer:  Import photos and videos from your iPhone, iPad, or iPod touch to your Mac or Windows PC - Apple Support

  • Hp DV6 TouchPad Lock Button Not Working Please Help.?

    I just bought my hp dv6 6c4se entertainment notebook. but the touchpad on and off button is not working.please help.yes there is a little white sqaure in the left up corner of the touchpad.but it doesnt work.please help somebody

    Try a Hard Reset to gently "kick" that TouchPad back into operation.
    HP Notebook PCs - Use a Forced Reset to Resolve Hardware and Software Issues on Notebook with a Seal...
    Removable Battery:
    HP Notebook PCs - Use Hard Reset to Resolve Hardware and Software Issues
    Kind Regards,
    Dragon-Fur

Maybe you are looking for

  • OL 2003 crashing on open data file

    Hi When I try to open a pst file in OL2003 on Win 7 the OL crashes. I have repaired the PST with scanpst, have done a detect and repair, and have tried safe mode but had no luck. How can I open the data file please? The data file opens fine in OL2010

  • REPORT A PROBLEM link does not work

    I received an email with an invoice for a purchase of 5 apps that I DID NOT PURCHASE. IT'S ALL IN CHINESE AND I DON'T EVEN KNOW HOW TO READ CHINESE. After following a tutorial on how to report a problem, i clicked on that link 'report a problem' next

  • Unable to place jpg then Missing PDF Plugins Format.aip

    Something happened suddenly, everything was fine this morning. I opened a new file...Then I tried to place a jpg and it wouldn't allow me. I started getting some missing plugin errors, tried to relaunch illustrator and I cannot. I get the Missing Req

  • 802.1x bypassed?

    Hi everybody. I have  a question on 802.1x. h1-----------hub---------f1/1-SW-------Radius server.                      |                      h2 h1 is a legitimate user while h2 is not.  h1 powers up while h2 is off.  h1 uses 802.1x and gets authenti

  • Flash CS3 quitting on editing from Dreamweaver

    > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3265632891_1555756 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: 8bit Hi When I