Tomcat 4.0 configuration

I am getting the following error message, when I start Tomcat 4.0 server from Tomcat's bin directory. I am using Win 98, 128 mb RAM and JDk 1.2.2
D:\tomcat\jakarta-tomcat-4.0-m5\bin>startup
Using CLASSPATH: ..\bin\bootstrap.jar;c:\jdk1.2.2\bin;\lib\tools.jar
Cannot find file 'c:\jdk1.2.2\bin;\bin\java' (or one of its
components). Check to ensure the path and filename are correct
and that all required libraries are available.
It looks like the error is related to JDK1.2.2 But I could't find out the problem.
The following is a part of my autoexec.bat file
path C:\WINDOWS;C:\WINDOWS\COMMAND;c:\jdk1.2.2\bin;
set CLASSPATH=c:\jdk1.2.2\lib\tools.jar;
set JAVA_HOME=c:\jdk1.2.2\bin;
I even tried
set JAVA_HOME=c:\jdk1.2.2;
Please do help me
Thanks
Shailesh

Hello,
I also faced the same problem. At last I went to the source of startup,catalina and digest and replaced JAVA_HOME by c:\jdk1.2. That cleared that error. Try it out. Perhaps it would work.
Sunita.

Similar Messages

  • Apache 2, Tomcat 5, mod_jk2 configuration problem

    I am setting up a Web Server on a RedHat Enterprise Linux box. I installed the RedHat Application Server that installs Apache 2, Tomcat 5 and Mod_JK2. I can't get the mod_jk2 configured properly. I've searched the internet and haven't found any documentation that will work with this.
    I need to know how to configure the mod_jk2 with Apache2 and Tomcat 5.
    PLEASE HELP!!! Nothing I've tried from the Internet has helped. The best site that I've found is ::
    http://www.johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html
    but its for tomcat 4 so it doesn't work for me.
    Has anyone does this before that can help me????
    Thanks in advance.

    Ended up downloading and installing the mod_jk instead of the mod_jk2 that came with RedHat Application Server.

  • Tomcat 4.1 Configuration after upgrading Java SDK

    Hi
    I have an existing Tomcat 4.1 installation which runs on Java 2 SDK 1.4.1_01. I've upgraded the SDK to 1.4.2_08. However, I can't seem to get the Tomcat 4.1 Windows service to start with the new SDK.
    What do I have to do to ensure that the Tomcat 4.1 Windows service runs with the new SDK? Do I have to reinstall Tomcat 4.1 or is there some configuration I can change?
    Thanks for the help :)
    Regards,
    Lily

    I've set the JAVA_HOME to the new JDK installation.
    However it seems that the Apache Tomcat 4.1 windows service is looking for the old JDK installation, hence the windows service is unable to start.

  • Tomcat connection pooling configuration

    I have configured the datasource with connection pool as per
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    All the required jar fles are in $CATALINA_HOME/common/lib.
    When I run my app,I am getting the following error even though commons-pool.jar file is there which contains GenericObjectPool.class file
    java.lang.NoSuchMethodError: org.apache.commons.pool.impl.GenericObjectPool: method <init>()V not found
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:652)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:403)
    Did anyone run into similar issue?
    Thanks

    I am running into this same issue at the moment.
    If you found the solution, it would be much appreciated if you could give me some insight into this problem.
    Thanks.

  • Tomcat slowing down - configuration issue?

    Under the current configuration, I add new Contexts to Tomcat for each of my customers. I will be adding new customers in the future (how many, I don't know but I have 13 now).
    Each customer has their own Context with environment entries and data sources that I use to determine which database to use and where to store uploaded files and such.
    I know that it will slow Tomcat down the way I'm currently doing it as it already has.
    What would be a better way to handle this with minimum effort if at all possible?
    What about connections to the mySQL database? How would your suggestion method effect it?
    If this is the wrong forum, can you direct me to the right one for this type of issue?

    You might want to fine tune the java startup parameters
    especially -Xms and -XMx. Please see the tools documentation.

  • Tomcat Basic Authentification configuration

    Hi, i need to configure my Tomcat (running on Windows 2000 Server) in order to give security to my site.
    I searched on the net i heard about HTTP Basic Auth conf for tomcat, so i think that sould be enough for my security. **
    How can i configure it? I've never used Tomcat before, so please be very specific, very detailed... i need this as soon as posible!
    Thnx! :)
    **Question: Wich is best secure my site with HTTP Tomcat auth or creating login/pswd auth system using JSP ??? /THX AGAIN!/

    Tomcat Basic Authentication has limited capabilities with the greatest restriction being that you have to statically list all of the users/groups/passwords in the deployment files. With customized security (building customized form based authentication) you are free to utilize a security database (relational, ldap, etc) which greatly eases administration as well as other benfits.

  • Oracle-Java-Apache-Tomcat-JK connector configuration help...

    Windows 7 Ultimate 64-bit
    Oracle 12c
    Java 8
    Apache HTTP server 2.4.10
    Tomcat 8.0.15
    JK Connector 1.2.40
    Here are the main configuration files httpd.conf, mod_jk.conf, server.xml, and workers.properties.
    When I browse to a .jsp file, it appears to be read as html, thus not reading <jsp:include> statements as such.
    Please suggest minimum configuration.
    httpd.conf
    Define SRVROOT "/apache"
    ServerRoot "${SRVROOT}"
    Listen 80
    LoadModule actions_module modules/mod_actions.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule allowmethods_module modules/mod_allowmethods.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule auth_basic_module modules/mod_auth_basic.so
    LoadModule authn_core_module modules/mod_authn_core.so
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authz_core_module modules/mod_authz_core.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_user_module modules/mod_authz_user.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule cgi_module modules/mod_cgi.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule env_module modules/mod_env.so
    LoadModule include_module modules/mod_include.so
    LoadModule isapi_module modules/mod_isapi.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
    LoadModule ssl_module modules/mod_ssl.so
    ServerName localhost:80
    #experimental section starts here
    #experimental section ends here
    # Virtual hosts
    NameVirtualHost *
    Include conf/mod_jk.conf
    mod_jk.conf
    LoadModule jk_module modules/mod_jk.so
    JkWorkersFile "c:/tomcat/conf/jk/workers.properties"
    JkMount /servlet/*  ajp13
    JkMount /*.jsp  ajp13
    <VirtualHost *>
    ServerName om1001001.omnisocial.com
    DocumentRoot "c:/data/fxality/java001"
    </VirtualHost>
    <VirtualHost *>
    ServerName om1001002.omnisocial.com
    DocumentRoot "c:/data/fxality/java002"
    </VirtualHost>
    <VirtualHost *>
    ServerName om1001003.omnisocial.com
    DocumentRoot "c:/data/fxality/java003"
    </VirtualHost>
    server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server port="8005" shutdown="SHUTDOWN">
    <GlobalNamingResources>
    <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>
    <Service name="Catalina">
    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
    <Engine name="Catalina" defaultHost="localhost">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/></Realm>
    <Host name="localhost"  appBase="webapps"/>
    <Host name="om1001001.omnisocial.com" appBase="c:/data/fxality/java001">
    <Context path="" docBase=""></Context>
    </Host>
    <Host name="om1001002.omnisocial.com" appBase="c:/data/fxality/java002">
    <Context path="" docBase=""></Context>
    </Host>
    <Host name="om1001003.omnisocial.com" appBase="c:/data/fxality/java003">
    <Context path="" docBase=""></Context>
    </Host>
    </Engine>
    </Service>
    </Server>
    workers.properties
    # BEGIN workers.properties
    # Definition for Ajp13 worker
    worker.list=ajp13
    worker.ajp13.type=ajp13
    worker.ajp13.host=localhost
    worker.ajp13.port=8009
    # END workers.properties

    I haven't studied your problem in detail and don't actually use Tomcat 6, but in earlier versions of Tomcat the handling of JNDI leaves a lot to be desired. If you search this forum for posts about Tomcat and JNDI, you will find some useful information.
    One thing I found was that you really need to use the context.xml file in your Meta-inf directory, putting the datasource anywhere else gets into one kind of trouble or another. I tried using server.xml, a context file for the application and the web-inf file.

  • Apache Tomcat and Servlets configuration...

    Hi there fellow Javites,
    does anybody know how to configure the apache tomcat server xml file to enable you to use the "old servlet url technique"? I hear that its been disabled by default in newer versions Tomcat.
    You know where you would previously type in: http://localhost:8080/servlet/folder1.servlets.TheServlet
    ,but now you have to tell your web.xml file where your servlet is so you now have to type in:
    http://localhost:8080/TheServlet
    That is, unless you enable the server config file to allow you to do both.
    I hate to ask such questions but I really hate the Apache Tomcat documentation.
    Thanks.

    Hi there,
    well I was kinda hoping they'd be a shortcut to having to map the servlet in the web.xml file. In the older versions of the Apache tomcat you used to just be able to type in the url and the Servlet would be found.
    Does anybody know how to enable the later versions of Apache Tomcat via the config file to use the old style of Servlet mapping?
    I guess a more important question I should be asking also is, is this older style of mapping servlets now considered bad practice and is why it is no longer enabled by default in more recent Apache Tomcat versions???
    Thank you, this community rocks! Keep up the Javite work guys, they'll never take us alive. NO LOL. :D

  • Tomcat Virtual Host Configuration on windows 2000

    Dear Reader,
    I am using Tomcat 4.1 with JDK1.4. Currently i have 3 projects.
    The navigation for these is ....
    http://localhost:9090/Shopping/
    http://localhost:9090/Bank/
    http://localhost:9090/Sample/
    Now,
    I need these links as
    http://Shopping:9090 or www.shopping.com is local system....
    http://bank:9090 or www.bank.com is local system....
    http://Sample:9090 or www.sample.com is local system....
    I am using Windows OS. Please Help
    Advance Thanks.
    Rengaraj.R

    Also should have mentioned that to get the mappings for the individual web apps (/Shopping, /bank and /Sample) after the localhost portion you need to add a context file for each web app to the tomcat configuration files (location below).
    The files will live in /tomcat/Conf/Catalina/localhost/"the name of your web app". As an example something like:
    <Context crossContext="true" docBase="/var/webapps/mybankapp" path="/bank" reloadable="true">
    </Context>
    This is placed in a file called: bank.xml
    Edited by: PaulOckleford on Jun 29, 2009 4:14 AM
    Edited by: PaulOckleford on Jun 30, 2009 2:26 AM Wrong xml file name

  • Tomcat virtual host configuration

    Next stupid question from me again.
    I'm trying to configure my Tomcat to handle several websites. Both websites are going to be JSP/JAVA driven.
    Currently I'm struggling to figure out how to tell Tomcat to use application for Host by default.
    I'm doing the following:
    <Host name="gnum.info" appBase="D:\Users\Alex\web.gnum.info" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
    <Alias>www.gnum.info</Alias>
    <Context path="gnum.info" docBase="" debug="0" reloadable="true" cookies="true" />
    </Host>
    I triend different variations from having NO <Context> included to
    1. <Context path="gnum.info" docBase="" debug="0" reloadable="true" cookies="true" />
    2. <Context path="gnum.info" docBase="gnum.info" debug="0" reloadable="true" cookies="true" />
    I'm always ending up with empty response for "www.gnum.info" (you can see it yourself).
    Typing "www.gnum.info/gnum.info" gets back with what I want to see.
    BUT
    I'd like to see it typing "www.gnum.info" without "/gnum.info"...
    Could anybody tell me how to achieve that?

    Hi Gnum,
    Just change your context path to
    <Context path="/" docBase="" debug="0" reloadable="true" cookies="true" />
    note the "/" instead of "gnum.info"
    Kevin

  • New error with upgrade jboss/tomcat: "Connection handle has been closed and is unusable"

    Hi,
    This error suddenly appeared when we upgraded from jboss3/tomcat5.0 to jboss4.2/tomcat5.5.
    here's the usecase:
    1) User clicks on report link
    2) Crystal reports web componnent displays screen to fill in report parameters.
    3) user enters parameters and clicks submit
    4) System throws Exception
    The same reports worked fine with jboss 3.2.6/tomcat 5.0. We haven't touched anything in this realm.
    Log Excerpt:
    09:42:18,842 INFO  [datasource] Openning rowset
    09:42:18,904 ERROR [reportdefinition] com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Connection handle has been closed and is unusable
    09:42:18,905 ERROR [datasource] Failed to open rowset: the query failed to open rowset
    com.crystaldecisions.reports.reportdefinition.datainterface.g: JDBC Error: Connection handle has been closed and is unusable
         at com.crystaldecisions.reports.reportdefinition.datainterface.d.a(Unknown Source)
    To try to narrow down the problem, I've updated the jdbc configuration to
         <track-statements>true</track-statements>   
    here's a recap:
    This Boolean element specifies whether to check for unclosed statements when a connection is returned to the pool. If it is true, a warning message is issued for each unclosed statement. If the log4j category org.jboss.resource.adapter.jdbc.WrappedConnection has trace level enabled, a stack trace of the connection close call is logged as well. This is a debug feature that can be turned off in production.
    Interestingly enough, this error appears slightly upstream:
    (CachedConnectionManager.java:526) - Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@c76003
    java.lang.Throwable: STACKTRACE
         at
    org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
         at com.crystaldecisions.reports.queryengine.driverImpl.k.a(Unknown Source)
         at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.new(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ba.try(Unknown Source)
         at com.crystaldecisions.reports.common.av.a(Unknown Source)
         at com.crystaldecisions.reports.common.ag.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.e.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown
    So the question arises:
    1) Is the jboss datasource overly/aggressively closing result sets?
    2) or is there a coding error in CRXIR2?
    thanks,
    bill
    Full stack trace:
    [2008-03-13 17:26:18,905] [INFO ] org.jboss.resource.connectionmanager.CachedConnectionManager (CachedConnectionManager.java:526) - Closing a connection for you.  Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@c76003
    java.lang.Throwable: STACKTRACE
         at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
         at com.crystaldecisions.reports.queryengine.driverImpl.k.a(Unknown Source)
         at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.new(Unknown Source)
         at com.crystaldecisions.reports.queryengine.av.byte(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.b.a(Unknown Source)
         at com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.ba.try(Unknown Source)
         at com.crystaldecisions.reports.common.av.a(Unknown Source)
         at com.crystaldecisions.reports.common.ag.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.e.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.z.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ak.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ad.int(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.bk.for(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.v.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.v.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(Unknown Source)
         at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(Unknown Source)
         at org.apache.jsp.reports.processreport_jsp.switchTables(processreport_jsp.java:131)
         at org.apache.jsp.reports.processreport_jsp.loadReport(processreport_jsp.java:68)
         at org.apache.jsp.reports.processreport_jsp._jspService(processreport_jsp.java:227)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.shared.pagecache.client.PageCacheFilter.doFilter(PageCacheFilter.java:760)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.ExpiredPasswordFilter.doFilter(ExpiredPasswordFilter.java:92)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.pe.channels.client.servlet.ChannelUrlFilter.processUrl(ChannelUrlFilter.java:168)
         at com.participate.pe.channels.client.servlet.ChannelUrlFilter.doFilter(ChannelUrlFilter.java:100)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.BlockIpAddressFilter.doFilter(BlockIpAddressFilter.java:224)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.outstart.multiapp.filters.KeepOtherSessionsAliveFilter.doFilter(KeepOtherSessionsAliveFilter.java:88)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.participate.util.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:151)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)

    <p>
    OK. I found the problem along with a workaround.
    </p>
    <p>
    <strong>The problem:</strong>
    </p>
    <p>
    a programming practice clashes with a new jboss 'safety check'.
    </p>
    <p>
    <strong>Programming practice:</strong>
    </p>
    <p>
    crystal reports gets a database connection in one jsp page, then tries to use it on another jsp/servlet
    </p>
    <p>
    <strong>Jboss safety check:</strong>
    Jboss/tomcat new comes configured out-of-the-box with a 'cached connection
    manager', which
    </p>
    <p>
    "Check[s] for unclosed connections and transaction terminated checks in servlets/jsps."
    </p>
    <p>
    <strong> Summary</strong>
    </p>
    <p>
    In short, if a servlet/jsp ends and it leaves a database connection open, Jboss will automatically close it.
    </p>
    <p>
    </p>
    <p>
    <strong>Workaround:</strong><br />
    Comment out two entries in these two files:
    </p>
    <p>
    1) conf/jboss4/pe/deploy/jboss-web.deployer/server.xml
    </p>
    <p>
    2) conf/jboss4/pe/deploy/jboss-web.deployer/META-INF/jboss-service.xml
    </p>
    <p>
    The two entries:
    </p>
    <p>
    </p>
    <p>
    1)
    </p>
    <p>
                 <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"<br />
                    cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"<br />
                    transactionManagerObjectName="jboss:service=TransactionManager" /><br />
    </p>
    <p>
    2)
    </p>
    <p>
          <depends>jboss.jca:service=CachedConnectionManager</depends><br />
    </p>
    <p>
    </p>
    <p>
    <strong>Comments on the workaround</strong>
    </p>
    <p>
    The 'cached connection manager' basically makes sure that the application cleans up after bad programmers. It seems most helpful in development, load testing, or trouble shooting.
    </p>
    <p>
    In production,  you can likely  comment them out with minimal
    impact on the application.
    </p>

  • How do I add data to HTTP response headers in Tomcat?

    Hello
    I am in the process of making our site Platform for Privacy Preferences(P3P) compliant. We are running Tomcat 3.2.2(standalone) on a Linux box. I am looking for information regarding adding data to HTTP header responses(see example below). One of the aspects of P3P compliancy is referencing where a Policy is located and referencing the "Compact Policy" via the "CP" tag. I need to add these values and as I am
    new to Tomcat I need know where to find the header information.
    <!-- example -->
    HTTP/1.1 200 OK
    P3P: policyref="http://somesite.com/P3P/PolicyReferences.xml",
    CP="NON DSP COR CURa ADMa DEVa CUSa TAIa OUR SAMa IND"
    Content-Type: text/html
    Content-Length: 8104
    Server: ...
    ...content...
    <!-- end example -->
    Any suggestions would be appreciated.
    Joe Dalessandro
    e: [email protected]

    Hmm... If you check your server.xml -file, you'll probably find that Tomcat has been configured to use org.apache.tomcat.service.http.HttpConnectionHandler as the connection handler (right under the "Connector classname" value)...
    Would it be possible to tweak that handler or extend it in such a way that you could add your headers?
    Unfortunately I don't work with Tomcat myself, otherwise I could try it...
    If this seems too complicated, I'd just recommend you to install Apache, and do it there...

  • How to create connection pooling in Tomcat 5.0

    present i am developing one web site in that i am using tomcat 5.0
    i am trying to establish connection pooling in tomcat,i am facing some problems..
    tomcat throws the following exception ie.,
    cannot create JDBC Driver class for connect URL null.
    my code lik this
    i configured the web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>sqlserver</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    my server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server>
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase"/>
    <Resource auth="Container" name="sqlserver" type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sudha</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>sudha</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="sqlserver">
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:SQL</value>
    </parameter>
    <parameter>
    <name>validationQuery</name>
    <value>select * from employee</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>8</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>kpi</value>
    </parameter>
    <parameter>
    <name>factory</name>
    <value>org.apache.naming.factory.DbcpDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>kpi</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="8080" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
    <Host appBase="webapps" name="localhost">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
    </Host>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
    </Service>
    </Server>
    and i studied the the tomcat documentation in that tomcat mentioned
    The configuration properties for Tomcat's standard data source resource factory (org.apache.naming.factory.DbcpDataSourceFactory) are as follows:
    driverClassName - Fully qualified Java class name of the JDBC driver to be used.
    maxActive - The maximum number of active instances that can be allocated from this pool at the same time.
    maxIdle - The maximum number of connections that can sit idle in this pool at the same time.
    maxWait - The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception.
    password - Database password to be passed to our JDBC driver.
    url - Connection URL to be passed to our JDBC driver. (For backwards compatibility, the property driverName is also recognized.)
    user - Database username to be passed to our JDBC driver.
    validationQuery - SQL query that can be used by the pool to validate connections before they are returned to the application. If specified, this query MUST be an SQL SELECT statement that returns at least one row.
    how to configure server.xml file
    and how to get the org.apache.naming.factory.DbcpDataSourceFactory
    please help me...this module is very very urgen to me..

    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

  • How to create Connection pool in Tomcat 5

    present i am developing one web site in that i am using tomcat 5.
    i am trying to establish connection pooling in tomcat,i am facing some problems..
    tomcat throws the following exception ie.,
    cannot create JDBC Driver class for connect URL null.
    my code lik this
    i configured the web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>sqlserver</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    my server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server>
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase"/>
    <Resource auth="Container" name="sqlserver" type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sudha</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>sudha</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="sqlserver">
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:SQL</value>
    </parameter>
    <parameter>
    <name>validationQuery</name>
    <value>select * from employee</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>8</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>kpi</value>
    </parameter>
    <parameter>
    <name>factory</name>
    <value>org.apache.naming.factory.DbcpDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>kpi</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="8080" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
    <Host appBase="webapps" name="localhost">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
    </Host>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
    </Service>
    </Server>
    and i studied the the tomcat documentation in that tomcat mentioned
    The configuration properties for Tomcat's standard data source resource factory (org.apache.naming.factory.DbcpDataSourceFactory) are as follows:
    driverClassName - Fully qualified Java class name of the JDBC driver to be used.
    maxActive - The maximum number of active instances that can be allocated from this pool at the same time.
    maxIdle - The maximum number of connections that can sit idle in this pool at the same time.
    maxWait - The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception.
    password - Database password to be passed to our JDBC driver.
    url - Connection URL to be passed to our JDBC driver. (For backwards compatibility, the property driverName is also recognized.)
    user - Database username to be passed to our JDBC driver.
    validationQuery - SQL query that can be used by the pool to validate connections before they are returned to the application. If specified, this query MUST be an SQL SELECT statement that returns at least one row.
    how to configure server.xml file
    and how to get the org.apache.naming.factory.DbcpDataSourceFactory
    please help me...this module is very very urgen to me..

    I spent many hours when i first implemented connection pooling trying to put it together. The information is scattered and the config has changed slightly from 5.0 to 5.5 etc. This is how I got it working in 5.5.17:
    * server.xml seems to be a wrong place for the pool configuration if you consider it to be an application specific thing. It might be a better idea to put it into C:\tomcat55\conf\Catalina\localhost\ConfigFileForYourWeapp.xml as follows:
    <Context path="/ClientLink" docBase="C:\eclipseWorkspace\PortfolioUI3\WebRoot">
          <Resource name="jdbc/testportfolios" auth="Container"
                         type="javax.sql.DataSource"
                         factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
                         username="****" password="******"
                         driverClassName="com.mysql.jdbc.Driver"
                         url="jdbc:mysql://192.168.0.101:3306/testportfolios?user=***********&password=***********&useUnicode=true&characterSet=swedish"
                         maxWait="10000" maxActive="30" maxIdle="10" removeAbandoned="true"
                         removeAbandonedTimeout="60" logAbandoned="true" testWhileIdle="true"
                         minEvictableIdleTimeMillis="4000"
                         timeBetweenEvictionRunsMillis="60000" validationQuery="SELECT '1'" />
          </Context>* Then add the following snippet into web.xml in your webapp directory:
    <resource-ref>
                    <description>Database pool defined in ClientLink.xml</description>
                    <res-ref-name>jdbc/testportfolios</res-ref-name>
                    <res-type>javax.sql.DataSource</res-type>
                    <res-auth>Container</res-auth>
               </resource-ref>* Next put the jdbc-driver jar in a place where tomcat can find it. That is common\lib. Note that the shared/lib does not work.
    * Get connections in java as follows:
                    try {
                         Context initCtx = new InitialContext();
                         DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/testportfolios");
                         this.connection = ds.getConnection();
                    } catch (NamingException e) {
                         throw new RuntimeException("Java naming exception when getting connection from tomcat pool: " + e.getMessage());
                    }I hope that this helps you to save the time I lost figuring this out!
    Message was edited by:
    Tomppu

  • CCM and Tomcat 5.5.20

    We have Inxight SDX Admin Server already installed and it has it's own Apache. We installed Tomcat 5.5.20 seperately and BOE XI 3.1. It tried to point to the Inxight Apache and the CCM won't start the Tomcat. How can we repoint the CCM Tomcat to the newly installed Tomcat that works?

    We have a tried a similar approach with Crystal Reports Server 2008, installing it side by side a previous version of CR.  I'm not sure how BOE XI 3.1 works, but is TOMCAT installed and configured within the installer app of BOE XI?   In our case it was.   I went ahead and uninstalled CRS2008 and reinstalled, making sure on the install setup to have TOMCAT point to a different port than our previous installation did.  This allowed CRSXI to access a previous version of TOMCAT configure for port X, and CRS2008 to access the newest version of TOMCAT on port Y. 
    Hope this helps!

Maybe you are looking for

  • How do I transfer old masters from a vault to a new machine

    I have Aperture Masters on an old iMac, saved into a vault on an external hard disk . I bought a new iMac and want to bring the originals from my old machine onto the new machine. Presumably, I can download them from the vault to the new machine, but

  • Problem with Windows 8.1 and iTunes

    Hi Apple Support I use windows 8.1. on my laptop and I have a problem with iTunes after the latest version. When I connect my iPhone, iTunes doesn´t work ( I cannot see my iPhone on iTunes) and when I connect my iPod nano the latest version, it is wr

  • What are the different iPhone 5 model numbers?

    What do the different model numbers mean for the iPhone 5?  I see some that start with an "A" and some that start with "MD"?  Which model is for what?

  • How to install Mac OS 10.1 on iBook G4 mid-2005

    Hi. I have just bought a vintage copy of Mac OS 10.1 for my iBook G4, not realizing that I can't strictly speaking install the OS on the machine. I read that some people have done it, but I am running 10.4.11, and I was wondering how I can dual boot

  • Link Material Type Item Category

    Hi, How can i make the link between the material type and the item category when the material has NO BOM ? Otherwise each time a PM order si created the item category has to be filled (stock or no stock). I know it is there i just can't find it. Than