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 :)

Similar Messages

  • 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 config the CLASSPATH for Tomcat 4.0???

    I use a JavaBean in a JSP file. And I use this JavaBean to connect to Oracle. Database username and password is stored in a file named "db.properties". When I browse this JSP page, It report : Cant not find db.properties file!!!
    So I want know is where can I put this "db.properties"??Do I need config CLASSPATH or other para??
    need your help!!
    Thanks in advance!!!

    did you try to put it into the /lib/ directory of your webapplication ?
    I would solve this differently, I would create a servlet that takes initial parameters and puts them into the servlet context. then I would use that to put these information into the servletcontext.
    Then you would not have to load a properties file everytime u access the jsp pages that does the database related procedure.
    Maybe there is some place for system properties files, but this place I have not seen or how to work with it.
    I place my configuration files all under web-inf/config/ and then I mapp paths to it and read as the web application starts.
    hope it helps.
    -reynir

  • How to include external jars - URGENT...

    Hi:
    I am using Eclipse for development.
    My application uses some external jars.
    This step is simple in Eclipse, one simply indicates where the jars are to the IDE.
    However, when I make an executable JAR file from my project, those external JARs are not included.
    So when I run my program, everything is fine until the parts that uses the external JARs.
    Does anyone know how to include them outside of Eclipse platform?
    I am going to see my client in an hour and of course I can't bring my source and install an Eclipse at my client's computer to show them my demo...
    please help... thanx...

    You add those external jars to the classpath or the jars classpath if you're running the program from a jar. Or put the external jar to JAVA_HOME\lib\ext (IIRC)

  • URGENT can anyone let me know how to include sort buttons in table maintian

    hi
    can anyone let me know how to include sort buttons in table maintianence
    as generally table maintianec done have sort buttons i need to include the sort buttons kindly let me know on that asap
    or can we use module pool in between table maintianece screen
    if yes how touse and how to cod for that
    regards
    Arora

    You can change the coding of Table Maintenance.
    >> Goto SM30, give table name and goto Display/Maintain mode and copy all the GUI status from standard program into your function group. Add sort button in the GUI Status of Maintain & Display mode.
    >> Goto to tablemaintenance screen generated using SE51.
    >> Select change mode.
    >> After PROCESS BEFORE OUTPUT, create one module to assign your function group program name to " X_HEADER-GUI_PROG = "
    >> In PROCESS AFTER INPUT, add another module at the end to perform the action.
    -Alpesh.Saparia

  • How to Including Graph in Forms 6i Please Help Urgent

    How to include graph developed through graphic builder in the form 6i.
    Amir Sajjad

    1. attach the library og.pll.
    3. create a chart item.
    2. create a trigger and call procedure
    og.open to specify which graph display file .ogd is to be included in which
    chart item.
    If you want to see more details then see
    help of form builder
    1. click help menu
    2. click que cards
    3. click using chart item.

  • How to set the classpath for external .jar files after importing?

    Hi techs,
    How to set the classpath in WSAD5.1.2 after importing the .jar file to the WEB-INF/lib folder.
    urgent

    I got it.
    after importing the jar file to the perspective,we need to right click on project name, go to proprties,
    goto java build path,
    there we need to include the external jar files.

  • How to include a jsp page in another jsp jsp page

    hi,
    i m trying to include a jsp page name "header.jsp" into one jsp page name"selectattribute.jsp" i m using these commands in "selectattribute.jsp"
    <%@include file "header.jsp"%> bcz both these jsp page are C:\program files\tomcat 4.0\webapps\examples\jsp\Poject\
    but the problem is that , i m invoking this jsp page "selectattribute.jsp" from a servlet reportcontroller.java using REQUEST DISPATCHER.
    the servlet is in
    C:\Program files\tomcat 4.0\webapps\examples\WEB-INF\classes\Project\
    i want to know how to include some other jsp page in a jsp page and how to invoke applet from jsp page when that particular jsp page is being invoked by servlet.
    plz help
    manish

    use this for including in your selectattribute.jsp
    <jsp:include page="header.jsp" flush="true"/>
    I never tried calling an applet. I think you can write the code for calling the applet in a javabean method and call the method in the jsp

  • How to include .jar files in coldfusion code 

    To Integrate our cfm code with paypal jar files we do the
    following steps with our local coldfusion server ,and to run and
    integrate the paypal Java SDK jar files, I think we need to do the
    same process on the server, can you suggest any thing to do the
    following setting for my domain on the server, without setting the
    class path in coldfusion administrator.
    The ColdFusion application server must be configured to know
    the location of the PayPal JAR
    files, and your ColdFusion Markup (CFM) pages must be
    configured with the absolute path to
    the PayPal API certificate for the PayPal API user on whose
    behalf the calls are made.
    1. Install the PayPal Java SDK “Installing the
    SDK”.
    2. Copy a subset of the Java SDK JAR files to a location
    accessible by the ColdFusion
    application server. The JAR files are in SDK_root\lib and
    their exact names are as
    follows:
    – bcmail-jdk14-128.jar
    – bcprov-jdk14-128.jar
    – paypal_base.jar
    – paypal_stubs.jar
    sax2.jar
    – xerces.jar
    – xpp3-1.1.3.4d_b4_min.jar
    – xstream.jar-1.1.3.jar
    3. With the ColdFusion Application Server Administrator, add
    the absolute path of the
    location you determined in Step 2 to the Java and JVM
    CLASSPATH environment variable.
    4. Restart the ColdFusion Application Server.
    Suggest me how to include .jar files without setting
    classpath.

    > Suggest me how to include .jar files without setting
    classpath.
    Copy them to {CF_HOME}\lib, where {CF_HOME} is, for example,
    C:\CFusionMX7. Restart Coldfusion.

  • How to include package

    sir
    i m running an mil application and i have an error in import javax.mail.*
    statement.that package does not exist
    how to include it in path.........
    plz help me out
    thank you
    gaurav

    hi,
    u need to have two jars,namely,mail.jar and activation.jar in your classpath
    to use the javamail apis.hope this is of any help
    bye,

  • How to include custom application.xml in JDev9i project

    Can anybody explain to me how to include a custom application.xml file when deploying to an .ear file? I need to include application wide security roles, and I can't see where in Jev9i how to do this.
    After searching this forum, I see that jdev9i can't include the orion-application.xml, but I want to include just the standard J2EE application.xml. Is this possible?
    Thanks,
    matt

    The standard application.xml file unfortunately can't be customized in JDev 9.0.2. The reasons why this capability was left out of JDev 9.0.2 are same reasons why the other EAR-level XML files were excluded. The OTN thread
    Re: Regarding 11i and E-business suite
    has a summary of those reasons, which you've probably seen. We know this is an area in need of improvement and will be adding this functionality in the JDev 9.0.3 release. Until then, you'll have to go with a work-around like an Ant build file, batch file, Java application, or some other kind of script.
    Below is a sample Java application which can be used to insert <security-role> elements into an EAR file's application.xml. Modify the main() method to customize for your purposes, and put xmlparserv2.jar on the classpath (in a JDev project, add the "Oracle XML Parser v2" library):
    package mypackage4;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    public class PostProcessEAR
    public static void main( String[] args ) throws IOException
    final String earFile = "C:\\temp\\myapp.ear";
    final PostProcessEAR postProcess = new PostProcessEAR( earFile );
    postProcess.addSecurityRole( null, "first_role" );
    postProcess.addSecurityRole( "Description for the second role", "second_role" );
    postProcess.commit();
    System.out.println( "Done." );
    private final File _earFile;
    private final ArrayList _securityRoles = new ArrayList();
    public PostProcessEAR( String earFile )
    _earFile = new File( earFile );
    public void addSecurityRole( String description, String roleName )
    if ( roleName == null )
    throw new IllegalArgumentException();
    _securityRoles.add( description );
    _securityRoles.add( roleName );
    * Write out modified EAR file.
    public void commit() throws IOException
    if ( _securityRoles.size() == 0 )
    return;
    final ZipFile zipFile = new ZipFile( _earFile );
    final Enumeration entries = zipFile.entries();
    final File outFile = new File( _earFile.getAbsolutePath() + ".out" );
    final ZipOutputStream out = new ZipOutputStream( new BufferedOutputStream( new FileOutputStream( outFile ) ) );
    while ( entries.hasMoreElements() )
    final ZipEntry entry = (ZipEntry) entries.nextElement();
    final InputStream in = zipFile.getInputStream( entry );
    if ( "META-INF/application.xml".equals( entry.getName() ) )
    final XMLDocument modifiedApplicationXml = insertSecurityRoles( in );
    final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
    modifiedApplicationXml.print( byteOutput );
    final int numBytes = byteOutput.size();
    entry.setSize( numBytes );
    if ( entry.getMethod() == ZipEntry.STORED )
    entry.setCompressedSize( numBytes );
    final CRC32 crc32 = new CRC32();
    crc32.update( byteOutput.toByteArray() );
    entry.setCrc( crc32.getValue() );
    out.putNextEntry( entry );
    byteOutput.writeTo( out );
    else
    // Copy all other zip entries as they are.
    out.putNextEntry( entry );
    copy( in, out );
    in.close();
    out.close();
    private XMLDocument insertSecurityRoles( InputStream in ) throws IOException
    final DOMParser domParser = new DOMParser();
    domParser.setAttribute( DOMParser.STANDALONE, Boolean.TRUE );
    try
    domParser.parse( in );
    final XMLDocument doc = domParser.getDocument();
    final Element docElem = doc.getDocumentElement();
    final Iterator iter = _securityRoles.iterator();
    while ( iter.hasNext() )
    final String desc = (String) iter.next(); // might be null
    final String roleName = iter.next().toString(); // must not be null
    final Element securityRoleElem = doc.createElement( "security-role" );
    if ( desc != null )
    securityRoleElem.appendChild( createPcdata( doc, "description", desc ) );
    securityRoleElem.appendChild( createPcdata( doc, "role-name", roleName ) );
    docElem.appendChild( securityRoleElem );
    return doc;
    catch ( SAXException e )
    e.printStackTrace();
    return null;
    private Element createPcdata( XMLDocument doc, String elemName, String pcdata )
    final Element elem = doc.createElement( elemName );
    elem.appendChild( doc.createTextNode( pcdata ) );
    return elem;
    private final byte[] buffer = new byte[4096];
    private void copy( InputStream in, OutputStream out ) throws IOException
    while ( true )
    final int bytesRead = in.read( buffer );
    if ( bytesRead < 0 )
    break;
    out.write( buffer, 0, bytesRead );

  • How to set the CLASSPATH in Unix Server

    Hi, everyone~
    Do anyone noe how to set the CLASSPATH in the hp-ux server? I tried the setenv CLASSPATH, but not working.. I think should use export. But my jsp pages still cannot working, dunnoe y?
    I wonder is the hp-ux support jsp and servlet or not?
    In order to let the jsp and servlet to run properly in the unix server, what kinds of steps should taken ?
    Hope somemore who experience with this situation b4 can give me some guidance.. Thanks~~
    regards,
    tzeyik

    Tomcat ignores any and all CLASSPATH environment variables. Even if you could figure out how to set it, Tomcat wouldn't use it.
    Better to learn how Tomcat's CLASSPATH works and how to deploy Web apps properly. - MOD

  • How to change the classpath in rmiregistry

    I am storing remote object stubs in an RMI registry as part of my application. When I try to bind my objects to the rmiregistry started by the kxs process on port 1099, I get class def not found errors because that rmiregistry does not have my classes in the classpath. My classes are in the iAS classpath because I added them through the registry.
    When I start my own rmiregistry on a different port and set the classpath environment variable to include my classes, then I have no problems.
    Does anyone know how to change the classpath for the rmiregistry started by the kxs process?
    I am running iAS sp3 on Windows 2000 adn Solaris
    Thanks,
    Mark

    Hi,
    I would like to help, but could you kindly clarify what rmiregistry
    means ?
    Regards
    Raj
    Mark Priest wrote:
    I am storing remote object stubs in an RMI registry as part of my
    application. When I try to bind my objects to the rmiregistry started
    by the kxs process on port 1099, I get class def not found errors
    because that rmiregistry does not have my classes in the classpath.
    My classes are in the iAS classpath because I added them through the
    registry.
    When I start my own rmiregistry on a different port and set the
    classpath environment variable to include my classes, then I have no
    problems.
    Does anyone know how to change the classpath for the rmiregistry
    started by the kxs process?
    I am running iAS sp3 on Windows 2000 adn Solaris
    Thanks,
    Mark
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • How to include external files in JSP

    hi,
    How to include external files like image or javascript in to jsp pages.
    I am using MVC frame work. So i have to use request dispatcher. While calling the pages trough dispatcher the external files are missing from the output. Also am using tomcat as server,web.xml(deployment descriptor ) is also configured.
    regards
    sree

    When you use the request dispatcher, the relative path for all your ressources becomes the relative path of your calling serlvet and not the JSP/servlet that you call. Make sure to use the full relative path such as:
    /PATH_TO_YOUR_DIRECTORY/myRessource.ext
    NOT
    SOME_DIRECTORY/myRessource.ext
    Jeff

  • How to include .jars?

    Hello,
    I have been unable to find out how to include in the .ear file generated by wsgen the supporting .jar files that my Web Service EJB needs.
    I thought this could be done with the "classpath" parameter in the wsgen tag in build.xml, but it doesn't seem to do anything.
    Can someone please provide a hint?
    Thanks,
    Pere

    Hi Pete,
    You mentioned the <wsgen> Ant task, so I'm assuming that you're using WLS 6.1
    An automated way to do this, is to include a series of <exec> Ant tasks after
    the <wsgen> one. These <exec> Ant tasks would call the jar.exe and look something
    like this:
    <exec
    dir="."
    executable="jar.exe"
    failonerror="yes"
    >
    <arg line="xvf ${APPLICATIONS}/MyWS.ear myEJB.jar"/>
    </exec>
    <delete dir="myEJB-jar"/>
    <mkdir dir="myEJB-jar"/>
    <exec
    dir="myEJB-jar"
    executable="jar.exe"
    failonerror="yes"
    >
    <arg line="xvf myEJB.jar"/>
    </exec>
    <copy todir="myEJB-jar">
    <fileset dir=".">
    <include name="jar1-used-by-EJB.jar"/>
    <include name="jar2-used-by-EJB.jar"/>
    </fileset>
    </copy>
    <copy todir="myEJB-jar/META-INF">
    <fileset dir=".">
    <include name="MANIFEST.MF"/>
    </fileset>
    </copy>
    <jar jarfile="myEJB.jar" basedir="myEJB-jar" />
    <exec
    dir="."
    executable="jar.exe"
    failonerror="yes"
    >
    <arg line="uvf ${APPLICATIONS}/MyWS.ear myEJB.jar"/>
    </exec>
    I realize this seems like a lot of steps, but they are at least automated :-)
    Note that the contents of the MANIFEST.MF that you copy in must look like this:
    Manifest-Version: 1.0
    Created-By: Ant 1.4
    Class-path: jar1-used-by-EJB.jar jar2-used-by-EJB.jar
    in order for the EJBs to find the newly included .jar files.
    HTH,
    Mike Wooten
    Pere Torrodellas <[email protected]> wrote:
    Hello,
    I have been unable to find out how to include in the .ear file generated
    by wsgen the supporting .jar files that my Web Service EJB needs.
    I thought this could be done with the "classpath" parameter in the wsgen
    tag in build.xml, but it doesn't seem to do anything.
    Can someone please provide a hint?
    Thanks,
    Pere

Maybe you are looking for