1 Reply Latest reply on Nov 25, 2002 8:14 PM by seedling

    test servlet deploy pass/servlet call fail

    seedling

      servlet code:

      import javax.servlet.*;
      import javax.servlet.http.*;
      import java.io.*;
      import java.util.*;

      public class TestingServlet extends HttpServlet {

      public void doGet(HttpServletRequest request,
      HttpServletResponse response)
      throws ServletException, IOException {

      PrintWriter out = response.getWriter();
      out.println("");
      out.println("");
      out.println("Servlet Testing");
      out.println("");
      out.println("");
      out.println("Welcome to the Servlet Testing Center");
      out.println("");
      out.println("");
      }
      }

      WEB-INF/web-xml:

      <?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>

      <servlet-name>Testing</servlet-name>
      <servlet-class>TestingServlet</servlet-class>

      </web-app>


      WEB-INF/classes/TestingServlet.class

      META-INF/application.xml:

      <?xml version="1.0" encoding="ISO-8859-1"?>


      <display-name>Root</display-name>



      <web-uri>myapp.war</web-uri>
      <context-root>/myapp</context-root>




      I war this up:

      WEB-INF/classes/TestingServlet.class
      WEB-INF/web.xml

      then in an ear:

      myapp.war
      META-INF/application.ear

      Am I totally off here? Wrhen I hit http://localhost:8080/mysql/servlet/Testing or TestingServlet I get a no context error. Any help would be appreciated.

      -Christian