Hi!

Forgive me for asking what I'm sure is a very basic question (problem), I'm new to Tomcat and Java (some more than a fortnight). I read the Tomcat-Apache HOWTO, a very good article "Web Database Access with Apache/Tomcat", Tomcat Manager App HOW-TO and some other docs, from google, and still cannot deploy my web application.

I'm running Apache Tomcat 4.1.18 on SuSE 8.2, Java 1.4.1_02-b06A.
My web application, called scc_html, consists of a simple JSP which calls a servlet:
"
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
</HEAD>


<BODY>

<jsp:forward page="/scc_html/SccServlet"/>

</BODY>
</HTML>
"
.

Tomcat works fine, several of the examples proved this.
To deploy the application, I created a directory
webapps/scc_html, and there I put index.jsp (above code), two directories: webapps/scc_html/WEB-INF/classes, webapps/scc_html/WEB-INF/lib and a webapps/scc_html/WEB-INF/web.xml file.


SccServlet should connect to an Oracle database (it is a servlet that works fine on HP-UX + iPlanet), but it is a servlet from a package scc_html. So the fully qualified name of the class is scc_html.SccServlet.

I put all the .java-files from scc_html package to webapps/scc_html/WEB-INF/classes, specified CLASSPATH pointing to webapps/scc_html/WEB-INF/lib (where I put two .jar libraries) and ran
`javac list_of_files_here` (in classes directory), and it compiled successfully (some warning about deprecated API, but I don't think it is significant), all the five .class files of the package generated.


When I connect to the_machine:8080, I run Tomcat Manager, and in the list of applications I do see /scc_html among /admin, /examples/, /manager, /tomcat-docs, so on.
However, I get the 'HTTP Status 503 Error:Servlet SccServlet is currently unavailable' on any attempt to connect to the index.jsp.


As far as I understand, Tomcat cannot find the Servlet, so the problem must be with webapps/scc_html/WEB-INF/web.xml file (or some global config from /conf?)

Or, the problem can be that one of the parameters to the servlet is the URL to the servlet, perhaps there is some extra check in Tomcat, and the URL is not valid during the stage of deployment. Seems unlikely, though..

Below I put the code of web.xml, the logs are attached.
I'd appreciate any advice, I AM at a loss.
Thanks in advance,
Vlad.

===============================================

Here is the web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd";>

<web-app>

    <display-name>Scc servlet and JSP page</display-name>
    <description>
      Scc servlet and JSP page.
    </description>

    <servlet>
        <servlet-name>SccServlet</servlet-name>
        <servlet-class>scc_html.SccServlet</servlet-class>
<!--    <servlet-class>SccServlet</servlet-class> -->
        <init-param>
            <param-name>ConnectionURL</param-name>

<param-value>jdbc:oracle:thin:@scc-srv.tlsoft.ru:1521:ora816</param-value>
        </init-param>
        <init-param>
            <param-name>SccServletUrl</param-name>
            <param-value>/scc_html/SccServlet</param-value>
        </init-param>
        <init-param>
            <param-name>SchemaName</param-name>
            <param-value>sys_scc1</param-value>
        </init-param>
        <init-param>
            <param-name>UserName</param-name>
            <param-value>data_scc1</param-value>
        </init-param>
        <init-param>
            <param-name>UserPwd</param-name>
            <param-value>data_scc1</param-value>
        </init-param>
        <init-param>
            <param-name>HelpBaseUrl</param-name>
            <param-value>/help/</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>SccServlet</servlet-name>
        <url-pattern>/scc_html/SccServlet</url-pattern>
    </servlet-mapping>

</web-app>
.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to