Dear users

I'm unable to get a Hello World Servlet running from my browser. 

Configuration:
Windows XP Version 2002 service pack 3
Apache-tomcat-7.0.23-windows-x86
CATALINA_HOME = c:\apache-tomcat-7.0.23-windows-x86\apache-tomcat-7.0.23
CLASSPATH= .;c:\apache-tomcat-7.0.23-windows-x86\apache-tomcat-7.0.23\servlet-api.jar 
 JAVA_HOME=c:\Program Files\jdk1.7.0


compiling as javac HelloWorldServlet.java -cp CATALINA_HOME/lib/servlet-api.jar 

I manually copy  HelloWorldServlet.class  to the apress directory under webapps

and the web.xml to webapps/apress/WEB-INF

I start Tomcat from CATALINA_HOME\bin as catalina start

I get the following output:
Jan 09, 2012 12:40:51 AM org.apache.catalina.startup.HostConfig deployDirectory 
INFO: Deploying web application directory 
C:\apache-tomcat-7.0.23-windows-x86\apache-tomcat-7.0.23\webapps\apress 
INFO: Server startup in 1017 ms 


In Google chrome I type: 
http://localhost:8080/apress/hello.html

I get the following output in my browser: 


-HTTP Status 500 - 
type Exception report 
message 
description The server encountered an internal error () that prevented it from 
fulfilling this request. 
exception 
javax.servlet.ServletException: Error instantiating servlet class 
HelloWorldServlet 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)  


and this is the logs: 

INFO: ContextListener: 
attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 
'org.apache.jasper.compiler.TldLocationsCache@4ded8e') 
Jan 09, 2012 12:40:49 PM org.apache.catalina.core.ApplicationContext log 
INFO: Marking servlet helloworld as unavailable 
Jan 09, 2012 12:40:49 PM org.apache.catalina.core.StandardWrapperValve invoke 
SEVERE: Allocate exception for servlet helloworld 
java.lang.ClassNotFoundException: HelloWorldServlet 
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)  



Thanks in advance

Alastair  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to