Configuring classpath in Tomcat 4.1.12

Hi,
I have an existing system which consists of JSP files and jars running on Tomcat 3.2.1 on Linux 6.1 platform. I have to upgrade it to Tomcat 4.1.12 on Red Hat Linux 8.0. However, now I am having problems in loading the jar files. Before the jars were under a different location than the Tomcat location as also the JSP files. and i used to simply run a script to load the jars on to the classpath, after i start the Tomcat server. However, now in the new system I am not being able to load the jars in the classpath. Tomcat simply won't find the jar files. How do I point Tomcat to the jar location? I would also like to mention here that I am being able to load the JSP files. In the context path, under server.xml, i am pointing the docbase to my application path. Is there any option to point to my classes also here?
I am using a similar context path as below:
<Host name="myapplication.com">
<Context path=""
debug="0"
docbase="/home/opt/myapplication/myfiles"
crossContext="true"
reloadable="true"
trusted="false"
>
Also I am not using WARs
If somebody can suggest any solution it will surely be a great help.
Thanking you in advance,
Regards,
Kaustuv Sharma

or even put links to the jar files in .../common/libhi,
so i put links to the jar files from common/lib in catalina.sh?
coz, i tried this option by editing the catalina.sh file. But I got the following exception: "Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException"
malcolmmc did u mean this?...or is there any other way where i put a link to my jar files in common/lib...?

