Cannot make .war file using tomcat with eclipse and ant

i have made all necesary configuration for deploying application using eclipse and ant for the tomcat server.
when i start the server by clicking the tomcat icon on eclipse toolbar, the message is prompted that "missing application web.xml and using defaults". i have placed the web.xml file in the web/WEB-INF directory of the source project directory.
also when i use ant by right-clicking on the build.xml file and choose Run as ant.. the process creates a desired .war file in webapps folder of the tomcat server but that war file does not works.
where is the error i cannot figure out.
am attaching the code of build.xml for reference.
please help.
build.xml:-
<project name="BecilCTI" default="compile" basedir=".">
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<property name="app.name" value="BecilCTI"/>
<property name="app.path" value="/${app.name}"/>
<property name="app.version" value="0.1-dev"/>
<property name="build.home" value="${basedir}/build"/>
<property name="catalina.home" value="c:/Tomcat_5.5"/> <!-- UPDATE THIS! -->
<property name="dist.home" value="${basedir}/dist"/>
<property name="docs.home" value="${basedir}/docs"/>
<property name="manager.url" value="http://localhost:8080/manager"/>
<property name="src.home" value="${basedir}/src"/>
<property name="web.home" value="${basedir}/web"/>
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<!--<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>-->
<path id="compile.classpath">
<!-- Include all elements that Tomcat exposes to applications -->
<pathelement location="${catalina.home}/common/classes"/>
<fileset dir="${catalina.home}/common/endorsed">
<include name="*.jar"/>
</fileset>
<fileset dir="${catalina.home}/common/lib">
<include name="*.jar"/>
</fileset>
<pathelement location="${catalina.home}/shared/classes"/>
<fileset dir="${catalina.home}/shared/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="all" depends="clean,compile"
description="Clean build and dist directories, then compile"/>
<target name="clean"
description="Delete old build and dist directories">
     <echo message="Cleaning all dirs."/>
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<target name="compile" depends="prepare"
description="Compile Java sources">
<!-- Compile Java classes as necessary -->
<mkdir dir="${build.home}/WEB-INF/classes"/>
<javac srcdir="${src.home}"
destdir="${build.home}/WEB-INF/classes"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}">
<classpath refid="compile.classpath"/>
</javac>
<!-- Copy application resources -->
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="${src.home}" excludes="**/*.java"/>
</copy>
</target>
<target name="dist" depends="compile"
description="Create binary distribution">
<!-- Copy documentation subdirectories
<mkdir dir="${dist.home}/docs"/>
<copy todir="${dist.home}/docs">
<fileset dir="${docs.home}"/>
</copy> -->
<!-- Create application JAR file -->
<jar jarfile="${catalina.home}/webapps/${app.name}.war"
basedir="${build.home}"/>
<!-- Copy additional files to ${dist.home} as necessary -->
</target>
<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>
<target name="list"
description="List installed applications on servlet container">
<list url="${manager.url}"
username="${manager.username}"
password="${manager.password}"/>
</target>
<target name="prepare">
<!-- Create build directories as needed -->
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/WEB-INF"/>
<mkdir dir="${build.home}/WEB-INF/classes"/>
<!-- Copy static content of this web application -->
<copy todir="${build.home}">
<fileset dir="${web.home}"/>
</copy>
<mkdir dir="${build.home}/WEB-INF/lib"/>
</target>
<target name="reload" depends="compile"
description="Reload application on servlet container">
<reload url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"/>
</target>
<target name="remove"
description="Remove application on servlet container">
<undeploy url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"/>
</target>
</project>

So is context.xml actually overwriting the settings found in server.xml?I think so. The way I understand it is the the context.xml file saves you from having to edit server.xml. It is preferred for each web app to do its own config, rather than lumping them all together in server.xml.
And what would be the best way to create the war file? IAt its heart, a WAR is just a zip file with its contents laid out in according to the specification of a web application directory structure.
So the simplest way to make a war file is to zip up your directory structure with a tool like winzip, and rename it to be myApp.war.
Regarding ant, I would recommend you take a look through [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
]this tutorial. It explains the basics of website layout, configuration and deployment.
On [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/source.html] this page  in particular, it includes a link to a basic ant file that you can use as a starting point.
Cheers,
evnafets

