Tomcat context confiure

Hello,
I have a problem in the context configure.
My app is in C:\myapp. so I added a line in the right place of tomcat/conf/server.xml with
<Context path="/myapp" docBase="c:\myapp" debug="0" reloadable="true">
But when I start tomcat (http://localhost:8080, works), http://localhost:8080/myapp says /myapp is not available.
I test another way, copy the examples from tomcat/webapps to C:\examplescp, and then added line in the server.xml with <Context path="/examplescp" docBase="C:\examplecp .....
I still get the same error, /examplescp is not available. I tried tomcat3.1, 4.3, and 5.5, all the same error.
Can someone help?
Thanks,
Wayne
--

Thanks, I may messed up the server.xml file. Now I cleaned all and reinstall the tomcat . I just copy the example folder to c and test. It works now,
W
.

Similar Messages

  • Opening an attachment from outside the tomcat context

    I am creating a simple mail software. In my incoming message screen i'm showing all the Attachments as hyperlinks. I want that when the user clicks the hyperlink the Attachment should open in a new browser window.
    My problem is that the attachments are there in a folder outside the tomcat context i.e. in a folder outside the tomcat's folder on the server's c:/Attachments folder.
    If I put the attachments in the root folder of my application under webapps folder it is working properly. But I want to open it from the outside folder c:/Attachments, and also I can't hardcode this path in my code. It can be any path outside tomcat.
    Please help me, if u have any solution.

    Make that path a parameter in web.xml
         <context-param>     
              <param-name>beginyear</param-name>
              <param-value>2004</param-value>          
              <description>starting year of the application</description>
         </context-param>

  • Error in Tomcat --- context start up failed due to previous errors

    Feb 27, 2008 11:05:11 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [/jstl] startup failed due to previous errors
    Feb 27, 2008 11:05:13 AM com.sun.faces.config.rules.ComponentRule end
    WARNING: [ComponentRule]{faces-config/component} Merge(com.mycompany.TabLabel)
    Feb 27, 2008 11:05:13 AM com.sun.faces.config.rules.ComponentRule end
    WARNING: [ComponentRule]{faces-config/component} Merge(com.mycompany.Tree)
    Feb 27, 2008 11:05:13 AM com.sun.faces.config.rules.ValidatorRule end
    WARNING: [ValidatorRule]{faces-config/validator} Merge(com.mycompany.jsf.validat
    or.LATER_THAN)
    Feb 27, 2008 11:05:14 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Feb 27, 2008 11:05:14 AM org.apache.catalina.core.StandardContext startHello frnds i dont understand what should i do? anybody familiar with this kind of error. please let me know in this case what should i do?
    even if i am trying to copy whole files in another folder it shows same msg for that folder too. please help me
    Thankyou everybody

    Hi ,
    I also face this same kind of problem.
    I tried to fix the problem but not work out.
    I got another solution. I am not sure its a current solution .
    Try it carefully.
    Finally 1, I take back up -copy of server.xml and common/lib .
    2, Un-install Tomcat server.
    3, After i have installed fresh tomcat server.
    4, Replace back-up copy of server.xml and common/lib.
    its working fine

  • Tomcat Context Initialized Event

    Hi guys, I am having the following error while using a JNI code..
    - Exception sending context initialized event to listener instance of class com.broadmediatechnology.licence.LicenceManagerContextListener
    java.lang.UnsatisfiedLinkError: init
            at com.broadmediatechnology.getmetvnative.NativeManager.init(Native Method)
            at com.broadmediatechnology.getmetv.server.GetMeTVManager.init(GetMeTVManager.java:38)
            at com.broadmediatechnology.getmetv.server.licence.LicenceManagerContextListener.contextInitialized(LicenceManagerContextListener.java:18)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:894)
            at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:857)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
            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:585)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)What I am trying to do is to load a C library on Tomcat startup event.. Here is my code snippet...
    public final class LicenceManagerContextListener
        implements ServletContextListener {
      public void contextInitialized(ServletContextEvent event) {
        SystemManager.init();
      }And my init method is a native method in SYstem Manager class... It doesnt look like a Class loading problem..previously i was having library not found error, then I put these lines in Tomcat Start up script..
    export CLASSPATH=$CLASSPATH:/etc/getmetv
    export LD_LIBRARY_PATH=/etc/getmetv
    export JAVA_OPTS=-Djava.library.path=/etc/getmetvCan anyone tell me what exactly is going wrong?
    Thanks
    Message was edited by:
    mraheel
    Message was edited by:
    mraheel

    For more information..my .SO file is placed in /etc/getmetv
    The name of SO file is libgetmetv and i am loading the library as
    static {
        try {
          System.loadLibrary("getmetv");
        catch (Exception e) {
          e.printStackTrace();
      }

  • Tomcat Context Issue

    I am working on a migration project.
    I am trying to run my project on tomcat 5.5.26. I need to strip context(myworld) from URL. I tried to play with context root, but it's not working. Could any ont post your suggestions on this?
    I want to open my application without "myworld" as part of URL. i.e. just http://localhost:8080
    I have below myworld.xml in conf\Catalina\localhost folder.
    <Context path="/myworld" crossContext="false" reloadable="false" debug="1">
      <Manager className="org.apache.catalina.session.StandardManager" pathname=""/>
    <Resource name="mypool" .../>
    <Logger className="org.apache.catalina.logger.FileLogger" directory="logs"  prefix="myworld_log." suffix=".txt" timestamp="true"/>
    </Context>

    Package the webapplication as an EAR and set the context root setting in the EAR's application.xml to "/".

  • Tomcat Context Settings

    How do I make changes to the context file that can be used when debugging the project? I can only find how to debug the server.xml and the web.xml, but need to set entries for the context.
    Many thanks
    Ian

    Sorry, never noticed the context.xml within META-INF

  • Tomcat context problem

    I am working on a webapplication with Tomcat4.1. I have a MenuUtil.xml in the folder
    D:\Tomcat4\webapps\MyApp\WEB-INF\classes\com\\web\myapp
    and I have menu.dtd in the same folder.I want to refer to this dtd from the xml file
    like
    <!DOCTYPE Menus SYSTEM "com/web/myapp/menu.dtd">
    But gives FileNotFoundException..
    Even <!DOCTYPE Menus SYSTEM "web-inf/classes/com/web/myapp/menu.dtd"> is not working..
    Please help

    did you try:
    <!DOCTYPE Menus SYSTEM "menu.dtd">

  • Tomcat application context.xml

    This is my problem:
    I've been programming my own implementation of a Realm.
    within I want to access a <Environment>-Entry situated in
    a customized Context.xml :
    <Context docBase="${catalina.home}/webapps/slide"
    privileged="true" antiResourceLocking="false"
    antiJARLocking="false" useNaming="true">
    <Environment name="test" type="java.lang.String"
    value="C:/user.xml"/>
              <Realm className="MyRealm"/>
    </Context>
    What do I need to do to gain access.
    When I declare the variable in <GlobalNamingResources> there is no problem accessing it.

    To clarify I add portions of my configuration files:
    <b>hibernate.cfg.xml</b> fragment:
    <property name="connection.datasource">
      java:comp/env/jdbc/cname
    </property>
    <property name="dialect">
      net.sf.hibernate.dialect.OracleDialect
    </property>
    <property name="connection.driver_class">
      oracle.jdbc.driver.OracleDriver
    </property>
    <property name="transaction.factory_class">
      net.sf.hibernate.transaction.JDBCTransactionFactory
    </property> <b>web.xml</b> fragment:
    <resource-ref>
      <description>DataSource</description>
      <res-ref-name>jdbc/cname</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>What I want to put inside <b>tomcat context application definition</b>:
    <Resource name="jdbc/cname" scope="Shareable" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/cname">
      <parameter>
        <name>factory</name>
        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
      </parameter>
      <parameter>
        <name>url</name>
        <value>jdbc:oracle:thin:@server:1521:SID</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>oracle.jdbc.driver.OracleDriver</value>
      </parameter>
      <parameter>
        <name>username</name>
        <value>name</value>
      </parameter>
      <parameter>
        <name>password</name>
        <value>pass</value>
      </parameter>
      <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>
    <Realm className="org.apache.catalina.realm.DataSourceRealm"
       dataSourceName="jdbc/cname"
       localDataSource="true"
       digest="MD5"
       userTable="usr" userNameCol="user" userCredCol="passwd"
       userRoleTable="usrrol" roleNameCol="rol" />

  • How to get the context name for a proxied servlet container

    I have been using tags to build links for applications that use Tomcat and I was wondering if tags that detect the host url can be used if the servet container is behind a proxy.
    For example let's say that the Tomcat context is called
    app_under_test
    but this url is proxied as
    testing.host/beta_testing.
    All urls built by the application should be http://testing.host/beta_testing/... not http:localhost:8080/app_under_test/...
    The only way I can think of to do this is to have a property file with a proxy url property that is used to build all application links.
    Is there a way of doing this that would not require a property file?
    Thanks for any ideas and pointers,
    -=beeky

    Hi,
    1.Goto transaction SM37.
    2. Select the Job
    3. Click on "Step" tab in the Application tool bar.
    4. You'll see the program name under "Program Name/Command" in the list displayed.
    <REMOVED BY MODERATOR>
    Regards,
    Shiny
    Edited by: Alvaro Tejada Galindo on Feb 1, 2008 1:20 PM

  • How to deploy EAR file in Tomcat?

    Is we can deploy ear file in tomcat?
    Normally we can deploy WAR file in tomcat webapps folder. When we run the tomat it will automatically extract the war file.
    But samethink I have tried EAR file. But it is not working.
    Is we can deploy EAR file or not?
    If not plz give reason.

    Hi
    Normally we can deploy the war file thats routene stuff ofcourse ..........but when u deploy ear file it will give problmes as ear structure and war structure are differeant
    The Tomcat Servlet/JSP Container      
    The Apache Tomcat 5.5 Servlet/JSP Container
         Apache Logo
    Links
    * Docs Home
    Contents
    * Contents
    * Introduction
    * Installation
    * Deployment
    * Source Code
    * Processes
    * Example App
    Application Developer's Guide
    Deployment
         Printer Friendly Version
    print-friendly
    version
    Background
    Before describing how to organize your source code directories, it is useful to examine the runtime organization of a web application. Prior to the Servlet API Specification, version 2.2, there was little consistency between server platforms. However, servers that conform to the 2.2 (or later) specification are required to accept a Web Application Archive in a standard format, which is discussed further below.
    A web application is defined as a hierarchy of directories and files in a standard layout. Such a hierarchy can be accessed in its "unpacked" form, where each directory and file exists in the filesystem separately, or in a "packed" form known as a Web ARchive, or WAR file. The former format is more useful during development, while the latter is used when you distribute your application to be installed.
    The top-level directory of your web application hierarchy is also the document root of your application. Here, you will place the HTML files and JSP pages that comprise your application's user interface. When the system administrator deploys your application into a particular server, he or she assigns a context path to your application (a later section of this manual describes deployment on Tomcat). Thus, if the system administrator assigns your application to the context path /catalog, then a request URI referring to /catalog/index.html will retrieve the index.html file from your document root.
    Standard Directory Layout
    To facilitate creation of a Web Application Archive file in the required format, it is convenient to arrange the "executable" files of your web application (that is, the files that Tomcat actually uses when executing your app) in the same organization as required by the WAR format itself. To do this, you will end up with the following contents in your application's "document root" directory:
    * *.html, *.jsp, etc. - The HTML and JSP pages, along with other files that must be visible to the client browser (such as JavaScript, stylesheet files, and images) for your application. In larger applications you may choose to divide these files into a subdirectory hierarchy, but for smaller apps, it is generally much simpler to maintain only a single directory for these files.
    * /WEB-INF/web.xml - The Web Application Deployment Descriptor for your application. This is an XML file describing the servlets and other components that make up your application, along with any initialization parameters and container-managed security constraints that you want the server to enforce for you. This file is discussed in more detail in the following subsection.
    * /WEB-INF/classes/ - This directory contains any Java class files (and associated resources) required for your application, including both servlet and non-servlet classes, that are not combined into JAR files. If your classes are organized into Java packages, you must reflect this in the directory hierarchy under /WEB-INF/classes/. For example, a Java class named com.mycompany.mypackage.MyServlet would need to be stored in a file named /WEB-INF/classes/com/mycompany/mypackage/MyServlet.class.
    * /WEB-INF/lib/ - This directory contains JAR files that contain Java class files (and associated resources) required for your application, such as third party class libraries or JDBC drivers.
    When you install an application into Tomcat (or any other 2.2/2.3-compatible server), the classes in the WEB-INF/classes/ directory, as well as all classes in JAR files found in the WEB-INF/lib/ directory, are made visible to other classes within your particular web application. Thus, if you include all of the required library classes in one of these places (be sure to check licenses for redistribution rights for any third party libraries you utilize), you will simplify the installation of your web application -- no adjustment to the system class path (or installation of global library files in your server) will be necessary.
    Much of this information was extracted from Chapter 9 of the Servlet API Specification, version 2.3, which you should consult for more details.
    Shared Library Files
    Like most servlet containers, Tomcat 5 also supports mechanisms to install library JAR files (or unpacked classes) once, and make them visible to all installed web applications (without having to be included inside the web application itself. The details of how Tomcat locates and shares such classes are described in the Class Loader HOW-TO documentation. For the purposes of our discussion, there are two locations that are commonly used within a Tomcat 5 installation for shared code:
    * $CATALINA_HOME/common/lib - JAR files placed here are visible both to web applications and internal Tomcat code. This is a good place to put JDBC drivers that are required for both your application and internal Tomcat use (such as for a JDBCRealm).
    * $CATALINA_BASE/shared/lib - JAR files placed here are visible to all web applications, but not to internal Tomcat code. This is the right place for shared libraries that are specific to your application.
    Out of the box, a standard Tomcat 5 installation includes a variety of pre-installed shared library files, including:
    * The Servlet 2.4 and JSP 2.0 APIs that are fundamental to writing servlets and JavaServer Pages.
    * An XML Parser compliant with the JAXP (version 1.2) APIs, so your application can perform DOM-based or SAX-based processing of XML documents.
    Web Application Deployment Descriptor
    The description below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat 5, and is the base directory against which most relative paths are resolved. However, if you have configured Tomcat 5 for multiple instances by setting a CATALINA_BASE directory, you should use $CATALINA_BASE instead of $CATALINA_HOME for each of these references.
    As mentioned above, the /WEB-INF/web.xml file contains the Web Application Deployment Descriptor for your application. As the filename extension implies, this file is an XML document, and defines everything about your application that a server needs to know (except the context path, which is assigned by the system administrator when the application is deployed).
    The complete syntax and semantics for the deployment descriptor is defined in Chapter 13 of the Servlet API Specification, version 2.3. Over time, it is expected that development tools will be provided that create and edit the deployment descriptor for you. In the meantime, to provide a starting point, a basic web.xml file is provided. This file includes comments that describe the purpose of each included element.
    NOTE - The Servlet Specification includes a Document Type Descriptor (DTD) for the web application deployment descriptor, and Tomcat 5 enforces the rules defined here when processing your application's /WEB-INF/web.xml file. In particular, you must enter your descriptor elements (such as <filter>, <servlet>, and <servlet-mapping> in the order defined by the DTD (see Section 13.3).
    Tomcat Context Descriptor
    The description below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat 5, and is the base directory against which most relative paths are resolved. However, if you have configured Tomcat 5 for multiple instances by setting a CATALINA_BASE directory, you should use $CATALINA_BASE instead of $CATALINA_HOME for each of these references.
    A /META-INF/context.xml file can be used to define Tomcat specific configuration options, such as loggers, data sources, session manager configuration and more. This XML file must contain one Context element, which will be considered as if it was the child of the Host element corresponding to the Host to which the The Tomcat configuration documentation contains information on the Context element.
    Deployment With Tomcat 5
    In order to be executed, a web application must be deployed on a servlet container. This is true even during development. We will describe using Tomcat 5 to provide the execution environment. A web application can be deployed in Tomcat by one of the following approaches:
    * Copy unpacked directory hierarchy into a subdirectory in directory $CATALINA_HOME/webapps/. Tomcat will assign a context path to your application based on the subdirectory name you choose. We will use this technique in the build.xml file that we construct, because it is the quickest and easiest approach during development. Be sure to restart Tomcat after installing or updating your application.
    * Copy the web application archive file into directory $CATALINA_HOME/webapps/. When Tomcat is started, it will automatically expand the web application archive file into its unpacked form, and execute the application that way. This approach would typically be used to install an additional application, provided by a third party vendor or by your internal development staff, into an existing Tomcat installation. NOTE - If you use this approach, and wish to update your application later, you must both replace the web application archive file AND delete the expanded directory that Tomcat created, and then restart Tomcat, in order to reflect your changes.
    * Use the Tomcat 5 "Manager" web application to deploy and undeploy web applications. Tomcat 5 includes a web application, deployed by default on context path /manager, that allows you to deploy and undeploy applications on a running Tomcat server without restarting it. See the administrator documentation (TODO: hyperlink) for more information on using the Manager web application.
    * Use "Manager" Ant Tasks In Your Build Script. Tomcat 5 includes a set of custom task definitions for the Ant build tool that allow you to automate the execution of commands to the "Manager" web application. These tasks are used in the Tomcat deployer.
    * Use the Tomcat Deployer. Tomcat 5 includes a packaged tool bundling the Ant tasks, and can be used to automatically precompile JSPs which are part of the web application before deployment to the server.
    Deploying your app on other servlet containers will be specific to each container, but all containers compatible with the Servlet API Specification (version 2.2 or later) are required to accept a web application archive file. Note that other containers are NOT required to accept an unpacked directory structure (as Tomcat does), or to provide mechanisms for shared library files, but these features are commonly available.
    Copyright © 1999-2006, Apache Software Foundation

  • Tomcat Servlet - TCP Port Already in Use?

    My problem is that tomcat/servlet is not releasing its TCP port after my servlet closes the port. Next time a servlet tries to use the port it gets an error "Port already in use". Using netstat I can see the port is still in use. If I stop tomcat and restart it, the port is released. I have not had this sort of problem writing C programs that use sockets.
    My setup is Fedora Core 6 with JDK1.5_14 and Tomcat 5.5.26. I know it's not the latest, but sockets and streams have been around for a long time.
    Actual implementation uses a trivial javaserver page to instantiate a class to create/accept connection from a client (JApplet). After connection, it starts a thread to receive data. I am using ServerSocket(), InputStreamReader(), and OutputStreamWriter(). On ServerSocket I set ReuseAddress to true.
    I have try/catch on all my I/O and use tomcat context log for error and OK messages. Data transfer is perfect. Detect close by client works. In the context log I see close of streams and ServerSocket occur with no exceptions. Then, I manually close the jsp window. No indication of any problems. If I use different port 2nd time (e.g. 50001) it all works perfect. If I use my default (50000) again, servlet gets an error during bind, "Port already in use".
    2.5 years with Java. 5 years with Linux and C.
    Please advise or refer

    rwengr wrote:
    My problem is that tomcat/servlet is not releasing its TCP port after my servlet closes the port. Next time a servlet tries to use the port it gets an error "Port already in use". Using netstat I can see the port is still in use. If I stop tomcat and restart it, the port is released. I have not had this sort of problem writing C programs that use sockets.Nice.... Not sure that matters though.
    >
    My setup is Fedora Core 6 with JDK1.5_14 and Tomcat 5.5.26. I know it's not the latest, but sockets and streams have been around for a long time.
    Actual implementation uses a trivial javaserver page to instantiate a class to create/accept connection from a client (JApplet). Bleah! Don't use a JSP for that. Use a servlet at worst. At best use a Servlet to start some other socket manager class which you can/have tested outside the Servlet Container environment.
    After connection, it starts a thread to receive data. I am using ServerSocket(), InputStreamReader(), and OutputStreamWriter(). On ServerSocket I set ReuseAddress to true.
    I have try/catch on all my I/O and use tomcat context log for error and OK messages. Data transfer is perfect. Detect close by client works. In the context log I see close of streams and ServerSocket occur with no exceptions. Then, I manually close the jsp window. Closing the browser window has no affect on the server.
    No indication of any problems. If I use different port 2nd time (e.g. 50001) it all works perfect. If I use my default (50000) again, servlet gets an error during bind, "Port already in use".
    2.5 years with Java. 5 years with Linux and C.
    Please advise or referShow some code. If you just want some generic advice it would be to close the port, as soon as you don't need it anymore. But you know that. Without any further code I think that is about all that can be said.
    P.S. Make the code as small as possible, compilable, but still demonstrating the problem. Also see: [this tutorial as an example...|http://www.javaworld.com/javaworld/jw-12-1996/jw-12-sockets.html?page=1]

  • $$context from java

    here is my situation. I have swing application based on jnlp which is running on tomcat.
    I modified tomcat to run application from root. but my jnlp is in one folder under webapp.
    for example my webapp name is test. so i have folder called test1 under test and my jnlp is inside the test1
    so to access jnlp http://<IPAddress>:8080/test1/112.jnlp (because application is running from root of tomcat)
    from client code. when i try to acces codebase using BasicService (jnlp api) it gives whole path to jnlp file. but instead any way to get tomcat context. in this case i would like to get root not the test1/112.jnlp.
    is there any way from jnlp API to get tomcat context on which application is running.
    Thanks

    Hai,
    I want to use JSP implicit objects such as request
    and application
    from my Java Bean.
    Any idea about how i can access it without JSP
    passing these objects to Java Bean.
    Thank you,
    P.Srikanth.You can't.

  • Has anyone got iFS working in Tomcat ?

    iFS 1.1.9
    We have a urgent need to get iFS running in a Servlet 2.2 container and OC4J does not support iFS yet. I know this is not supported but has anyone got iFS working in Tomcat ? If so, pls do me a BIG favour by letting me have your config files, such as
    - server.xml
    - <tomcat home>\conf\web.xml
    - web.xml for the tomcat context)
    - wrapper.properties (if you are using tomcat as an NT service)
    - tomcat-apache.conf (or equivalent)
    - <oracle home>/apache/apache/conf/httd.conf
    - A listing of relevant environment variables (by doing a "set>env.lis" or similar)
    - and any other files you might think is relevant
    Thanks a million in advance.
    null

    iFS 1.1.9 / Oracle 8.1.7 / Tomcat 4.0.1 / Windows 2000
    After several hours of fiddling around with the configuration
    files, I finally got the iFS up and running on my test machine.
    Briefly here's what I did:
    1) create application directories
    <tomcat_home>/ifs/files/WEB-INF/classes
    <tomcat_home>/ifs/files/WEB-INF/lib
    2) Add the following to <tomcat_home>/conf/server.xml:
    <Context path="/ifs/files" docBase="ifs/files"
    debug="0" reloadable="true">
    <!-- got this from jserv.properties -->
    <Environment name="ORACLE_HOME" type="java.lang.String"
    value="oracle_home"/>
    <Environment name="ORACLE_SID" type="java.lang.String"
    value="sid"/>
    <Environment name="LD_LIBRARY_PATH" type="java.lang.String"
    value="oracle_home/lib:oracle_home/ctx/lib"/>
    <Environment name="NLS_LANG" type="java.lang.String"
    value=".UTF8"/>
    </Context>
    Please replace oracle_home with your installation directory and
    fill in your SID as well.
    3) create <tomcat_home>/<tomcat_home>/ifs/files/WEB-INF/web.xml
    with the following definitions:
    <servlet>
    <servlet-name>oracle-jsp</servlet-name>
    <servlet-class>oracle.jsp.JspServlet</servlet-class>
    <init-param>
    <param-name>logVerbosityLevel</param-name>
    <param-value>WARNING</param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-name>oracle-ifs-servlet</servlet-name>
    <servlet-
    class>oracle.ifs.protocols.dav.impl.IfsDavServlet</servlet-class>
    <init-param>
    <param-name>classpath</param-name>
    <!-- this classpath is crucial for JSP compilation.
    | The value has to be in one single line without
    | linebreaks and spaces !!!
    -->
    <param-value>
    tomcat_home/webapps/ifs/files/WEB-INF/lib/ojsp.jar;
    tomcat_home/webapps/ifs/files/WEB-INF/lib/webui.jar;
    tomcat_home/webapps/ifs/files/WEB-INF/lib/adk.jar;
    tomcat_home/webapps/ifs/files/WEB-INF/lib/http.jar;
    tomcat_home/webapps/ifs/files/WEB-INF/lib/repos.jar;
    tomcat_home/webapps/ifs/files/WEB-INF/lib/email.jar;
    tomcat_home/webapps/ifs/files/WEB-
    INF/lib/release.jar;
    tomcat_home/webapps/ifs/files/WEB-INF/lib/utils.jar;
    tomcat_home/webapps/ifs/files/WEB-
    INF/lib/settings.jar;
    tomcat_home/webapps/ifs/files/WEB-INF/classes;
    tomcat_home/lib/xmlparserv2.jar;
    tomcat_home/lib/classes12.jar;
    tomcat_home/common/lib/servlet.jar;
    </param-value>
    </init-param>
    <init-param>
    <param-name>ifs.dav.servicepassword</param-name>
    <param-value>manager</param-value>
    </init-param>
    <init-param>
    <param-name>encode_to_java</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>page_provider</param-name>
    <param-
    value>oracle.ifs.protocols.dav.impl.jsp.IfsJspResourceProvider</p
    aram-value>
    </init-param>
    <init-param>
    <param-name>page_repository_root</param-name>
    <param-value>ifs_home/ifsjsps</param-value>
    </init-param>
    <init-param>
    <param-name>unsafe_reload</param-name>
    <param-value>false</param-value>
    </init-param>
    <init-param>
    <param-name>developer_mode</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>oracle-ifs-servlet</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping>
    <!-- The mapping for the JSP servlet -->
    <servlet-mapping>
    <servlet-name>oracle-jsp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>
    tomcat_home and ifs_home must be replaced with your installation
    directories.
    4) Copy the iFS and Oracle JARs to the locations specified in
    web.xml
    You may choose either the applications lib directory or the more
    general tomcat_home/lib for that purpose.
    One hint on libraries: Tomcat will ignore ZIP files, you have to
    use JAR. I renamed Oracle's classes12.zip to classes12.jar for
    that reason.
    5) Create settings.jar
    This was the most tricky part. I packed everything under
    ifs_home/settings into the file settings.zip, renamed this to
    settings.jar and moved it to the WEB-INF/lib directory. Seems a
    bit of a kludge to me, anyone with a better solution is welcome.
    6) Start tomcat
    7) try http://yourtomcathost:8080/ifs/files/index.html
    You should see the ifs login screen then.
    One word about the application environment. In this
    configuration every user class has to go into
    <tomcat_home>/ifs/files/WEB-INF/classes, the
    ifs_home/user_classes is of no use here. And don't try to set
    the classpath within catalina.bat, tomcat will completely ignore
    this setting.
    Finally, I know that this environment is not supported but as
    long as the iFS servlet meets the standards, every standard
    compliant servlet engine should do the job.
    Good luck

  • Can't start Tomcat!  help me!

    Hello all,
    I have used JDK1.3.1; now I download Tomcat, I write a batch file includes:
    set JAVA_HOME=C:\JDK1.3.1
    set ANT_HOME=C:\jakarta-tomcat
    set TOMCAT_HOME=C:\jakarta-tomcat
    set CLASSPATH=%CLASSPATH%;C:\jdk1.3.1\lib\tools.jar;
    and run it;
    now I go to C:\jakarta-tomcat\bin and type 'startup':
    C:\jakarta-tomcat\bin>startup
    Including all jars in C:\jakarta-tomcat\lib in your CLASSPATH.
    Using CLASSPATH: C:\jakarta-tomcat\classes;C:\jakarta-tomcat\lib\ant.jar;C:\jaka
    rta-tomcat\lib\jasper.jar;C:\jakarta-tomcat\lib\jaxp.jar;C:\jakarta-tomcat\lib\p
    arser.jar;C:\jakarta-tomcat\lib\servlet.jar;C:\jakarta-tomcat\lib\webserver.jar;
    ;C:\jdk1.3.1\lib\tools.jar;;C:\JDK1.3.1\lib\tools.jar
    Starting Tomcat in new window
    but the new window disappear after several seconds,Tomcat doesn't start.Then, I type 'tomcat run':
    C:\jakarta-tomcat\bin>tomcat run
    Including all jars in C:\jakarta-tomcat\lib in your CLASSPATH.
    Using CLASSPATH: C:\jakarta-tomcat\classes;C:\jakarta-tomcat\lib\ant.jar;C:\jaka
    rta-tomcat\lib\jasper.jar;C:\jakarta-tomcat\lib\jaxp.jar;C:\jakarta-tomcat\lib\p
    arser.jar;C:\jakarta-tomcat\lib\servlet.jar;C:\jakarta-tomcat\lib\webserver.jar;
    ;C:\jdk1.3.1\lib\tools.jar;;C:\JDK1.3.1\lib\tools.jar
    ERROR reading C:\jakarta-tomcat\conf\server.xml
    At Line 121 /Server/ContextManager/ContextInterceptor/ className=org.apache.tomc
    at.context.LoaderInterceptor
    FATAL: configuration error
    java.lang.ClassNotFoundException: org.apache.tomcat.context.LoaderInterceptor
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at org.apache.tomcat.util.xml.ObjectCreate.start(XmlMapper.java:453)
    at org.apache.tomcat.util.xml.XmlMapper.matchStart(XmlMapper.java:314)
    at org.apache.tomcat.util.xml.XmlMapper.startElement(XmlMapper.java:68)
    at com.sun.xml.parser.Parser.maybeElement(Parser.java:1390)
    at com.sun.xml.parser.Parser.content(Parser.java:1498)
    at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
    at com.sun.xml.parser.Parser.content(Parser.java:1498)
    at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
    at com.sun.xml.parser.Parser.parseInternal(Parser.java:491)
    at com.sun.xml.parser.Parser.parse(Parser.java:283)
    at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:198)
    at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:143)
    at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
    C:\jakarta-tomcat\bin>
    What's this problem? How can I do?please help me,
    thanks

    Modify the classpath as follows.
    set JAVA_HOME=C:\JDK1.3.1
    set ANT_HOME=C:\jakarta-tomcat
    set TOMCAT_HOME=C:\jakarta-tomcat
    set CLASSPATH=%CLASSPATH%;C:\jdk1.3.1\lib\tools.jar;JAVA_HOME\lib;
    Modify the Path as follows
    set PATH = %PATH%;%JAVA_HOME%\bin;%TOMCAT_HOME%\bin

  • Tomcat error and temporarily stops working

    Can someone tell me why my Tomcat stops working when I startup w/following error:
    plication 2.3//EN --> http://java.sun.com/dtd/web-app_2_3.dtd "null"
    ERROR reading C:\jakarta-tomcat-3.2.2\webapps\bugrat\WEB-INF\web.xml
    At External entity not found: "http://java.sun.com/dtd/web-app_2_3.dtd".
    I checked the url reference for the dtd - it's completely valid.
    Afterwards, for a minute or so, Tomcat doesn't work(i.e., http://localhost returns error). But, finally spitting out the following error, tomcat comes back working.
    ERROR reading C:\jakarta-tomcat-3.2.2\webapps\bugrat\WEB-INF\web.xml
    java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:292)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:158)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:145)
    at java.net.Socket.connect(Socket.java:391)
    at java.net.Socket.connect(Socket.java:349)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:142)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:344)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:532)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:280)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:290)
    at sun.net.www.http.HttpClient.New(HttpClient.java:302)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
    .java:397)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:490)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:237
    at org.apache.crimson.parser.Resolver.createInputSource(Resolver.java:28
    7)
    at org.apache.crimson.parser.ExternalEntity.getInputSource(ExternalEntit
    y.java:91)
    at org.apache.crimson.parser.Parser2.pushReader(Parser2.java:3003)
    at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.jav
    a:2738)
    at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1155)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
    at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:260)
    at org.apache.tomcat.util.xml.XmlMapper.readXml(XmlMapper.java:214)
    at org.apache.tomcat.context.WebXmlReader.processWebXmlFile(WebXmlReader
    .java:202)
    at org.apache.tomcat.context.WebXmlReader.contextInit(WebXmlReader.java:
    109)
    at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java
    :491)
    at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
    at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
    at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
    2001-07-17 11:39:52 - PoolTcpConnector: Starting HttpConnectionHandler on 80
    2001-07-17 11:39:53 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007
    PH!

    What I meant was, can your Tomcat installation actually connect to it (is it possible that your internet connection isn't working properly all the time)?

Maybe you are looking for