Similar Messages

  • How to Install and Configure Java and Tomcat

    Hi Everybody,
    I am using the following versions of java and tomcat:
    JAVA: j2sdk-1_4_2_13
    Tomcat: jakarta-tomcat-5.0.5
    I tried to configure several times both but everytime the result is the same. I am setting the following variables:
    PATH: .;D:\j2sdk1.4.2_13\bin;D:\Tomcat 5.0\bin
    CLASSPATH: .;D:\j2sdk1.4.2_13\lib;D:\Tomcat 5.0\common\lib\servlet-api.jar
    JAVA_HOME: D:\j2sdk1.4.2_13
    Please correct what mistake i am doing again and again. I appreciate your effort.
    Thanks in advance.
    Himanshu

    Fine sir, I will tell evrything in detail what steps i am following during installation and configuring java and Tomcat.
    1) I am using the following versions(exe) of java and tomcat:
    JAVA: j2sdk-1_4_2_13-windows-i586-p
    Tomcat: jakarta-tomcat-5.0.5
    2) Then, i follow exactly the same variable names and values to configure java as mentioned below to make java work under User variables header:
    PATH: .;D:\j2sdk1.4.2_13\bin
    CLASSPATH: .;D:\j2sdk1.4.2_13\lib
    JAVA_HOME: D:\j2sdk1.4.2_13
    Above steps i follow only for installing java. And it also not working properly. If i run my .java file from the destination of the file then it will be execulted but if i try to execute from any other location then it doesn't, it shows the following message in the DOS prompt:
    error: cannot read: Hello.java
    1 error
    Now, please correct what mistake i am doing.
    Thanks
    Himanshu

  • Configure Timeout in Tomcat

    Hi,
    We want to configure timeout in tomcat, but we are not able to do so by configuring the ~conf/web.xml. Our requirement is to configure http timeout to be 2 seconds.
    Pl. help
    ShekharA

    Which timeout are you talking about? 2 seconds is very short. The HttpSession timeout can only be set in minutes.

  • Configure the embedded Tomcat Server

    Hello,
    is there a documentation which tells me how to configure the embedded Tomcat Server in the Oracle Content Server? I can't get it work.
    When I try to start an web application from "JSP Server Web App Admin" I get the following error message:
    Content Server Request Failed
    csJspServerErrorAddWebAppService Failed to add context /idc/groups/jsp/documents/adacct/hello. Unable to execute service method 'addContext'.
    [ Details ]
    intradoc.common.ServiceException: !csJspServerErrorAddContext,/idc/groups/jsp/documents/adacct/hello!csUnableToExecMethod,addContext at intradoc.server.jsp.JspServiceHandler.addContext(JspServiceHandler.java:152) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:461) at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:142) at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:75) at intradoc.server.Service.doCodeEx(Service.java:488) at intradoc.server.Service.doCode(Service.java:470) at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1350) at intradoc.server.Service.doAction(Service.java:450) at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1191) at intradoc.server.Service.doActions(Service.java:445) at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1111) at intradoc.server.Service.executeActions(Service.java:431) at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:632) at intradoc.server.Service.doRequest(Service.java:1709) at intradoc.server.ServiceManager.processCommand(ServiceManager.java:357) at intradoc.server.IdcServerThread.run(IdcServerThread.java:195) Caused by: intradoc.common.ServiceException: !csJspServerErrorAddContext,/idc/groups/jsp/documents/adacct/hello!csUnableToExecMethod,addContext at intradoc.server.jsp.JspProvider.addContext(JspProvider.java:391) at intradoc.server.jsp.JspServiceHandler.addContext(JspServiceHandler.java:116) ... 19 more
    And it is also not possible to use jsp layout pages in Site created in Site Studio. When I try to load pages using a jsp layout page the browser displays a blank page.

    Hi,
    Even i am also facing the same issue after following all those steps.
    Please find the error which i m getting.
    csJspServerErrorAddWebAppService The target file cannot be accessed. Unable to rename the file 'F:\stellent\indxpdod2\weblayout\groups\chanpart\@cccd\documents\manufacturing\enhstellsrchint' to 'F:\stellent\indxpdod2\weblayout\groups\chanpart\@cccd\documents\manufacturing\enhstellsrchint~jsp'.

  • How can in configure mail in tomcat 4.1

    sir ,
    i want to configure tomcat 4.1 server for sending mail from my jsp pages.i got some codes for sending mail using jsp.it needed an smtp server address and default port no. i have theses too.but my problem is
    my smtp server needed user name and password.but in server.xml file has one parameter smtp host name ,how can i giove user name and password in server.xml file

    I guess we all have to go ahead and file bugs with Apple:
    https://bugreport.apple.com (for registered developers only) or
    http://www.apple.com/feedback/macosx.html (everyone)
    Andreas

  • How to configure datasources in tomcat 4.1.12 to obtain OracleResultSets

    Hi!
    Since my application running under both OracleAS and Tomcat 4.1.12 should obtain connection pooling i tried to configure the application servers. Our application makes use of OracleResultSet. I configured OracleAS by editing the data-sources.xml file which works very well:
    <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OracleDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="scott"
    password="tiger"
    url="jdbc:oracle:thin:@testdb:1525:ORA5"
    inactivity-timeout="30"
    />
    The code for jndi lookup is here. It works fine when i cast ResultSet to OracleResultSet using OracleAS:
    initCtx = new InitialContext();
    envCtx = (Context) initCtx.lookup("java:comp/env");
    dataSource = (DataSource) envCtx.lookup("jdbc/OracleDS");
    con = dataSource.getConnection();
    ResultSet rs = con.executeQuery("..");
    OracleResultSet orars = (OracleResultSet)rs;
    Then i configured tomcat 4.1.12 server.xml file:
    <Resource name="jdbc/OracleDS" auth="Container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/OracleDS">
    <parameter><name>username</name><value>scott</value></parameter>
    <parameter><name>password</name><value>tiger</value></parameter>
    <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter>
    <parameter><name>url</name><value>jdbc:oracle:thin:@testdb:1525:ORA5</value></parameter>
    </ResourceParams>
    The same source for jndi lookup brings up a ClassCastException at line
    OracleResultSet orars = (OracleResultSet)rs;
    Therefore i tried to add a new parameter in tomcats server.xml:
    <parameter><name>factory</name><value>com.evermind.sql.DriverManagerDataSource</value></parameter>
    Now following exceptions occurs:
    javax.naming.NamingException: Could not create resource factory instance, com.evermind.sql.DriverManagerDataSource
    java.lang.Object org.apache.naming.factory.ResourceFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
    I have oc4j.jar and classes12.jar in tomcats home directory under config/lib.
    How should i configure tomcat to be able to use connection pooling and OracleResultSets?
    Thanks in advance!
    thomas

    ?

  • Classpath in tomcat.bat for jdbc driver (jsp page)

    Dear Friends,
    I am able to run my java program with Microsoft JDBC driver from console (dos prompt).
    But, when i am trying to run JSP program on browser using, the same driver, it is saying classNotFoundException().
    do i need to set the classpath for Microsoft jdbc driver in my tomcat.bat ?
    Please help me, what changes do i have to do in tomcat.bat to run the microsoft jdbc driver for jsp application.
    If anyone having idea, please share ur valuable ideas.
    thanks in advance.
    yours
    Rajesh
    [email protected]

    If the driver is packed in a jar-file, you can just place the jar in the lib directory of Tomcat. If it's not, you can pack it in a jar and do the same thing:)

  • Datasource Configuration problem with Tomcat-4.0.3

    Hi All !
    When I trying to open connection to my DB2 database in tomcat -4.0.3,
    I have put db2java.jar in /usr/local/jakartha-tomcat-4.03/common/lib directory
    when I am trying to connect Database through my servlet getting expections
    java.lang.NullPointerException: at DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    here is my dbconnection class
    package com.ebizon.util.jdbc;
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import javax.sql.*;
    public class DBUtil {
    /* Ebizon DB Connection for Tomcat */
    public static Connection getEbizDBConnection() throws NamingException, SQLException {
    Connection conn = null;
    try {
    InitialContext initCtx = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    conn = ds.getConnection();
    } catch (NamingException ne) {
    throw ne;
    } catch (SQLException se) {
    throw se;
    return conn;
    And my resource definition in server.xml (/usr/local/jakartha-tomcat-4.0.3/conf/server.xml)
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_DBTest_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/SmsDBDS"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/SmsDBDS">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- DB2 dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>smsdb</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>smsdb</value>
    </parameter>
    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
    <name>driverClassName</name>
    <value>COM.ibm.db2.jdbc.app.DB2Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:db2:smsdb</value>
    </parameter>
    </ResourceParams>
    </Context>
    this is my Web Application descriptor /WEB-INF/web.xml
    <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/EmployeDB
    </res-ref-name>
    <res-type>
    javax.sql.DataSource
    </res-type>
    <res-auth>
    Container
    </res-auth>
    </resource-ref>
    Please look at once above , Do i missing any thing?
    Anyhelp is greatly appreciate
    Many thanks in advance
    With Regards
    Madhu Reddy

    I don't see any problem with your files, so unfortunately I can't help. Since this forum is about the J2EE SDK, people may not have that much experience with standalone Tomcat. You may want to try the Tomcat user mailing list for a question about Tomcat: http://jakarta.apache.org/site/mail2.html

  • DB2 Configuration problem with Tomcat-4.0.3

    When I trying to open connection to my DB2 database in tomcat -4.0.3,
    I have put db2java.jar in /usr/local/jakartha-tomcat-4.03/common/lib directory
    when I am trying to connect Database through my servlet getting expections
    java.lang.NullPointerException: at DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    here is my dbconnection class
    package com.ebizon.util.jdbc;
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import javax.sql.*;
    public class DBUtil {
    /* Ebizon DB Connection for Tomcat */
    public static Connection getEbizDBConnection() throws NamingException, SQLException {
    Connection conn = null;
    try {
    InitialContext initCtx = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    conn = ds.getConnection();
    } catch (NamingException ne) {
    throw ne;
    } catch (SQLException se) {
    throw se;
    return conn;
    And my resource definition in server.xml (/usr/local/jakartha-tomcat-4.0.3/conf/server.xml)
    <Context path="/DBTest" docBase="DBTest"
    debug="5" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="localhost_DBTest_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/SmsDBDS"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/SmsDBDS">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- DB2 dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>smsdb</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>smsdb</value>
    </parameter>
    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
    <name>driverClassName</name>
    <value>COM.ibm.db2.jdbc.app.DB2Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:db2:smsdb</value>
    </parameter>
    </ResourceParams>
    </Context>
    this is my Web Application descriptor /WEB-INF/web.xml
    <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/EmployeDB
    </res-ref-name>
    <res-type>
    javax.sql.DataSource
    </res-type>
    <res-auth>
    Container
    </res-auth>
    </resource-ref>
    Please look at once above , Do i missing any thing?
    Anyhelp is greatly appreciate
    Many thanks in advance
    With Regards
    Madhu Reddy

    Hi,
    I have same problem. But unfortunately there does not exist a solution.
    You can read the explanation of this topic at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Non%20DBCP%20Solutions
    Non DBCP Solutions. I understand Tomcat supports only MySQL, PostgreSQL, and Oracle 8i but not DB2.
    DataSource ds = (DataSource)envContext.lookup("jdbc/SmsDBDS");
    Up to now everything is fine, ds is not null, but inside ds (password, url, username...) all of them are null
    So when you execute conn = ds.getConnection(); there will be exception.
    If you find any solution please inform me.
    [email protected]

  • Urgent : How to include Win2K CLASSPATH  to Tomcat 4.2

    I am running a web application on Tomcat 4.1
    Tomcat 4.1 uses CATALINA_HOME and JAVA_HOME
    enviroment variables and from my knowledge of the settings
    it does not utilise the Win2K CLASSPATH variable.
    I use a number of *.properties files to access values and variables
    so I need to set the startup program of Tomcat to include CLASSPATH.
    Is this possible ?
    Secondly is there any other way of making the web application recognise
    these property files .
    Based on some suggestions I tried including the files with classes
    and adding a zip file.
    It works fine with Tomcat 3.2.4 as it includes CLASSPATH on startup.
    Could anyone suggest the solution for this as I searched the Tomcat websites and could not find a solution.
    Thanks
    manosham

    I looked at the Tomcat 4 startup file and it looks like it overwrites CLASSPATH in the bin/setclasspath.bat file. You can get around that by modifying that file. Look for this line near the end:
    set CLASSPATH=%JAVA_HOME%\lib\tools.jar... and change it to ...
    set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%Hope that helps :)

  • How to edit CLASSPATH in TOMCAT?

    Hello...
    How can I access my classes in my JSP file if I use Tomcat?
    I have put classes12.zip in my classpath (my java console
    application recognized the classes). But my JSP (through
    TOMCAT) cannot recognized the classes.
    Please help.
    Thank you.

    Tomcat generally ignores the CLASSPATH environment variable. Typically shared classes are copied to TOMCATHOME/lib (ZIPs and JARs)
    I've heard from many peer developers not to use zip but to rename them to JAR. Not sure why though; I've had success using both.
    - Chris

  • Setting classpath in Tomcat on AIX

    Hi All
    Can any one know how to set classpath for jsf application in tomcat on AIX.

    Refer to the Tomcat's documentation regarding classpaths and classloading. The underlying operating system doesn't really matter.

  • Setting Classpath in TomCat 5.5 for Custom Application

    I seem to have messed up my application. I cant access some of my java classes written and deployed in the WEB-INF/classes directory from a JSP Page stored in my app root.
    However, the fun part of this is if I create a package in WEB-INF/classes, store my java/class files in it and access these from the JSP using import, it works pretty fine. I'm unable to debug the scenario.
    I've given only the context path for the application in the server.xml. I suppose that would be sufficient for my application to be deployed, and need not specify any other classpaths anywhere.
    Please help me and correct me if i'm wrong.
    fun_one

    As of Java 1.4, if any class is in a package, then it can no longer access or import classes from the default (non) package.
    As of Tomcat 5.0, all TC classes, including the translated JSP pages, are in a package. That means that they can not access your classes that are not in a package.
    Your only option is the best one you should always do anyway: put all the classes in a package.

  • How can I add classpath in tomcat 4.0.3

    I am sorry to ask a newbie question but I am really dying to know the answer.
    I have tomcat4.0.3 installed and working.
    I have j2ee1.3.1 install and working.
    I have jboss3.0.0RC installed and working.
    now I want to use a EJB in tomcat application,
    the source file compile correctly.
    but I type http://192.168.100.24/tomcat/servlet/FirstServlet
    a ServletException throwed,tomcat complain javax.ejb.EJBHome class
    cannot be founded.
    I think it is a problem about classpath.but the environment variable
    classpath has included j2ee.jar and when I use j2ee to develop an
    web application I have never met such case.later I found a article
    says tomcat4.0.3 don't use system classpath.
    then I found a file named setclasspath.bat in bin directory,
    and I change the line 'set CLASSPATH=%CLASSPATH%' to
    'set CLASSPATH=%CLASSPATH%;%J2EE_HOME%\lib\j2ee.jar'
    but the tomcat cannot startup.
    how should I do.
    BTW,how to get the information about tomcat fail to startup

    Throw your j2ee.jar into the WEB-INF\lib directory of your web app module. The servlet should pick it up there.

  • How to configure SSL in tomcat and transfer data through HTTPS.

    Hi all,
    I hav an urgent requirement for transfering data through HTTPS.But hav no idea how to achieve that,using SSL.
    For that i have to configure tomcat.What and all i hav to do
    download and which and all files i hav to alter for configuring the tomcat.
    seeking for ur help,
    thank you

    Multi-posted.
    http://forum.java.sun.com/thread.jspa?threadID=591116&messageID=3079266#3079266
    http://forum.java.sun.com/thread.jspa?threadID=591062&messageID=3078566#3078566
    http://forum.java.sun.com/thread.jspa?threadID=590987&messageID=3077736#3077736

Maybe you are looking for

  • Application Switching not working in Spaces

    I'm having some trouble with Spaces and Application switching. Randomly the feature that switches the space to the right Application when you click on the dock stops working. The menu bar will change to the right application but the window and space

  • ITunes gift cards for movies on AppleTV?

    Hi, guys. I got a couple iTunes gift cards that I have been accumulating. Can I use these to buy movies on my AppleTV for purchase or rent? Thanks for any help.

  • Keyboard and a mouse for the ipad

    hi,i do know that there is a keyboard for the ipad that works by bluetooth, but i want to know if there is also a mouse for the ipad (by bluetooth or usb) and how could i get one and configurate it.

  • Issue While executing the Query for Pagination using ROWNUM with like

    Issue While executing the Query for Pagination using ROWNUM with like. Database is Oracle11G. Oracle Database Table contains 8-9 lakh records 1) SQL equal (=) SELECT /*+ FIRST_ROWS(n) */ ROWNUM RNUM, A.* FROM LINE A WHERE A.REFERENCE = 'KMF22600920'

  • Guest two node Failover Cluster with SAS HBA and Windows 2012 R1

    Hi all, i have two IBM x3560 brand new servers with V3700 IBM Storage. The Servers are connected to the storage through four SAS HBA adabters (two HBA's on each server). I want to create a two node guest Fileserver Failover Cluster. I can present the