5 Replies Latest reply on Apr 20, 2004 4:04 PM by rowla

    I have a servlet and I don't know how to make it run on JBos

    rowla Newbie

      I have a servlet MyHelloWorld.java and it compiles OK.

      I have a directory WEB-INF, inside there's web.xml, jboss-web.xml and classes directory, where MyHelloWorld.class is put.

      Listing of web.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
      <web-app>

      <servlet-name>MyHelloWorld</servlet-name>
      <servlet-class>MyHelloWorld</servlet-class>

      <servlet-mapping>
      <servlet-name>MyHelloWorld</servlet-name>
      <url-pattern>/servlet/MyHelloWorld/*</url-pattern>
      </servlet-mapping>
      </web-app>

      Listing of jboss-web.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
      "http://www.jboss.org/j2ee/dtd/jboss-web_3_3.dtd">
      <jboss-web>
      <context-root>/MyHelloWorld</context-root>
      <virtual-host>localhost</virtual-host>
      </jboss-web>

      when I make a MyHelloWorld.war from WEB-INF directory and copy it into C:\jboss-4.0.0DR3\server\default\deploy and then see http://localhost:8080/MyHelloWorld/
      I get
      directory listing for /
      and no files inside

      Can anybody help me?