War file under tomcat/webapps (newbie)

Quick question:
I have a file myPrj.war and I place it under tomcat/webapps. I realize that tomcat creates a folder myPrj and I can run my application on the browser (so far so good). my question is this: say I made a revision to my application (therefore I have a new myPrj.war file) and I place the newly myPrj.jar on under the tomcat/webapps. Does tomcat 'know' that he should disregard the 'old' folder myPrj and create a new one (since there's a new myPrj.war)???
thanks

Generally speaking, If you replaced your java code or tag lib in jsp, you need to restart tomcat, otherwise, if you just made some changes to the basic html, you don't have to do so.

Similar Messages

  • Deploying WAR files in Tomcat

    I placed cdmanagersample.war file under c:/tomcat5.0/webapps directory and restarted Tomcat. Then I went to web browser and typed http://127.0.0.1/cdmanagersample. I get the following error.
    HTTP Status 404 - /cdmanagerSample
    Shouldn't Tomcat extract the war file and deploy it as it should. Any reason why it didn't?

    Here's my server.xml file now:
    <!--
    Context fragment for deploying cdManagerSample.war
    -->
    <Context path="/cdmanagersample " docBase="../webapps/cdmanagersample " debug="0" reloadable="true" >
    <!-- <Context path="/cdManagersample" docBase="../webapps/cdManagerSample.war"
    debug="0" privileged="true"> --->
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
    resourceName="UserDatabase"/>
    </Context>
    When I try strating Tomcat by saing catalina run, I get following:
    C:\Program Files\Apache Software Foundation\Tomcat 5.0>cd bin
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin>catalina run
    Using CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 5.0
    Using CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 5.0
    Using CATALINA_TMPDIR: C:\Program Files\Apache Software Foundation\Tomcat 5.0\
    mp
    Using JAVA_HOME: C:\j2sdk1.4.2_03
    Jan 28, 2004 11:21:52 AM org.apache.coyote.http11.Http11Protocol init
    SEVERE: Error initializing endpoint
    java.net.BindException: Address already in use: JVM_Bind:8080
    at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndp
    nt.java:302)
    at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:18
    at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnecto
    java:1366)
    at org.apache.catalina.core.StandardService.initialize(StandardService
    ava:633)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.j
    a:2413)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:532)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:553)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:397)
    Jan 28, 2004 11:21:52 AM org.apache.catalina.startup.Catalina load
    SEVERE: Catalina.start
    LifecycleException: Protocol handler initialization failed: java.net.BindExce
    ion: Address already in use: JVM_Bind:8080
    at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnecto
    java:1368)
    at org.apache.catalina.core.StandardService.initialize(StandardService
    ava:633)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.j
    a:2413)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:532)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:553)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:397)
    Jan 28, 2004 11:21:52 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2453 ms
    Jan 28, 2004 11:21:53 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 28, 2004 11:21:53 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.16
    Jan 28, 2004 11:21:53 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jan 28, 2004 11:21:53 AM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    Jan 28, 2004 11:21:53 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Program Files\Apache S
    tware Foundation\Tomcat 5.0\conf\Catalina\localhost\admin.xml
    Jan 28, 2004 11:21:54 AM org.apache.struts.util.PropertyMessageResources <init
    INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=t
    e
    Jan 28, 2004 11:21:54 AM org.apache.struts.util.PropertyMessageResources <init
    INFO: Initializing, config='org.apache.struts.action.ActionResources', returnN
    l=true
    Jan 28, 2004 11:21:55 AM org.apache.struts.util.PropertyMessageResources <init
    INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', ret
    nNull=true
    Jan 28, 2004 11:21:58 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Program Files\Apache S
    tware Foundation\Tomcat 5.0\conf\Catalina\localhost\balancer.xml
    Jan 28, 2004 11:21:59 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Program Files\Apache S
    tware Foundation\Tomcat 5.0\conf\Catalina\localhost\manager.xml
    Jan 28, 2004 11:21:59 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /cdmanagersample from URL fil
    C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/cdmanagersample
    Jan 28, 2004 11:22:00 AM org.apache.struts.util.PropertyMessageResources <init
    INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=t
    e
    Jan 28, 2004 11:22:00 AM org.apache.struts.util.PropertyMessageResources <init
    INFO: Initializing, config='org.apache.struts.action.ActionResources', returnN
    l=true
    Jan 28, 2004 11:22:00 AM org.apache.struts.util.PropertyMessageResources <init
    INFO: Initializing, config='cdmanager.ApplicationResources', returnNull=true
    Jan 28, 2004 11:22:00 AM org.apache.struts.action.ActionServlet initApplicatio
    ataSources
    SEVERE: Initializing application data source org.apache.struts.action.DATA_SOU
    E
    java.sql.SQLException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataS
    rce.java:529)
    at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSourc
    java:381)
    at org.apache.struts.util.GenericDataSource.setLogWriter(GenericDataSo
    ce.java:345)
    at org.apache.struts.action.ActionServlet.initApplicationDataSources(A
    ionServlet.java:942)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:457)
    at javax.servlet.GenericServlet.init(GenericServlet.java:256)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrappe
    java:1044)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:
    7)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardCont
    t.java:3948)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java
    271)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBa
    .java:866)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
    0)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:63
    at org.apache.catalina.core.StandardHostDeployer.install(StandardHostD
    loyer.java:316)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:859
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:6
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:4
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1002)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.ja
    :393)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecy
    eSupport.java:166)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:113
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:816)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:112
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:5
    at org.apache.catalina.core.StandardService.start(StandardService.java
    19)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
    Jan 28, 2004 11:22:00 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /jsp-examples from URL file:C
    Program Files\Apache Software Foundation\Tomcat 5.0\webapps\jsp-examples
    Jan 28, 2004 11:22:01 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path from URL file:C:\Program Fil
    \Apache Software Foundation\Tomcat 5.0\webapps\ROOT
    Jan 28, 2004 11:22:01 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /servlets-examples from URL f
    e:C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\servlets-exam
    es
    Jan 28, 2004 11:22:01 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /tomcat-docs from URL file:C:
    rogram Files\Apache Software Foundation\Tomcat 5.0\webapps\tomcat-docs
    Jan 28, 2004 11:22:01 AM org.apache.coyote.http11.Http11Protocol start
    SEVERE: Error starting endpoint
    java.net.BindException: Address already in use: JVM_Bind:8080
    at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndp
    nt.java:302)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEnd
    int.java:319)
    at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:2
    at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.jav
    1436)
    at org.apache.catalina.core.StandardService.start(StandardService.java
    28)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
    Jan 28, 2004 11:22:01 AM org.apache.catalina.startup.Catalina start
    SEVERE: Catalina.start:
    LifecycleException: Protocol handler start failed: java.net.BindException: Ad
    ess already in use: JVM_Bind:8080
    at org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.jav
    1438)
    at org.apache.catalina.core.StandardService.start(StandardService.java
    28)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:2
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
    Jan 28, 2004 11:22:01 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 9224 ms
    StandardServer.await: create[8005]: java.net.BindException: Address already in
    se: JVM_Bind
    java.net.BindException: Address already in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
    at java.net.ServerSocket.bind(ServerSocket.java:318)
    at java.net.ServerSocket.<init>(ServerSocket.java:185)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:5
    at org.apache.catalina.startup.Catalina.await(Catalina.java:637)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:599)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
    Jan 28, 2004 11:22:01 AM org.apache.catalina.core.StandardService stop
    INFO: Stopping service Catalina
    Jan 28, 2004 11:22:01 AM org.apache.coyote.http11.Http11Protocol destroy
    INFO: Stoping http11 protocol on 8080 Catalina:type=ThreadPool,name=http8080
    Jan 28, 2004 11:22:01 AM org.apache.coyote.tomcat5.CoyoteConnector stop
    SEVERE: Coyote connector has not been started
    Jan 28, 2004 11:22:01 AM org.apache.catalina.core.StandardHostDeployer remove
    INFO: Removing web application at context path /admin
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin>

  • 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

  • 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

  • Plz...  How to Create .war file in tomcat 5.0

    plz...
    i want clear steps to create .war file
    for jsp or servlet in tomcat 5.0.
    yours
    vijay

    Here is the sample script, U can use this script to build war file:
    Change the following before running the script:
    WebAppDir path to the Tomcat webapps directory
    AppsName value to ur Project Name ie Ajax to diff name.
    basedir - Give webapps dir of ur src files.
    <project default="build" basedir=".">
    <target name="build">
    <tstamp/>
         <property name="WebAppsDir" value="c:\Tomcat\webapps"/>
    <property name="AppsName" value="Ajax"/>
         <delete dir="${WebAppsDir}\${AppsName}"/>
    <delete file="${WebAppsDir}\${AppsName}.war"/>
    <jar jarfile="${WebAppsDir}/${AppsName}.war"
              basedir="D:\eclipse\AjaxEx\webapps"
    includes="**" />
    </target>
    </project>
    Once you run this file. It will create war file in the webapps dir of ur tomcat.
    Bye,
    Vinay

  • 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

  • Deploy war file to Tomcat

    Hi all,
    i have this problem:
    i've created a web application with Sun Studio Creator 2 with connectione to DB Oracle 10.1.3
    i've exported war file to deploy it under Tomcat but when i try to lunch the application i get the following error:
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
         com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:316)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)Could you help me plese?
    Thank's,
    Ciro.

    hi Ciro,
    You have not created the context of your database in context.xml of your tomat (path for context.xml tomcat folder/conf/context.xml)
    Unless and until you don't create context you will get same error.
    regards,
    Joshmachine
    Edited by: joshmachine on Mar 27, 2008 3:46 PM

  • Error while deploying WAR file in TOMCAT

    hi.
    I have put my SEA.WAR (test WAR file) into /webapps of TOMCAT.
    I checked the server.xml and put:
         <Context path="/SEA" docBase="SEA" debug="0"/>
    I restarted TOMCAT and tried to execute the file:
         http://localhost:8080/SEA/index.jsp
    But I got error message:
    Apache Tomcat/4.0.3 - HTTP Status 404 - /SEA/index.jsp
    What was happenning?
    Anyone can help me?
    Thank you.

    what happens when you just hit http://localhost:8080/SEA/ ?

  • 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

  • Deploying war file on Tomcat: file path problem

    Hello all,
    i am using my eclipse ide for automatically deploy my webapplication to Tomcat. For Database connectivity i configured hibernate. To configure hibernate i am using the following code:
    package de.wfm.hibernate.hibernateUtil;
    import org.hibernate.HibernateException;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;
    public class ESDBFactory {
         private static SessionFactory sf;
         private static Session session = null;
         private static String pathToCfgFile = "de\\"
                             + "wfm\\hibernate\\hibernateUtil\\esdb.cfg.xml";
         public static synchronized Session getSession() throws HibernateException {
              if (session==null) {
                   if (sf==null) {
                        sf = new Configuration()
                             .configure(pathToCfgFile).
                             buildSessionFactory();
              session = sf.openSession();
              return session;
    }When i use this in the ide all is fine. But when i export my application to a war file and deploy it on Tomcat i got the exception:
    2006-07-28 10:06:10 StandardWrapperValve[Urlaubsplanung Servlet]: Servlet.service() for servlet Urlaubsplanung Servlet threw exception
    javax.faces.FacesException: #{User.doLogin}: javax.faces.el.EvaluationException: org.hibernate.HibernateException: de\wfm\hibernate\hibernateUtil\esdb.cfg.xml not foundHow to avoid this? What do i have to do to set the file path correctly?
    Regards,
    ak

    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

  • JDeveloper Deployment of WAR Files to Tomcat

    Hello
    I'm new to learning JSP development, using JDeveloper (10.1.3) and Tomcat(5.5)/Jakarta ISAPI Redirector (1.2.14) on top of IIS. I'm just starting to get the hang of web applications and directory structures. So far I've been manually copying my classes and HTML/JSP files from development to deployment directories but now I want to use the JDeveloper IDE to manage my files and deploy them as my projects get more complex. I have a problem that I'm pulling my hair out about: When I deploy my application using JDeveloper via a WAR archive none of my JSP or HTML pages get served to my browser correctly. For example, a simple "hello world" page will not display anything in my browser. A check of the source code of the web page yields an empty document. This is the case for both HTML and JSP pages. The odd thing is that servlets work. If I type a URL to a servlet inside my application, it works fine. Now if I delete the WAR file and the deployment directory and copy the application files over manually, everything works as expected in the web browser. The culprit (I think) is the WEB-INF\web.xml file. In my manual copy process, I do not have a web.xml file. The text I'm studying from says I don't need it for the simple apps I've done so far. However, JDeveloper requires one for deployment and since I don't know what to put in it, I leave the default contents alone. So my question is: What do I need to do to the WEB-INF\web.xml file to make sure deployed-from-JDeveloper application is able to process HTML and JSP pages? A second question would be: Is there a way to configure JDeveloper such that I don't have to have a web.xml file?
    Thanks.

    You need to access your .jsp pages using the ADF Faces filter, for example:
    http://localhost/dev/faces/default.jsp
    The "/faces" part of the URL tells Tomcat to use the ADF faces filter you installed to process the page. You can specify the name of the filter in the web.xml file along with other data such as security constraints. I can't recall for sure, but I thought JDev set up the base web.xml for you including the ADF Filter lines as part of the install.
    Below is a sample web.xml I use for Tomcat 5.5.9 (note on the cpxfilename context-param you would need to specify your jdev app name.) Hope this helps.
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>YourDomain.com</description>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>oracle.adf.view.faces.CLIENT_STATE_METHOD</param-name>
    <param-value>all</param-value>
    </context-param>
    <context-param>
    <param-name>CpxFileName</param-name>
    <param-value>com.yourappname.view.DataBindings</param-value>
    </context-param>
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    </filter>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>resources</servlet-name>
    <url-pattern>/adf/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>10</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <!-- Define Security Constraints on this Application -->
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Admin-Access</web-resource-name>
    <url-pattern>/Admin/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>admin</role-name>
    </auth-constraint>
    </security-constraint>
    <!-- Define the Login Configuration for this Application -->
    <login-config>
    <auth-method>DIGEST</auth-method>
    <realm-name>AppAdmin</realm-name>
    </login-config>
    <!-- Security roles referenced by this web application -->
    <security-role>
    <description>
    Role to access admin pages
    </description>
    <role-name>admin</role-name>
    </security-role>
    </web-app>

  • Upload a WAR file in Tomcat 4.1.18.Please help

    Hello there
    i have installed Jakarta 4.1.18 and after installing this,
    I am saying http://localhost:8080 and there is the admin
    screen.
    How do I upload the WAR URL?
    I am shown 3 options
    Path : Config URL: WAR URL : [Intall button]
    does any one know this?

    war files are the zip files with war extention..
    and has all dir structure build inside i.e.
    WEB-INF/classes
    WEB-INF/web.xml
    WEB-INF/lib
    etc.
    I'm puting this details here cause I'm bit confuse after reading ur details ...
    U are saying
    "c:>SymbianTest
    which contains the Wap.war
    Folder WEB-INF under SymbianTest
    which has the web.xml file "
    well if ur war file is right build ...u can use 'upload war file'utility of tomcat manager.
    Browse ur war file and then click install..
    Tomcat will extract the war file and will install the application under wabapps dir of tomcat...
    Try it

  • Error Starting Coherence 3.6.1 packed in War File From Tomcat 6.0.26

    Hi All,
    I have been receiving the following error when trying to startup coherence from within a War file:
    INFO: Deploying configuration descriptor services#test#processor#v1.xml
    java.net.MalformedURLException: no !/ in spec
         at java.net.URL.<init>(URL.java:601)
         at java.net.URL.<init>(URL.java:464)
         at java.net.URL.<init>(URL.java:413)
         at com.tangosol.coherence.component.application.console.Coherence._initStatic(Coherence.CDB:25)
         at com.tangosol.coherence.component.application.console.Coherence.<clinit>(Coherence.CDB:27)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at com.tangosol.net.CacheFactory.<clinit>(CacheFactory.java:1496)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
         at org.springframework.beans.factory.config.MethodInvokingFactoryBean.doInvoke(MethodInvokingFactoryBean.java:160)
         at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:150)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
         at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
         at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
         at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
         at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:519)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    Oracle Coherence: The Manifest is corrupted or inaccessible; some functionality may be disabledI can startup coherence manually via the console tools but can't get by this error when starting from within tomcat 6.0.26. However, the functionality of Coherence seems normal except the logging is missing the information contained within the Manifest. I have edited the Manifest manually, replaced it with one from 3.5.3, but nothing seems to work.
    Any help is much appreciated.
    Thanks.
    Joe

    Hello,
    I took the following steps to attempt to reproduce this:
    I created a JSP as such:
    <html>
    <%@ page import="com.tangosol.net.*"%>
    <body >
    <%!
    NamedCache cache = CacheFactory.getCache("test");
    %>
    <tt>
    Got NamedCache: <%=cache.toString()%>
    </tt>
    </body>
    </html>I called it index.jsp and placed it in the root directory of a WAR file. In the WAR file I created WEB-INF/lib/coherence.jar. When I deploy this, everything works fine. Can you try this in your Tomcat setup and see if it works for you?
    Thanks,
    Patrick
    Edited by: pperalta on Mar 14, 2011 1:52 PM

  • How to deploy WAR file in tomcat.?

    Can anybody please provide step by step information of deploying war file to Jakarta tomcat without IDE.
    I am working on Windows XP with jakarta tomcat 4.1.30.
    Thanks in advance.
    Regards,
    Aman Aggarwal

    See if tomcat runs as a service in your operating system. If you can locate it, you can set the start type to automatic. A very crud way is to run the tomcat startup file from autoexe.bat.
    I don't know how to do this in Linux. Here is a link for tomcat 6. Maybe it is the same in tomcat 4
    [http://tomcat.apache.org/tomcat-6.0-doc/setup.html]
    Edited by: nirvan on Dec 29, 2008 9:15 AM

  • Redeploying a war file in tomcat 6.0.16 Options

    Hi All,
    Tomcat is undeployed the application and trying to deploy the new war file.
    But tomcat did not able to redeploy the war file and no errors in to log file also.
    I am using tomcat 6.0.16. Msg in the log file is as follows
    INFO: Undeploying context [evpn]
    Nov 17, 2008 3:21:21 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive evpn.war
    Nov 17, 2008 3:22:59 PM org.apache.catalina.core.StandardService stop
    INFO: Stopping service Catalina
    Nov 17, 2008 3:23:00 PM org.apache.catalina.core.StandardContext stop
    INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].
    [localhost].[examples] has not been started
    Nov 17, 2008 3:23:00 PM org.apache.coyote.http11.Http11Protocol destroy
    INFO: Stopping Coyote HTTP/1.1 on http-8080
    your help values more to me.
    Thanq very much..............

    Hi all,
    I don't want to restart the tomcat to redeploy this war file.
    Plz help me out ......

Maybe you are looking for

  • ITunes Match won't get past Step 1

    Hi, I know a lot of people are having trouble with getting past Step 2 at the moment in iTunes Match, but I was just wondering if anyone else was having troubles getting past Step 1? Last night, even just trying to match one song, I was stuck at Step

  • Can Apple TV be plugged into 220v? Or do I need a converter?

    Can Apple TV be plugged into 220v? Or do I need a converter?

  • Truncate table related questions

    Hi Folks, Environment: 10g Rel 2 I am trying to prove the following two points by way of experimentation a, The truncate table operation will reset the high water mark (HWM) to the first usable data block in the table segment # Take a HWM snap shot b

  • Viewing multiple application windows simultaneously

    Is it possible to view (float) multiple application windows simultaneously on a MacBook. For example, I am viewing a tutorial on Firefox while working on an image in Photoshop at the same time to try out the suggestions in the tutorial. I have to shi

  • How to play a beep  when  a SMS is received ?

    hi.. friends. When a sms is received application is walked up automatically. but no beep is played in some phones ie. sony ericsson w350i, nokia N70, N71, N72 as i am tested it. how to generate a sound or beep when a sms is received. sound should be