App.xml in Tomcat 5.0

Hi,
I am trying to auto extract the war file in Tomcat if war file is loaded other than webapps directory.
I created app.xml in ${catalina.home}/conf . Here is my app.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<webapps>
<context>
<path>"/VApp"</path>
<docBase>="${catalina.home}/webapps/VApp"</docBase>
<debug>"0"</debug>
<reloadable>"true"</reloadable>
<trused>"true"</trusted>
</context>
</webapps>
My war file is under ${catalina.home}/webapps/VApp/ .
When I start and stop my Tomcat, Tomcat is not automatically deploying my setup.war file . I am not sure what I am doing wrong.
Thanks,
BPradhan123

I'm not 100% certain what you are trying to accomplish here. There is some confusion over whether you are using the webapps directory or not. First you say the war file is loaded in a location different to the webapps directory, but it then ends up in: ${catalina.home}/webapps/VApp/
My opinion
- if you want it out of the webapps directory, take it completely out. The webapps directory is the "appBase" for Tomcat, and anything in it is intended to be a web application. So WAR files directly in it are web apps, and folders underneath it are potentially exploded web apps.
If you DO want to put the WAR in a custom location, my advice would be to put it in a completely independant place so as not to confuse the issue.
The deployment of wars is because "webapps" is the default "appBase" for Tomcat. You can modify the host config, or create a new virtual host if you want to modify/add another "appBase" directory. Then that directory would behave like webapps does, and deploy any war files in it.
I don't know of any way that a context definition can specify a WAR file to use as the web application.
cheers,
evnafets

