tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alastair Baldwin <>
Subject SEVERE: Allocate exception for servlet helloworld Apache-Tomcat 7.0.23
Date Tue, 10 Jan 2012 18:28:05 GMT
Dear users

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

Windows XP Version 2002 service pack 3
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 -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: 

I get the following output in my browser: 

-HTTP Status 500 - 
type Exception report 
description The server encountered an internal error () that prevented it from fulfilling
this request. 
javax.servlet.ServletException: Error instantiating servlet class HelloWorldServlet 

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(  

Thanks in advance


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message