Tomcat 5.5 server.xml question

When I installed Tomcat 5.5 I had to edit server.xml to work with my application. For that I had to specify the <Context path>. But I never found the tg in my server.xml. So how do i go about configuring my server.xml.
As in my application name in webapps directory is java_ex . How and where do i specify that in my Tomcat 5.5 server.xml

See this link about defining contexts: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
You don't need to define a context if your server is set up for automatic deployments. It will deploy anything that looks like a webapp in the "webapps" directory. (ie is in that directory, and has a WEB-INF/web.xml file)
If you DO need to define a context (usually for database connection setup) it is better to define the context info in its own file rather than in server.xml.
- in individual files (with a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. The name of the file (less the .xml) extension will be used as the context path.
ie create the file [TOMCAT]/conf/Catalina/localhost/java_ex.xml and put your context definition in there.
Cheers,
evnafets

Similar Messages

  • RequestInterceptor for Tomcat 5.5 server.xml ?

    Hello,
    Tomcat 3X server.xml has RequestInterceptor element for preventing classloader. What is the equivalent for tomcat 4X, 5X? and Where to add this equivalent ? I am using Tomcat5.5 and I encountered error in my servlet Naming class. It was said it workd with tomcat3.2.1 by adding the RequestInterceptor.
    Thanks for help,
    Wayne

    i am posting the Car.xml which i created in
    /conf/catalina/localhost directory in Tomcat 5.5.7
    ?xml version='1.0' encoding='utf-8'?>
    <Context path ="/Car" docBase="C:\Program
    Files\Apache Software Foundation\Tomcat
    5.5\webapps\Car" debug="0" />Rather than have you working directory under webapps, you can have it elsewhere in your system and refer to it using the docBase attribute. For example, say you have your work directory in d:\work\car,
    then
    <?xml version='1.0' encoding='utf-8'?>
    <Context  path ="/Car" docBase="d:/work/car"  />would suffice.
    cheers,
    ram.

  • Server.xml, tomcat 5.0.16,Win XP Home

    Hi,
    This is regarding a servlet running question.I have done what all s required to test a servlet for sure,written the web.xml file,the .class file in the classes folder,so on,I am sure they are correct.
    My question is whether I need to change the <CATALINA_HOME>/cof/server.xml file.I mean the <Context> tag.
    Thanks in advance
    AS

    Hi,
    This is regarding a servlet running question.I have
    ve done what all s required to test a servlet for
    sure,written the web.xml file,the .class file in the
    classes folder,so on,I am sure they are correct.
    My question is whether I need to change the
    the <CATALINA_HOME>/cof/server.xml file.I mean the
    <Context> tag.
    Thanks in advance
    ASI am the original poster of this topic,kindly consider this situation. More specific
    I have a directory in <Tomcat_home>/webapps/sampleapp
    Inside this i have the WEB-INF directory,inside the WEB-INF directory,I have the classes and lib folders and an optional sourcefile folder.
    I have placed my .class file after compiling the source file in the classes directory.
    written up a deployment descriptor web.xml placed it inside the WEB-INF directory.
    As asked earlier,Do I have to change the context path in <Tomcat-Home>/conf/server.xml, keeping this situation in mind.
    Hope this is a more specific question.
    Any help would be greatly appreciated
    Thanks
    AS

  • Apache server - tomcat - jk, virtual hosts, database/context.xml question?

    Hello,
    I have an web application that runs perfectly in Tomcat 5.5 when running tomcat stand-alone.
    I also have Apache HTTP server integrated with Tomcat using the jk connector and running virtual hosts in a mod_jk.conf file, which is working for html files. When I run apache and tomcat at the same time, the jsp opens but the servlet cannot get a database connection.
    To run virtual hosts and apache and tomcat, I added this host container to server.xml:
    <Host name="www.mydomain.com" debug="0" appBase="d:/WebApps/mydomain"
    unpackWARs="true" autoDeploy="true">
    <Context path="" docBase="" debug="0"/>
    </Host>
    Does anybody see anything wrong with this? Is there some reason why the context.xml (which contains the database info) is not being read?
    Any suggestions are greatly appreciated.
    Thank you,
    Logan

    Hi,
    In the docmentation of Tomcat 5.x is written that is not recommended to put <context> element in the server.xml file. Create a file in CATALINA_HOME/conf/Catalina/www.mydomain.com/ with an XML extension. For example context.xml. In files like this you should write all of your <context> elements.

  • How to specify URL in server.xml of Tomcat

    Hi Everybody,
    I need help.How to specify url in the server.xml.
    I developed one application in the Tomcat 3.3.I want to access the by entering uri(like:http:test.com).
    What are tags to enter in the server.xml.
    Right now i am accessing like:http://localhost:8080/Test/Login.jsp
    I want replace this with (www.test.com).
    This site will access from anywhere means it is going to live.
    So what are things have to do in the server.xml
    Please provide the solution.
    Regards
    Sridhar

    Hi Raktim:
    I looked around on SDN and it seems that i have found what you have been looking for.
    Kindly look at page number 24 and 25 of this page
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4d46fb8a-0b01-0010-9fbe-e4b96533b222
    P.S: Kindly assign points if your query is resolved, also close the question to assist other users narrow the search and find solutions

  • Still problem in TOMCAT(server.xml)

    hiiiiiii
    I tried all suggestion......At end, now when I execute %startTomcat% from DOS prompt......DOS windows opens and closes...... Somebody told me that it was error in my server.xml file in conf......
    PLZ tell me how alter this file or add new stuff.....

    Hi Amar,
    It was me who suggested the following steps
    Follow these steps:
    Download Java SDK 1.3 or 1.4
    Download tomcat 4.x or 5.x
    set the following variables from dos prompt
    set JAVA_HOME = path to your java sdk folder
    set CATALINA_HOME = path to tomcat folder
    set startTomcat = %CATALINA_HOME%\bin\startup
    set stopTomcat =%CATALINA_HOME%\bin\shutdown
    now at dos prompt
    type %startTomcat% , it should opena nother window which displays the status of tomcat server.
    In the browser type http://localhost:8080/ (for tomcat 4.x) or http://localhost:8084 (for tomcat5.x) it should open up the index page of the server.
    at your post http://forum.java.sun.com/thread.jsp?forum=33&thread=542123
    First I suggest thta you donot repost same question, it wont help and next be clear what is the problem if possible post the error that might to provide you the solution.

  • Quession at tomcat server xml

    Hi all,
    I using form authentican in tomcat, it has some setting on server xml, I have two questions, hope can get help from someone
    1) <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
                 driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
              connectionURL="jdbc:microsoft:sqlserver://localhost:3333"
             connectionName="test" connectionPassword="1234"
                  userTable="users" userNameCol="Name" userCredCol="Password"
              userRoleTable="user_roles" roleNameCol="role_name" />if at backbone I have more then one database , and have different user and password . what should I set in here ?
    2) if I want to encrypted password(eg.MD5) , how can I do it
    Thank you !!

    if at backbone I have more then one database , and
    have different user and password . what should I
    set in here ?You cannot do it. And even if you could,
    1. how would you tell the container which realm to use ?
    2. and assuming you could do #1 above, how would you determine the realm that has the authentication info.
    Note: Though1 & 2 may sound alike, there's a subtle difference. #2 speaks about determining the realm and #1 about conveying the same to the container.
    2) if I want to encrypted password(eg.MD5) , how can
    I do ithttp://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html#Digested%20Passwords
    ram.

  • 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

  • Does anyone have a good server.xml file for tomcat?

    I am trying to link apache and tomcat on a RedHat 9 computer. I previously posted a message stating that I could not get tomcat to "automagically" make the configuration files (mod_jk.conf-auto) that all the manuals promised it would. However, I found that my problem was the lack of an ApacheConfig tag in the server.xml file. After looking at my server.xml file, I found that it was much more simplistic than I would hoped = it did not have enough comments or commented out options. It had none of the directives that the manuals said it included by default.
    In short, does anyone who has apache and tomcat linked have a server.xml file that I can look at so that I can figure out what I must add to mine to get tomcat working with apache? I would greatly appreciate it if you could copy and paste the whole thing here.
    Thank you very much in advance.
    Edward S. Rice

    Hi!
    I am having the Apache-Tomcat4.0 version installed on a Win2000 machine. I am pasting here my server.xml. Hope it will be useful to you. I even didnot do much modifications to my server.xml except for adding a context.
    Please come back if problem persists.
    <!-- 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" debug="0">
    <!-- 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="Tomcat-Standalone">
    <!-- 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 4.0 documentation bundle for more detailed
    instructions):
    * 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 className="org.apache.catalina.connector.http.HttpConnector"
    port="8080" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="10" debug="0" connectionTimeout="60000"/>
    <!-- Note : To disable connection timeouts, set connectionTimeout value
    to -1 -->
    <!-- Define an SSL HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
    port="8443" minProcessors="5" maxProcessors="75"
    enableLookups="true"
         acceptCount="10" debug="0" scheme="https" secure="true">
    <Factory className="org.apache.catalina.net.SSLServerSocketFactory"
    clientAuth="false" protocol="TLS"/>
    </Connector>
    -->
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <!--
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
    port="8009" minProcessors="5" maxProcessors="75"
    acceptCount="10" debug="0"/>
    -->
    <!-- Define a Proxied HTTP/1.1 Connector on port 8081 -->
    <!-- See proxy documentation for more information about using this. -->
    <!--
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
    port="8081" minProcessors="5" maxProcessors="75"
    enableLookups="true"
    acceptCount="10" debug="0" connectionTimeout="60000"
    proxyPort="80"/>
    -->
    <!-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -->
    <!--
    <Connector className="org.apache.catalina.connector.http10.HttpConnector"
    port="8082" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="10" debug="0"/>
    -->
    <!-- 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). -->
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Standalone" defaultHost="localhost" debug="0">
    <!-- 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.3
    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"/>
    -->
    <!-- Global logger unless overridden at lower levels -->
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="catalina_log." suffix=".txt"
    timestamp="true"/>
    <!-- Because this Realm is here, an instance will be shared globally -->
    <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" debug="99"
    driverName="org.gjt.mm.mysql.Driver"
    connectionURL="jdbc:mysql://localhost/authority?user=test;password=test"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL?user=scott;password=tiger"
    userTable="users" userNameCol="user_name" userCredCol="user_pass"
    userRoleTable="user_roles" roleNameCol="role_name" />
    -->
    <!--
    <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
    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 -->
    <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
    <!-- 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"
    debug="0"/>
    -->
    <!-- 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"/>
    <!-- Logger shared by all Contexts related to this virtual host. By
    default (when using FileLogger), 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.-->
    <Logger className="org.apache.catalina.logger.FileLogger"
    directory="logs" prefix="localhost_log." suffix=".txt"
         timestamp="true"/>
    <!-- Define properties for each web application. This is only needed
    if you want to set non-default properties, or have web application
    document roots in places other than the virtual host's appBase
    directory. -->
    <!-- Tomcat Root Context -->
    <!--
    <Context path="" docBase="ROOT" debug="0"/>
    -->
              <Context path="/vijay" docBase="D:\Java\servlets" debug="0"/>
    <!-- Tomcat Manager Context -->
    <Context path="/manager" docBase="manager"
    debug="0" privileged="true"/>
    <!-- Tomcat Examples Context -->
    <Context path="/examples" docBase="examples" debug="0"
    reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_examples_log." suffix=".txt"
         timestamp="true"/>
    <Ejb name="ejb/EmplRecord" type="Entity"
    home="com.wombat.empl.EmployeeRecordHome"
    remote="com.wombat.empl.EmployeeRecord"/>
    <!-- PersistentManager: Uncomment the section below to test Persistent
              Sessions.
    saveOnRestart: If true, all active sessions will be saved
    to the Store when Catalina is shutdown, regardless of
    other settings. All Sessions found in the Store will be
    loaded on startup. Sessions past their expiration are
    ignored in both cases.
    maxActiveSessions: If 0 or greater, having too many active
    sessions will result in some being swapped out. minIdleSwap
    limits this. -1 means unlimited sessions are allowed.
    0 means sessions will almost always be swapped out after
    use - this will be noticeably slow for your users.
    minIdleSwap: Sessions must be idle for at least this long
    (in seconds) before they will be swapped out due to
    maxActiveSessions. This avoids thrashing when the site is
    highly active. -1 or 0 means there is no minimum - sessions
    can be swapped out at any time.
    maxIdleSwap: Sessions will be swapped out if idle for this
    long (in seconds). If minIdleSwap is higher, then it will
    override this. This isn't exact: it is checked periodically.
    -1 means sessions won't be swapped out for this reason,
    although they may be swapped out for maxActiveSessions.
    If set to >= 0, guarantees that all sessions found in the
    Store will be loaded on startup.
    maxIdleBackup: Sessions will be backed up (saved to the Store,
    but left in active memory) if idle for this long (in seconds),
    and all sessions found in the Store will be loaded on startup.
    If set to -1 sessions will not be backed up, 0 means they
    should be backed up shortly after being used.
    To clear sessions from the Store, set maxActiveSessions, maxIdleSwap,
    and minIdleBackup all to -1, saveOnRestart to false, then restart
    Catalina.
    -->
              <!--
    <Manager className="org.apache.catalina.session.PersistentManager"
    debug="0"
    saveOnRestart="true"
    maxActiveSessions="-1"
    minIdleSwap="-1"
    maxIdleSwap="-1"
    maxIdleBackup="-1">
    <Store className="org.apache.catalina.session.FileStore"/>
    </Manager>
              -->
    <Environment name="maxExemptions" type="java.lang.Integer"
    value="15"/>
    <Parameter name="context.param.name" value="context.param.value"
    override="false"/>
    <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/EmployeeAppDb">
    <parameter><name>user</name><value>sa</value></parameter>
    <parameter><name>password</name><value></value></parameter>
    <parameter><name>driverClassName</name>
    <value>org.hsql.jdbcDriver</value></parameter>
    <parameter><name>driverName</name>
    <value>jdbc:HypersonicSQL:database</value></parameter>
    </ResourceParams>
    <Resource name="mail/Session" auth="Container"
    type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
    <parameter>
    <name>mail.smtp.host</name>
    <value>localhost</value>
    </parameter>
    </ResourceParams>
    </Context>
    </Host>
    </Engine>
    </Service>
    <!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
    as its servlet container. Please read the README.txt file coming with
    the WebApp Module distribution on how to build it.
    (Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
    To configure the Apache side, you must ensure that you have the
    "ServerName" and "Port" directives defined in "httpd.conf". Then,
    lines like these to the bottom of your "httpd.conf" file:
    LoadModule webapp_module libexec/mod_webapp.so
    WebAppConnection warpConnection warp localhost:8008
    WebAppDeploy examples warpConnection /examples/
    The next time you restart Apache (after restarting Tomcat, if needed)
    the connection will be established, and all applications you make
    visible via "WebAppDeploy" directives can be accessed through Apache.
    -->
    <!-- Define an Apache-Connector Service -->
    <Service name="Tomcat-Apache">
    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
    port="8008" minProcessors="5" maxProcessors="75"
    enableLookups="true"
    acceptCount="10" debug="0"/>
    <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
    name="Apache" debug="0" appBase="webapps">
    <!-- Global logger unless overridden at lower levels -->
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="apache_log." suffix=".txt"
    timestamp="true"/>
    <!-- Because this Realm is here, an instance will be shared globally -->
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    </Engine>
    </Service>
    </Server>

  • Server.xml tomcat specific?

    I have a coworker that says that the server.xml file is Tomcat specific. So we should not put things in there related to the environment where the server is deployed (ie. windows versus unix directory names). So her case is that if we move to another application server we will not be able to do this.
    Could someone tell me if server.xml is part of the web server spec?
    Thanks

    You should not be changing the web.xml file in TOMCAT_HOME/conf at all. Every WAR file you create should have its own web.xml in its WEB-INF directory. That's the one you should be changing.
    I don't touch anything on Tomcat, not even the server.xml. I write a context.xml file whose name is the same as the WAR file I want to deploy. Then I put both in the TOMCAT_HOME/webapps directory. Tomcat picks up both and sets all the application-specific context data for me. No editing of the server.xml needed. I think it's a feature only in later versions of Tomcat - 4.1.24 and later. - MOD

  • Changing Server.xml (Tomcat) For E-mail

    Hello,
    Can anybody pls tell what should I change in Server.xml to get E-mail application working. Because Server.xml is configure for local SMTP host, that is what Tomcat documentation says and I need to change it to my ISP host. I don't know anything about xml.
    So please tell what I need to change in Server.xml.

    Hi,
    Open your server.xml found in <tomcat-home>/conf/ directory.
    Look for <ResourceParams name="mail/Session"> element.Change the values
    according to your need.
    -Amol

  • URGENT: Tomcat, Connection Pool - Issue with web.xml & server.xml

    Folks,
    I am trying to connect to a MS SQL database using Tomcat/JSP but having issues. The code that I am using is as follows:
    Context ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/test");
    Connection conn = ds.getConnection();
    Statement stmt = conn.createStatement();
    I have added the following code to my Server.xml:
    <Resource name="jdbc/test" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="DB_AW_DATA" password="tester" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://192.168.0.1\\Newcastle"/>
    And the complete web.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE web-app (View Source for full doctype...)>
    - <web-app>
    - <resource-ref>
    <description>Resource reference to java.sql.Connection factory defined in server.xml</description>
    <res-ref-name>jdbc/test</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    The error message that I am getting is as follows:
    java.sql.SQLException: Cannot load JDBC driver class 'null'
    What confuses me is that I have placed the following files in Tomcat\common\lib...
    mssqlserver.jar
    msbase.jar
    msutil.jar
    I think this is purely an issue with how I configured server.xml and web.xml
    In the Tomcat documentation it states to put the code in the server.xml - but nested inside the Context element. This is something that I have not done as I am clear what the Context should be..
    Can someone assist...
    <Context path="" docBase="ROOT" debug="0"> ???
    what should be the path and the docBase.
    I have deployed the following application:
    http://localhost:8080/SCWAPP/index.jsp
    THANKS IN ADVANCE FOR ALL SUPPORRT

    you should put the code you typed in server.xml into context.xml
    in the META-INF folder and this will fix your problem.
    the latest tomcat docs detail what to do.

  • Server.xml in tomcat access denied

    hello,
    I am using tomcat 5.5.9 with suse (linux), and I am using jdk 1.6.0
    The CATALINA_HOME, JAVA_HOME are defined,
    When I try to startup the tomcat as root user every thing is ok, it
    start (with port 8080)
    I have create a new user with permissions to logs and work
    directories, and try to startup the tomcat from command
    like that su - tomcatuser -c /user/tomcathome/bin/startup.sh
    every thing is ok
    but wenn I try to start it from eclipse I get this message:
    In Catalina.out
    Jul  12, 2006 6:03:26 PM org.apache.catalina.startup.Catalina load
    WARNING: Can't load server.xml
    Jul 12, 2006 6:03:26 PM org.apache.catalina.startup.Catalina load
    WARNING: Can't load server.xml
    Jul 12, 2006 6:03:26 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 0 ms
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
    a:39)
            at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
    Impl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at
    org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
            at
    org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Caused by: java.lang.NullPointerException
            at org.apache.catalina.startup.Catalina.await(Catalina.java:600)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:560) Can any one help,
    Thanks

    Click Start, click Run, type cmd in the
    Open box, and then click OK.
    Switch to the <var>Drive</var>:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 folder. In this folder, <var>Drive</var> is the drive where Windows is installed. To do this, type the following line at the command prompt, and then press Enter:
    cd <var>Drive</var>:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
    Add the appropriate permissions to the Network Service group for the Temporary ASP.NET Files folder. To do this, type the following line, and then press Enter:
    aspnet_regiis -ir
    cd <var>Drive</var>:\WINDOWS\Microsoft.NET\Framework\v4
    Add the appropriate permissions to the Network Service group for the Temporary ASP.NET Files folder. To do this, type the following line, and then press Enter:
    aspnet_regiis -ir
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/bf6bb272-eb75-4435-8264-6980e9e7268f/sharepoint-server-2010-access-denied-error?forum=sharepointadminprevious
    Is this a claims based web application? If yes, the super reader and super user need to be added with the in the format "i:0#.w|domain\username". Also, add them with full read and full control on the web application as well.
    Check AAM settings
    Can you check that your databases are not set to read only. I had a similar issue after backing up the farm users were not allowed to do anything on the site. Turned out the database was set to read only in SQL.
    If this helped you resolve your issue, please mark it Answered

  • Connection Pooling in Tomcat with SQL Server

    Hey Guys,
    I have been banging my head against this all day :( so i now turn to you for some help :) I have a web app that uses a database now i want to start using this connection pooling that is supposed to be greatly more efficient than creating a new statement each time i need something from the database.
    I have read many articles about this already today and feel that a lot of the contradict each other and one thing that i saw was that there seems to be different way of doing this.
    One solution i have tried to implement but have so far failed is as follows:
    In Web app:
    Update Web.xml to include:
    <resource-ref>
            <description>
                Resource reference to a factory for java.sql.Connection
                instances that may be used for talking to a particular
                database that is configured in the server.xml file.
            </description>
            <res-ref-name>
                    jdbc/BBL
            </res-ref-name>
            <res-type>
                javax.sql.DataSource
            </res-type>
            <res-auth>
                Container
            </res-auth>
        </resource-ref>Update Context.xml to include:
    <Context path="/TEST_CON_POOLING">
    <Resource name="jdbc/BBL"
    auth="Container"
    type="javax.sql.DataSource"
    username="sa"
    password="sa"
    driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://10.20.1.91:1433;DatabaseName=BBL"
    maxActive="8"
    maxIdle="4" />
    </Context>And then my jsp to test this:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <%@ page import="java.sql.ResultSet, java.sql.*,java.sql.SQLException,javax.naming.Context,javax.naming.InitialContext,
            javax.naming.NamingException,javax.sql.DataSource" %>
            <%
            Context initCtx = new InitialContext();
            Context envCtx = (Context) initCtx.lookup("java:comp/env");
            DataSource ds = (DataSource)
            envCtx.lookup("jdbc/BBL");
            Connection conn = ds.getConnection();
            //... use this connection to access the database ...
            Statement stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery("select id from users");
            while(rs.next()){
                out.write(rs.getString("ID"));
            conn.close();
            %>
        </body>
    </html>When i actually deply this i get the following nasty tomcat error:
    root cause
    org.apache.tomcat.dbcp.dbcp.SQLNestedException:
    Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL 'jdbc:microsoft:sqlserver://10.20.1.91:1433;DatabaseName=BBL'
         org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
         org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.sql.SQLException: No suitable driver
         java.sql.DriverManager.getDriver(DriverManager.java:243)
         org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
         org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)As far as i know all the necessary sql server jar files are in my classpath, and any way i have them all sitting in the CATALINA_HOME/common/lib directory.
    Question:
    Am i going about this correctly? Some tutorials i have read say that i should be updateing the server.xml file but whenever i go near that tomcat will not even start.
    Help greatly appreciated.
    If there is anything i have not posted let me know and i will get it up.
    Rob

    Updating the server.xml file used to be necessary. It is no longer required, and actually not recommended any more.
    The best approach I feel is as you have done here, putting the definition into a context.xml file specifically for this application.
    In fact it all looks pretty good to me.
    JDBC driver jar in [TOMCAT]/common/lib - check
    Configuration in context.xml rather than server.xml - check
    Using JNDI - check.
    Have you got the connection url right?
    Is it jdbc:microsoft:sqlserver or just jdbc:sqlserver ? I have seen both on various sites around the internet.
    What version of SQL Server are you using? Check its documentation on the JDBC driver as to what class to use, and what the connection string should be.
    Try it in a plain java class - can you get a connection just using plain JDBC code?
    What values do you use for that?
    Hope this helps,
    evnafets

Maybe you are looking for

  • The requested resource (/ciscopca) is not available

    I am trying to acces the mailbox via web url and getting the error The requested resource (/ciscopca) is not available using cisco unity connection   System version: 8.0.3.23031-1

  • Missing Simple Answer

    Hello, I am doing some testing over oracle's ST and have ran into a strange case, which I don't know whether I am doing something wrong or it is a bug. I have a simple owl ontology with two axioms: SubClassOf( A intersectionOf(B C)) ClassAssertion(A

  • Do I need to enable trust between domains in the following scenario

    I have a domain x and domain y on 2 seperate machines. My client logs into domain x does stuff and logs out. The same client now logs into domian y and needs to do stuff, but the second domain kicks out the client by throwing an exception saying "inv

  • Delete key not always responding

    Recently I installed RAM and when removing the keyboard I must of jarred the delete key because it is sluggish, only responding half the time I tap it. Any suggestions on how to fix this? iBook G4 1.33ghz   Mac OS X (10.3.9)   1.25 gigs RAM

  • BAPI to IDocs

    hello experts i wanted to implement a scenario where external middleware system is expected to invoke BAPI/RFC in ECC 6 system. what i want is if BAPI call is successful i will return the response back to middleware but if its unsuccessful due to som