Without examining details in your message I can ask:

Structure should be (maybe it is already?)

Webapp
  WEB-INF
    web.xml
    classess
    lib

Etc. 

Then, shouldn't be you calling

http://localhost:8080/webapp/XML_RPC_Testserveur

Instead?

Regards.


José Ernesto Echeverría
[EMAIL PROTECTED]

 

-----Original Message-----
From: Christian Ruediger [mailto:[EMAIL PROTECTED] 
Sent: Viernes, 01 de Octubre de 2004 08:56 a.m.
To: Tomcat Users List
Subject: [tomcat] deploy simple HTTP doPost servlet to tomcat 5.0.28

Hi folks,
after trying the complex aproach without any success, I started a lowtech
approach. I simply want a small servlet deployed. Can't be too complicated.

What I have:
Apache Tomcat 5.0.28 Server
Win 2000
j2sdk1.4.2_05

I constructed the following structure in tomcats webapp folder:

webapp -
   - classes
       - testserveur
           - XML_RPC_Servlet.class
   - libs
   - web.xml

(dont bother the name XML_RPC_Servlet.its for future purposes.
currently only text is displayed -> see code below)

web.xml is as follows:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.// DTD WebApplication
2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd";>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
    version="2.4">
    
<display-name>Testservlet</display-name>
<context-parameter>
<param-name>Lieblingsfarbe</param-name>
<param-value>rot</param-value>
</context-parameter>    
    <servlet>
      <servlet-name>XML_RPC_Testserveur</servlet-name>
      <servlet-class>
        testserveur.RPC_XML_Servlet
      </servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>XML_RPC_Testserveur</servlet-name>
      <url-pattern>/XML_RPC_Testserveur</url-pattern>
    </servlet-mapping>
</web-app>

code is as follows:

public class XML_RPC_Servlet extends HttpServlet{

    

        protected void doGet(HttpServletRequest req,
                             HttpServletResponse res)
                  throws ServletException, IOException
       {
         res.setContentType("text/html");
         PrintWriter out = res.getWriter();
         out.println("<HTML><HEAD><TITLE>Hello There!</TITLE>"+
                     "</HEAD><BODY>Hello There!</BODY></HTML>");
         out.close();
       }
   
    public String getServletInfo()
       {
         return "HelloClientServlet 1.0 by Stefan Zeiger";
       }
    }

What i did:
-Started Tomcat (is configured to localhost:8080) -opened Browser -typed
http://localhost:8080/XML_RPC_Testserveur

- got only a message that the resource is unavailable (in french):

*****************************
type Rapport d'état
message /XML_RPC_Testserveur
description La ressource demandée (/XML_RPC_Testserveur) n'est pas
disponible.
******************************

I am searching for a reason of this for nearly a day.
Is there anyone who can help me?

Thanx Christian

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



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

Reply via email to