Hi, I am new to J2EE and JBoss. I am attempting to write a simple hello world example to try and get thing up an running. The problem I am getting is that I get a message back that says that it can't find the servlet that I am trying to load.
I have a simple servlet class that prints out "Hello World". The source to it is as follows: package net.cordata.HelloWorld.web; import java.io.IOException; import javax.servlet.ServletOutputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { res.setContentType("text/plain"); ServletOutputStream out = res.getOutputStream(); out.println("Hello World!"); } } I have this place in a WAR file under /WEB-INF/classes/net/cordata/HelloWorld/web, and have the following web.xml file in my /WEB-INF directory: <?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>Hello World</display-name> <description> Testing using hello world to get servlets working, and to get directory strucuture setup, and to get template build system. </description> <context-param> <param-name>webmaster</param-name> <param-value>[EMAIL PROTECTED]</param-value> <description> The webmaster of the app </description> </context-param> <servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>net.cordata.HelloWorld.web.HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/helloworld</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> <!-- 30 minutes --> </session-config> </web-app> Finally I have the WAR file placed in a EAR file which has a application.xml file in META-INF as follows: <application> <display-name>Hello World</display-name> <description>An example application</description> <module> <web> <web-uri>HelloWorld.war</web-uri> <context-root>/helloworld</context-root> </web> </module> </application> The when I load up http://<myhost>:8080/helloworld/helloworld I get a message stating that it could not find class: net.cordata.HelloWorld.web.HelloWorld I have searched everywhere I can think of and tried all sorts of variations, but no luck. If I am doing something stupid because I am new at this I would greatly appreciate someone pointing out to me what. Thanks, -- Eric Anderson CorData Inc. _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user