Similar Messages

  • I was given an assingment, but have no idea where to begin. The assingment is to create a text file using notepad with all of my digital inputs and some how make those imputs show up on my digital indicators on my control pannel

    I was given an assingment, but have no idea where to begin. The assingment is to create a text file using notepad with all of my digital inputs and some how make those imputs show up on my digital indicators on my control pannel.
    When it was explained to me it didn't sound to hard of a task, I have no LabVIEW experience and the tutortial sucks.

    StevenD: FYI, I did NOT give you the one star rating. I would never do that!
    StevenD wrote:
    Ow. Someone is grumpy today.
    Well, this is an assignment, so it is probably homework.
    Why else would anyone give HIM such an assigment, after all he has no LabVIEW experience and the tutorials are too hard for him?
    This would make no sense unless all of it was just covered in class!
    This is not a free homework service with instant gratification.
    OK! Let's do it step by step. I assume you already have a VI with the digital indicators.
    "...but have no idea where to begin".
    open notepad.
    decide on a format, possibly one line per indicator.
    type the document.
    close notepad.
    open LabVIEW.
    Open the existing VI with all the indicators.
    (are you still following?)
    look at the diagram.
    Who made the program?
    Does the code make sense so far?
    Is it a statemachine or just a bunch of crisscrossed wires?
    Where do you want to add the file read?
    How should the file be read (after pressing a read button, at the start of the program ,etc.)
    See how far you get!
    Message Edited by altenbach on 06-24-2008 11:23 AM
    LabVIEW Champion . Do more with less code and in less time .

  • Cannot redploy WAR files on Oracle 10g Application Server 9.0.4

    Hello,
    I may be missing something obvious, but how do I redploy .WAR files using the 10g Enterprise Manager? It has an option to Deploy WAR files, but not Redeploy them.
    If this is not possible, could someone tell me how to create an EAR file manually from the command line, or point to a URL with some instructions? I do not always have access to a GUI when creating the .WAR files, so I cannot use JDeveloper nor X-WIndow based UNIX applications.
    Thanks for any advice you can offer.

    Just use the same "Deploy" option. If there is a previous deployment, It will be automatically removed. In another word, the "Deploy" option is also the "Redeploy" option. Isn't it simple? The same can be said with an EAR file.

  • Error while deploying war file using JRUN JMC

    Hi,
    I am getting "Deployment service failed to deploy war file" Error
    while trying to deploy a war file using JRUN Mgmt console.
    If anyone has any idea about it, please help.
    Thanks
    Jit

    Check the logs. There might be a detailed exception in it. My guess is that it might have something to do with the deployment descriptors.
    If you could post the deployment descriptors and the exception stack trace, it would be easier to figure out.

  • I upgraded to mavericks and I cannot make text or images bigger with the trackpad. It only zooms in the document. How to change that?

    I upgraded to mavericks and I cannot make text or images bigger with the trackpad. It only zooms in the document. How to change that?

    Hi Rohit,
    If you have questions about the Accessibility features of Mavericks, you may find the following article helpful:
    OS X Mavericks: Use accessibility features
    http://support.apple.com/kb/PH14322
    Regards,
    - Brenden

  • Deployment of .war file using JMX in jboss 4.0.5 GA

    Hi,
    Can anyone help me out in the steps of deployment of .war file using JMX in JBOSS 4.0.5 server.I went through the documentation in jboss.org but couldn't find a suitable one though there were many.Any links/url that you know about the deployment process will also be helpful to me.
    Thanks

    You're probably using an older version of JavaMail where there was a bug in the example
    DummySSLSocketFactory. Download the latest version and the example is correct.
    Also, if you're using DummySSLSocketFactory just to control which servers you trust,
    JavaMail 1.4.3 has some properties that will make this easier for you and avoid the need
    for DummySSLSocketFactory. In particular, see the mail.imaps.ssl.trust property.

  • Problem regarding running war file in Tomcat 4.1

    i uploaded a war file in Tomcat application manager..
    Running status of application is false ...
    By pressing START in COMMANDS still it shows false in RUNNING ..
    i got error
    FAIL - Application at context path /kannan could not be started...........

    hi
    restart your system and again you deploy in tomcat manager,
    or
    better you place your .war file under webapps and restart ur tomcat server once again ..
    after u c one folder create with ur war file name,
    after u go and access
    thats it..
    i hope it will helps u

  • Deploying .war file on Tomcat 4.1?

    Hi,
    I would like to know whether anyone know how to deploy a .war file onto Tomcat 4.1? Or can this be done?
    And what about web.xml? Is it different from a web.xml written for BEA's Weblogic Server?
    Thanks

    hmm.. ic
    The .war file when drop in the webapps dir and u restart tomcat, it auto create a dir with your .war filename and the content of .war file is copied to there.
    Am i rite to say so?
    And wat about the web.xml?
    If i need to add users and password how can I accomplished it in tomcat web.xml?
    Last but not least, thanks for taking the time to reply. :D

  • An issue of deploying war file on tomcat 5.5

    Hi,
    I know the regular process to deply a war file is like this - stop tomcat server, remove your previous war file and directory, say abc.war and dir abc, copy your new version abc.war into webapps and restart tomcat server.
    However, I found an interesting issue today - I was deploying a new release war file as described. While I stopped tomcat, removed all previous version direcotry, and restarted tomcat server, I got an http 404 error saying that the resource /abc/ is not available. I noticed that the org folder was not generated at work/Catalina/locahost/abc.
    I stuck there for a long time to try to fix but did not find a solution. I am pretty sure the war file should be ok since it works fine on my local machine. This only happened in the unix box. Later, occasionally, I removed the director abc without stopping the tomcat server. In another word, I removed the war file while tomcat is still running. A new abc directory was created soon and now it works.
    Anyone has any idea about that? Thanks!
    Michael

    Any thoughts? Thanks

  • Can we use RoboHelp with Eclipse as version control?

    Im am using RoboHelp 7 in the Tech Comm Suite in a Windows XP environment.
    I see a lot of information on using RoboSource as versionn control, but I'm not seeing a lot of information on other third-pary version control software.  I did see one posting that suggested that if you are planning to use third-party software, you should uninstall RoboSource first.  I can't seem to figure out the following:
    How do you determine if your version control (Eclipse) supports Microsoft SCC API?
    How do you get RH to recognize Eclipse? Even though I uninstalled RoboSource Control 3, it still shows up in the Select Version Control Provider
    Are there step-by-step instructions anywhere that show how to get RoboHelp to recognize third-party software?
    As always, thanks for your assistance.

    Colum,
    Thanks for recommending that I visit Peter's web site.  It has a great page on Eclipse.  Wish I had read it before I was shoved kicking and screaming into using it.  However, it did stop short of providing me with information to troubleshoot the problems I'm having with Eclipse and RH 7.  I sent him an e-mail from the site and hope that he will be able to answer it.

  • Cannot print pdf file using windows 7 64 bit and trial acrobat X

    cannot print pdf files using trial version of Acrobat X and windows 7 64 bit prints all other files no problem.
    I've done some searching but can't find anything that helps
    Thanks for any help
    Kim

    I fixed this problem. I had to turn off the browser virtualization feature in Zone Alarm Extreme Security. This wiped out all of the Firefox settings, but I had bookmarks, etc. backed up. (answered by original poster)

  • How to make pdf file auto open with adobe reader after downloaded

    how to make pdf file auto open with adobe reader after downloaded

    I note from your system details that you have the plugin for adobe pdf s so I would have expected the files should open in firefox '''without''' you needing to explicitly download them.
    Once the files are open in firefox, you will also get the option to save them permanently to a location on your computer. If you wish I suppose you could set the file type pdf to be associated with and be opened by firefox instead of with the Adobe Acrobat Reader, but that would just seem to be an additional complexity.

  • After last Moutain Lion update, suddenly and sporadically I cannot move my files using my mouse.  I only get a "ghost" image.  Moving items to the trash is, of course no problem.  Does anyone have a solution?  I've updated my permissions...no go!

    Cannot move icon files using my mouse or cursor after installing Mountion Lion's last update.  After rebooting several times, this sometimes fixes the problem.  I've tried checking and updating my permissions, but this hasn't worked.  What's happening?  I haven't backed up so I can't go back to Lion.  Has this happened to anyone else?  What can I try?  Thanks!

    Try this:
    Repair the Hard Drive and Permissions - Lion/Mountain Lion
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu. Select Restart from the Apple menu.
    Now download and install OS X Mountain Lion Update v10.8.3 (Combo).

  • Using Suri asking any localised question in the UK, it responds with 'cannot help' can only use US locations etc. and in US English. Have I missed something or set something up incorrectly? I also thought it would interface with your Facebook but it just

    Using Suri asking any localised question in the UK, it responds with 'cannot help' can only use US locations etc. and in US English. Have I missed something or set something up incorrectly? I also thought it would interface with your Facebook but it just comes back with a 'I can't help you with Facebook' message

    Yeah, Siri - a headline feature on the iPhone 4s page - is beta at the mo.
    But then anyone who's used Macs for a few years will know that most new software is pretty much still in beta when it's released anyway. Only Apple could get away with it and retain customers

  • Hello, I'm using ubuntu with firefox5 and can not find the option to import my bookmarks file backup

    Hello, I'm using ubuntu with firefox5 and can not find the option to import my bookmarks file backup

    Is that Ubuntu 11.04?
    Ubuntu 11.04 displays window menus in the control bar at the top of the screen<br />
    Click on Bookmarks/Show All Bookmarks then move your mouse to the left upper corner toward Firefox Web Browser.<br />
    You'll get pop up menu (Organize, Views and Import and Backup).<br />