Similar Messages

  • URgent !!!!!!!!! How do i add information to server.xml of tomcat

    Hi ,
    I want to add the conext information to my server.xml of tomcat for my hibernate configuration.....
    the conext information is as follows ....
    <Context path="/quickstart" docBase="quickstart">
    <Resource name="jdbc/quickstart" scope="Shareable" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/quickstart">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <!-- DBCP database connection settings -->
    <parameter>
    <name>url</name>
    <value>jdbc:postgresql://localhost/quickstart</value>
    </parameter>
    <parameter>
    <name>driverClassName</name><value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>quickstart</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>secret</value>
    </parameter>
    <!-- DBCP connection pooling options -->
    <parameter>
    <name>maxWait</name>
    <value>3000</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>10</value>
    </parameter>
    </ResourceParams>
    </Context>
    Where in my server.xml should i put
    the server.xml looks like this :
    <!-- Example Server Configuration File -->
    <!-- Note that component elements are nested corresponding to their
    parent-child relationships with each other -->
    <!-- A "Server" is a singleton element that represents the entire JVM,
    which may contain one or more "Service" instances. The Server
    listens for a shutdown command on the indicated port.
    Note: A "Server" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <Server port="8005" shutdown="SHUTDOWN">
    <!-- Comment these entries out to disable JMX MBeans support used for the
    administration web application -->
    <Listener className="org.apache.catalina.core.AprLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <!-- Editable user database that can also be used by
    UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved"
    factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
    pathname="conf/tomcat-users.xml" />
    </GlobalNamingResources>
    <!-- A "Service" is a collection of one or more "Connectors" that share
    a single "Container" (and therefore the web applications visible
    within that Container). Normally, that Container is an "Engine",
    but this is not required.
    Note: A "Service" is not itself a "Container", so you may not
    define subcomponents such as "Valves" or "Loggers" at this level.
    -->
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- A "Connector" represents an endpoint by which requests are received
    and responses are returned. Each Connector passes requests on to the
    associated "Container" (normally an Engine) for processing.
    By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
    You can also enable an SSL HTTP/1.1 Connector on port 8443 by
    following the instructions below and uncommenting the second Connector
    entry. SSL support requires the following steps (see the SSL Config
    HOWTO in the Tomcat 5 documentation bundle for more detailed
    instructions):
    * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
    later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
    * Execute:
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
    $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
    with a password value of "changeit" for both the certificate and
    the keystore itself.
    By default, DNS lookups are enabled when a web application calls
    request.getRemoteHost(). This can have an adverse impact on
    performance, so you can disable it by setting the
    "enableLookups" attribute to "false". When DNS lookups are disabled,
    request.getRemoteHost() will return the String version of the
    IP address of the remote client.
    -->
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
    to 0 -->
         <!-- Note : To use gzip compression you could set the following properties :
                   compression="on"
                   compressionMinSize="2048"
                   noCompressionUserAgents="gozilla, traviata"
                   compressableMimeType="text/html,text/xml"
         -->
    <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector port="8443" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" disableUploadTimeout="true"
    acceptCount="100" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS" />
    -->
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
    <!-- See proxy documentation for more information about using this. -->
    <!--
    <Connector port="8082"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" acceptCount="100" connectionTimeout="20000"
    proxyPort="80" disableUploadTimeout="true" />
    -->
    <!-- An Engine represents the entry point (within Catalina) that processes
    every request. The Engine implementation for Tomcat stand alone
    analyzes the HTTP headers included with the request, and passes them
    on to the appropriate Host (virtual host). -->
    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!-- The request dumper valve dumps useful debugging information about
    the request headers and cookies that were received, and the response
    headers and cookies that were sent, for all requests received by
    this instance of Tomcat. If you care only about requests to a
    particular virtual host, or a particular application, nest this
    element inside the corresponding <Host> or <Context> entry instead.
    For a similar mechanism that is portable to all Servlet 2.4
    containers, check out the "RequestDumperFilter" Filter in the
    example application (the source for this filter may be found in
    "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
    Request dumping is disabled by default. Uncomment the following
    element to enable it. -->
    <!--
    <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
    -->
    <!-- Because this Realm is here, an instance will be shared globally -->
    <!-- This Realm uses the UserDatabase configured in the global JNDI
    resources under the key "UserDatabase". Any edits
    that are performed against this UserDatabase are immediately
    available for use by the Realm. -->
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
    resourceName="UserDatabase"/>
    <!-- Comment out the old realm but leave here for now in case we
    need to go back quickly -->
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <!-- Replace the above Realm with one of the following to get a Realm
    stored in a database and accessed via JDBC -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="org.gjt.mm.mysql.Driver"
    connectionURL="jdbc:mysql://localhost/authority"
    connectionName="test" connectionPassword="test"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
    connectionName="scott" connectionPassword="tiger"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="sun.jdbc.odbc.JdbcOdbcDriver"
    connectionURL="jdbc:odbc:CATALINA"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    <!-- Defines a cluster for this node,
    By defining this element, means that every manager will be changed.
    So when running a cluster, only make sure that you have webapps in there
    that need to be clustered and remove the other ones.
    A cluster has the following parameters:
    className = the fully qualified name of the cluster class
    name = a descriptive name for your cluster, can be anything
    mcastAddr = the multicast address, has to be the same for all the nodes
    mcastPort = the multicast port, has to be the same for all the nodes
    mcastBindAddr = bind the multicast socket to a specific address
    mcastTTL = the multicast TTL if you want to limit your broadcast
    mcastSoTimeout = the multicast readtimeout
    mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
    mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
    tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
    tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
    in case of multiple ethernet cards.
    auto means that address becomes
    InetAddress.getLocalHost().getHostAddress()
    tcpListenPort = the tcp listen port
    tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
    has a wakup bug in java.nio. Set to 0 for no timeout
    printToScreen = true means that managers will also print to std.out
    expireSessionsOnShutdown = true means that
    useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
    false means to replicate the session after each request.
    false means that replication would work for the following piece of code: (only for SimpleTcpReplicationManager)
    <%
    HashMap map = (HashMap)session.getAttribute("map");
    map.put("key","value");
    %>
    replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
    * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
    * Synchronous means that the thread that executes the request, is also the
    thread the replicates the data to the other nodes, and will not return until all
    nodes have received the information.
    * Asynchronous means that there is a specific 'sender' thread for each cluster node,
    so the request thread will queue the replication request into a "smart" queue,
    and then return to the client.
    The "smart" queue is a queue where when a session is added to the queue, and the same session
    already exists in the queue from a previous request, that session will be replaced
    in the queue instead of replicating two requests. This almost never happens, unless there is a
    large network delay.
    -->
    <!--
    When configuring for clustering, you also add in a valve to catch all the requests
    coming in, at the end of the request, the session may or may not be replicated.
    A session is replicated if and only if all the conditions are met:
    1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
    2. a session exists (has been created)
    3. the request is not trapped by the "filter" attribute
    The filter attribute is to filter out requests that could not modify the session,
    hence we don't replicate the session after the end of this request.
    The filter is negative, ie, anything you put in the filter, you mean to filter out,
    ie, no replication will be done on requests that match one of the filters.
    The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
    filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
    ending with .gif and .js are intercepted.
    The deployer element can be used to deploy apps cluster wide.
    Currently the deployment only deploys/undeploys to working members in the cluster
    so no WARs are copied upons startup of a broken node.
    The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
    When a new war file is added the war gets deployed to the local instance,
    and then deployed to the other instances in the cluster.
    When a war file is deleted from the watchDir the war is undeployed locally
    and cluster wide
    -->
    <!--
    <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
    managerClassName="org.apache.catalina.cluster.session.DeltaManager"
    expireSessionsOnShutdown="false"
    useDirtyFlag="true"
    notifyListenersOnReplication="true">
    <Membership
    className="org.apache.catalina.cluster.mcast.McastService"
    mcastAddr="228.0.0.4"
    mcastPort="45564"
    mcastFrequency="500"
    mcastDropTime="3000"/>
    <Receiver
    className="org.apache.catalina.cluster.tcp.ReplicationListener"
    tcpListenAddress="auto"
    tcpListenPort="4001"
    tcpSelectorTimeout="100"
    tcpThreadCount="6"/>
    <Sender
    className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
    replicationMode="pooled"
    ackTimeout="15000"/>
    <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
    filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
    <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
    tempDir="/tmp/war-temp/"
    deployDir="/tmp/war-deploy/"
    watchDir="/tmp/war-listen/"
    watchEnabled="false"/>
    </Cluster>
    -->
    <!-- Normally, users must authenticate themselves to each web app
    individually. Uncomment the following entry if you would like
    a user to be authenticated the first time they encounter a
    resource protected by a security constraint, and then have that
    user identity maintained across all web applications contained
    in this virtual host. -->
    <!--
    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
    -->
    <!-- Access log processes all requests for this virtual host. By
    default, log files are created in the "logs" directory relative to
    $CATALINA_HOME. If you wish, you can specify a different
    directory with the "directory" attribute. Specify either a relative
    (to $CATALINA_HOME) or absolute path to the desired directory.
    -->
    <!--
    <Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="logs" prefix="localhost_access_log." suffix=".txt"
    pattern="common" resolveHosts="false"/>
    -->
    <!-- Access log processes all requests for this virtual host. By
    default, log files are created in the "logs" directory relative to
    $CATALINA_HOME. If you wish, you can specify a different
    directory with the "directory" attribute. Specify either a relative
    (to $CATALINA_HOME) or absolute path to the desired directory.
    This access log implementation is optimized for maximum performance,
    but is hardcoded to support only the "common" and "combined" patterns.
    -->
    <!--
    <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
    directory="logs" prefix="localhost_access_log." suffix=".txt"
    pattern="common" resolveHosts="false"/>
    -->
    </Host>
    </Engine>
    </Service>
    </Server>
    Can Some one Help me pleaseeeeee

    Please don't cross-post in multiple forums. I have answered
    this in your other thread.

  • URG !!!!!!! How do i add the conext information to my server.xml of tomcat

    Hi ,
    I want to add the conext information to my server.xml of tomcat for my hibernate configuration.....
    the conext information is as follows ....
    <Context path="/quickstart" docBase="quickstart">
    <Resource name="jdbc/quickstart" scope="Shareable" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/quickstart">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <!-- DBCP database connection settings -->
    <parameter>
    <name>url</name>
    <value>jdbc:postgresql://localhost/quickstart</value>
    </parameter>
    <parameter>
    <name>driverClassName</name><value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>quickstart</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>secret</value>
    </parameter>
    <!-- DBCP connection pooling options -->
    <parameter>
    <name>maxWait</name>
    <value>3000</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>10</value>
    </parameter>
    </ResourceParams>
    </Context>
    Where in my server.xml should i put

    I don't think you should have to edit the server.xml
    at all. your app can have its own context.xml that
    obviates the need for editing server.xml
    %I did try that in many permutations. For some reason, the server.xml worked for me in 5.5 but not the context.xml. (Granted, it was late on Friday and I might have missed a step). :^)
    - Saish

  • HTTP status 404 when accessing ADF Faces app deployed in Tomcat

    I have ADF faces app deployed to tomcat. The first time the application is accessed, the URL gets screwed up and I get HTTP 404. If I access the app again in the same browser, the page loads fine. If I clear the cookies and access it again, I get HTTP 404 again.
    The problem can be seen live here:
    1. Go to http://subash.redirectme.net:8080/stock/faces/welcome.jspx
    The url in the browser gets messed up:
    http://subash.redirectme.net:8080/stock/faces/welcome.jspxhttp://subash.redirectme.net:8080/stock/faces/;jsessionid=1A48DEA6CF208BAADCB3BE50084B1AD1?_afrLoop=1455371821548250&_afrWindowMode=0&_afrWindowId=null
    2. Go to http://subash.redirectme.net:8080/stock/faces/welcome.jspx in the same browser. The page loads up fine.
    3. Delete cookies and access the same page, the problem appears again.
    Upon digging around, I found when the browser makes first request, the servers reponds with 200 OK with jsessionID cookie header. Then the client sends requests for "http://subash.redirectme.net:8080/stock/faces/welcome.jspxhttp://subash.redirectme.net:8080/stock/faces/;jsessionid=8E31D5895621B17B712186AA8AF6BF4A?_afrLoop=1455891492432424&_afrWindowMode=0&_afrWindowId=null" and the server correctly responds with HTTP 404. Looks like some ADF issue.
    This problem was not seen in Weblogic server, but started appearing when I tested in Tomcat.
    Here is HTTP Trace:
    http://subash.redirectme.net:8080/stock/faces/welcome.jspx
    GET /stock/faces/welcome.jspx HTTP/1.1
    Host: subash.redirectme.net:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,fr-FR;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Proxy-Connection: keep-alive
    HTTP/1.x 200 OK
    Cache-Control: no-cache
    Content-Type: text/html;charset=utf-8
    Date: Tue, 09 Feb 2010 21:55:15 GMT
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Proxy-Connection: keep-alive
    Server: Apache-Coyote/1.1
    Set-Cookie: JSESSIONID=8E31D5895621B17B712186AA8AF6BF4A; Path=/stock
    Transfer-Encoding: chunked
    http://subash.redirectme.net:8080/stock/faces/welcome.jspxhttp://subash.redirectme.net:8080/stock/faces/;jsessionid=8E31D5895621B17B712186AA8AF6BF4A?_afrLoop=1455891492432424&_afrWindowMode=0&_afrWindowId=null
    GET /stock/faces/welcome.jspxhttp://subash.redirectme.net:8080/stock/faces/;jsessionid=8E31D5895621B17B712186AA8AF6BF4A?_afrLoop=1455891492432424&_afrWindowMode=0&_afrWindowId=null HTTP/1.1
    Host: subash.redirectme.net:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,fr-FR;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Proxy-Connection: keep-alive
    Referer: http://subash.redirectme.net:8080/stock/faces/welcome.jspx
    Cookie: JSESSIONID=8E31D5895621B17B712186AA8AF6BF4A
    HTTP/1.x 404 Not Found
    Content-Length: 1144
    Content-Type: text/html
    Date: Tue, 09 Feb 2010 21:55:15 GMT
    Proxy-Connection: keep-alive
    Server: Apache-Coyote/1.1
    X-Powered-By: JSF/1.2
    ----------------------------------------------------------

    Delete filter OK
    <filter>
    <filter-name>trinidad</filter-name>
    <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>trinidad</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>

  • How can I remove a file on server w/ my JSP app running on Tomcat 7 ?

    First of all, I'm posting here because I found it the closest to java web development in the forums listing.
    How can I remove a file on the server side with my JSP app running on Tomcat 7 ? I did it in a JSE app by changing permissions, but how can I do it for a simple JSP app ?
    My code is
    public static void excluirArquivos(String nomeArquivoExcluido) {
              File arquivoExcluido = new File (nomeArquivoExcluido);
              arquivoExcluido.setWritable(true, true);
              SecurityManager sm = new SecurityManager();
              try {
                   sm.checkDelete(arquivoExcluido.getAbsolutePath());
                   System.gc();
                   if (arquivoExcluido.delete()) System.out.println("File '" + nomeArquivoExcluido + "' successfully removed.");
                   else System.out.println("File '" + nomeArquivoExcluido + "' wasn't removed somehow.");
              } catch (SecurityException se) {
                   System.out.println("File '" + nomeArquivoExcluido + "' can't be excluded. There is no permissions.");
         }And it always falls on the catch statement.

    899238 wrote:
    How can I remove a file on the server side with my JSP app running on Tomcat 7 ? I did it in a JSE app by changing permissions, but how can I do it for a simple JSP app ?1. make sure that the JVM has the (filesystem) rights to be able to remove said file
    2. make sure the file is in fact not locked (for example, opened by another process)
    3. use File.delete()
    There is no guarantee that you can delete a file, you can only make an attempt. There can be any number of reasons, most if not all of them not related to code, that the deletion of a file does not work.

  • Certification expired? @ HelloWorld-app.xml in tutorial pdf

    Hi, everyone. Im just a student passed by and interesting in Flex app (however i dont have a good fundamental about web ^^")
    I tries to follow the pdf file, devappsflex.
    Using Notepad++ as texteditor and FlexSDK in Vista sp1 64bit.
    HelloWorld.mxml is compiled to HelloWorld.swf without prob.
    I create a certificate in the project directory
    adt - certificate -cn SelfSigned 1024-RSA sampleCert.pfx samplePassword
    then compiling and signing HelloWorld-app.xml as in tutorial
    adt -package -storetype pkcs12 -keystore sampleCert.pfx HelloWorld.air HelloWorld-app.xml HelloWorld.swf
    The Problem is the certification has expired even i have just create and pack in asap.
    anyone get an idea, how to solve it?

    Thank you for your answer erthy. Your response to my post really relief me that i can trust this community to help me studying Flex ^^.
    I tried that Flex Builder. It's great but it cant solve my prob. However i get a new clue that may be the cause of this.
    Time, date, and month are correct but the year of my comp is 2009. It cant be 1957.

  • [svn:bz-trunk] 15533: Back out some local changes to tomcat-users. xml and tomcat-users.xml. install I inadvertently checked in when upgrading ActiveMQ on BlazeDS/trunk .

    Revision: 15533
    Revision: 15533
    Author:   [email protected]
    Date:     2010-04-17 04:20:11 -0700 (Sat, 17 Apr 2010)
    Log Message:
    Back out some local changes to tomcat-users.xml and tomcat-users.xml.install I inadvertently checked in when upgrading ActiveMQ on BlazeDS/trunk.
    Modified Paths:
        blazeds/trunk/servers/apache-tomcat-6.0.14/conf/tomcat-users.xml
        blazeds/trunk/servers/apache-tomcat-6.0.14/conf/tomcat-users.xml.install

    i will not read all that!!!! Format it! Lots of useless information commented.
    java.net.SocketException: java.net.ConnectException: Connection timed out: connect
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
    Tells me you have a connection error on Mysql. Quick search show me this:
    <Resource name="jdbc/passport" auth="Container"
    type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://258.1.54.134:3306/xmnext_passport"
    username="dda" password="zhoussda" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    Can you connect to the server using thos setting with a mysql client in the server?

  • The "air." prefix does not apear in my app.xml

    Hi
    I am publishing an app for the Amazon store using the Flash Pro CS6.
    after I publish my app I noticed  that the is no  "air." prefix in the <id> tag in my app.xml.  The "air." prefix is a default in the Flash Pro CS6 publish settings and cannot be changed.
    Should I add the "air." prefix to my app ID in the amazon store or should it be exactly the same as my <id> in the app.xml file? (without the "air.")
    What about the Play Store?
    Why did Adobe put the hard-coded prefix?
    Thanks...
    Aviv
    I'm using AIR 3.6

    I developed an app for Android a while ago using just the basic native Android SDK, so of course there is no ".air" prefix. But since then I've started using the AIR platform and have completely redeveloped my app using AIR/Flash Builder 4.7 and there is no clear way to remove the ".air" prefix.
    I can not update my app until Adobe addresses this issue. It is no longer nessisary to have the "air." prefix due to the captive runtime.
    I found an awful long solution involving basically dismantalling the .apk file and repackaging it. But the workflow of this is an absolute mess to have to go through for every single update. In the iphone debug exporter there is a field to modify the package name that is visible in Flash Builder 4.7. Why can't that just be part of the Android release build export process that way I can easily remove the "air." prefix.
    Adobe is making it really hard to switch over to using the AIR platform from developing with the native Android SDK.
    I've also had trouble figuring out the 'AIR_NOANDROIDFLAIR' to true fix. Has anyone had any luck with getting this to work on a Mac? Would you mind posting how you went about setting that?

  • Air iOS - Hide startus bar app.xml

    Hi,
    I would like to hide the iOS 8 status bar and found the code snippet below.
    How to add it to the app.xml?
    I tried the following but received an error:
    <iPhone>
    <InfoAdditions><![CDATA[
    <key>UIStatusBarHidden</key>
    <true/>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>       
    ]]></InfoAdditions>
    </iPhone>
    Thanks

    To remove the status bar completely set the fullscreen paremeter to true:
    <fullScreen>true</fullScreen>

  • [svn:bz-4.0.0_fixes] 16148: Update config testsuite on 4.0. 0_fixes branch to force kill the app server before running any tests when the app server is Tomcat .

    Revision: 16148
    Revision: 16148
    Author:   [email protected]
    Date:     2010-05-17 06:40:40 -0700 (Mon, 17 May 2010)
    Log Message:
    Update config testsuite on 4.0.0_fixes branch to force kill the app server before running any tests when the app server is Tomcat. The regression runs were hanging on this branch when going to run the config suite because the Tomcat server isn't shutting down cleanly at the end of the MXUnit run. I believe this is an issue with the version of ActiveMQ we are using. Since I don't think we want to update ActiveMQ on this branch force killing the Tomcat server will workaround the problem.
    Modified Paths:
        blazeds/branches/4.0.0_fixes/qa/apps/qa-regress/testsuites/config/build.xml

    Hi,
    Thanks for the reply. I have tried this on another machine running the same version of Blackboard. It works fine.
    Only difference is that the machine that has the JVM crash is running on Fujitsu PrimePower and the OS is Solaris 9 (but twigged for PrimePower).
    The one where it runs and starts up successfully is running on SunFire (OS is Solaris 10).
    I am wondering if there is a problem with the JVM loading required libraries because of the OS being different versions.
    Any leads on this is welcomed. Thank you.
    Regards,
    Hon Peng
    ===================
    On Fujitsu Primepower
    SunOS 5.9 Generic_118558-33 sun4us sparc FJSV,GPUS
    the Dependencies for libjvm.so are as follows:
    ===================
    bash-2.05$ ldd -r libjvm.so
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libsched.so.1 => /usr/lib/libsched.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    /usr/platform/FJSV,GPUS/lib/libc_psr.so.1
    =====================================
    On SunFire, Sun machine
    SunOS 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-280R
    the dependencies are different for the libjvm.so:
    =====================================
    bash-2.05$ ldd -r libjvm.so
    libsocket.so.1 => /lib/libsocket.so.1
    libsched.so.1 => /usr/lib/libsched.so.1
    libdl.so.1 => /lib/libdl.so.1
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libm.so.1 => /lib/libm.so.1
    libthread.so.1 => /lib/libthread.so.1
    libc.so.1 => /lib/libc.so.1
    libnsl.so.1 => /lib/libnsl.so.1
    libmp.so.2 => /lib/libmp.so.2
    libmd5.so.1 => /lib/libmd5.so.1
    libscf.so.1 => /lib/libscf.so.1
    libdoor.so.1 => /lib/libdoor.so.1
    libuutil.so.1 => /lib/libuutil.so.1
    /platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
    libm.so.2 => /lib/libm.so.2
    /platform/SUNW,Sun-Fire-280R/lib/libmd5_psr.so.1

  • Air iOS - How to add iPhone 6 icons to app.xml?

    I'm using Flash CS6 and Air 3.9 to publish an iOS app.
    How to add the icons for iPhone 6 and iPhone 6 Plus to the app.xml?
    I tried this but got an error:
    <icon>
    <!-- all other icon sizes -->
    <image120x120>AppIcons/app_120.png</image120x120>
    <image180x180>AppIcons/app_180.png</image180x180>
    </icon> 
    Any help appreciated.
    Thanks

    Hi,
    Thanks for reporting, but things are working fine at our end. Could you please tell us the error you are observing. Also i would recommend you to use latest SDK and Flash pro.
    Thanks,
    Jitender

  • Air Android - app.xml manifest

    Hi,
    How to add these Android settings to an Air Andoid app.xml manifest?
    <supports-screens android:
                      android:largeScreens="true"
                      android:xlargeScreens="true"/>
    I tried it like this, but got an error:
      <android>
        <manifestAdditions>
    <![CDATA[
            <manifest android:installLocation="auto">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-sdk android:minSdkVersion="8"/>
    <supports-screens android:
                      android:largeScreens="true"
                      android:xlargeScreens="true"/>
    ]]>
        </manifestAdditions>
      </android>
      Thanks!

    Hi,
    You can use it as written below:
    <android>
            <manifestAdditions><![CDATA[
                <manifest android:installLocation="auto">
                     <uses-permission android:name="android.permission.INTERNET"/>
                     <supports-screens android:largeScreens="true"
                    android:xlargeScreens="true"/>
    </manifest>
            ]]></manifestAdditions>
    </android>
    Hope it helps.
    Regards,
    Nimit

  • App.xml problem

    Hi
    I'm having a few issues creating an iOS app in Flash CC.
    Essentially, Flash insists on creating an app.xml file that targets both iPhone and iPad, even when I select iPhone from the dropdown in the publish settings dialogue. If I then manually edit the file to say:
    <key>UIDeviceFamily</key>
    <array>
         <string>1</string>
    </array>
    it will rewrite it to:
    <key>UIDeviceFamily</key>
    <array>
         <string>1</string>
         <string>2</string>
    </array>
    When I then start the app on an iPod it shrinks the whole screen to iPad ratio on the iPhone screen, even moving the standard status bar:
    I'm using Flash Pro CC with the Air3.9 SDK beta and running on a new iPod Touch running iOS 7.0.3
    Any suggestions appreciated.

    my app.xml publishes correctly with 3.6 and 3.6.0.6090,
    <InfoAdditions><![CDATA[
      <key>UIDeviceFamily</key>
      <array>
    <string>1</string>
      </array>
    ]]></InfoAdditions>

  • Iplanet 6.0 web-apps.xml config issue..!

    Hi,
    I would like to know the reason for marking webapps_enable="off" or "on" in server.xml.
    The issue I'm facing is when I say :
    <VARS docroot="/usr/sample-app/web" webapps_file="web-apps.xml" webapps_enable="on"/>
    and my web-apps.xml file looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE vs PUBLIC "-//Sun Microsystems, Inc.; iPlanet//DTD Virtual Server Web Applications 6.0//EN"
    "http://developer.iplanet.com/webserver/dtds/iws-webapps_6_0.dtd">
    <vs>
    <session-manager class="com.iplanet.server.http.session.IWSSessionManager">
    <init-param>
    <param-name>maxSessions</param-name>
    <param-value>2000</param-value>
    </init-param>
    <init-param>
    <param-name>timeOut</param-name>
    <param-value>150</param-value>
    </init-param>
    <init-param>
    <param-name>reapInterval</param-name>
    <param-value>150</param-value>
    </init-param>
    </session-manager>
    <parameter-encoding enc="UTF8"/>
    </vs>
    If I make webapps_enable="on" and add a new URI as :
    <web-app uri="/sampleapp" dir="/usr/sample-app/sampleapp" enable="true"/>
    I'm getting the following error message when I start my web server;
    vs(https-somapp.xyz.COM)SAX parser error: The content of element type "vs" must match "(auth-native?,class-loader?,jsp-servlet?,parameter-encoding?,response-buffer?,response-cookie?,config-param*,role-mapping?,session-manager?,session-tracking?,session-cookie?,tempdir?,form-login-session?,web-app*)". in file:web-apps.xml at line number 22.
    Kindly assist me as I'm a newbie to Iplanet configurations.
    Thanks in advance
    SS

    Hi,
    In server.xml, the VS tag needs to also include the id of the virtual server, i.e.
    <vs> is wrong, it should be something like:
    <VS id="server.iplanet.com" connections="group1" mime="mime1"
    aclids="acl1">
    Please see the following doc for more detail on the VS element:
    http://www.scientificamerican.com/manual/nsapi/08_vserv.htm
    By the way, this is the wrong forum to post questions on webserver to, you should use the following forum in future:
    http://swforum.sun.com/jive/forum.jspa?forumID=16
    Hope this helps

  • Can any tag in app.xml control no-auto-startup after completing install?

    InstallFolder in app.xml can work. And can any tag  in app.xml controls no-auto-startup after completing install?

    No, there isn't any tag to control no-auto-startup.
    you will have to Uncheck the option "start application after installation" in the installation dilaog itself.

Maybe you are looking for

  • Is it normal for my computer to slow the more pdf's I open?

    I think my computer should run better with what I need to do in a day, But opening pdfs then attaching others in emails, my computer breaths hard and is slow. It may have to do with watching webcasts and not being able to play any videos or games fro

  • Is there a tool for automated GUI feeding?

    Hi! I did not find a better place for this question: Let's assume that I have a running Java GUI, is there any tool to access the GUI elements, i.e. to connect to a running GUI (from another script or program), push buttons and fill in text to text f

  • Photos too big for desktop

    I could always just choose a photo to use as a desktop and it would work fine. Now they all seem to display at full resolution meaning that I only get a small segment of the picture. I have tried cropping to the display dimensions but it is still too

  • Installing Oracle Fusion Middleware in Silent Mode = -silent

    Hi there, I´m trying to install ofm_soa_generic_11.1.1.1.0_disk1_1of1 (Oracle Soa Suite) through silent mode by -silent flag. I´m using this command : /<package>/./runInstaller -jreLoc <jrelocation> -silent I´m getting these errors : [ERROR] All of t

  • Requirement on report

    HI Experts, we have a requirement below. Need a report of all users and roles who have access/used/processed any local and/or standard reports from either the Federated Portal, using the BeX Analyzer and/or the BeX Query designer - actvity report sho