Maybe you are looking for

  • Where can I download the application "Address Book" for OS 10.3.9

    Some how or another my address book got dumped off my desktop and now I cannot get it back. It will open using my email account but that does not show the mailing address on other info. I tried using backup which had been uploaded to my idisk to "res

  • My itunes wont open up on my pc.

    Itunes wont open up on my pc. It has worked fine for several years. When i try to open it, it says to reinstall itunes. I am afraid I will lose all music if I do this

  • Issue with a work order

    Hi Team, I am having an issue with the work order having multiple line items for the same component. Out of all line items it is showing error for two line items mentioning, No status object available for CMP 81411471 0160 0110 Double clicked on it m

  • Jco.webas.ignore_jdsr_error=1 in the sender side RFC adapter of RFC to SOAP scenario

    Hello Team, I am doing RFC to SOAP scenario after configuring the scenario i have checked the sender side communication channel it is not throughing any errors and it shows the status as green but it is displaying a short message it is the short log

  • Exchange 2010 cross subnet Dag - Errors creating DB copies in DR site

    We are running exchange 2010 standard edition in our main site with 2 mailbox servers in a DAG. I've added 2 more mailbox servers in a DR site connecting over a 20Mb fiber connection. I've tried adding one of the DR mailbox servers over to the DAG as