Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Internal Error

 
Vladimir Kositsky
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI!
Freshly installed Tomcat connected, main page appears in Netscape http://localhost:80/ .
Example program HelloWorld compiled:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld{
public void doGet( HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException{
PrintWriter out = response.getWriter();
out.println("Hello World!");}}
______in directory \webapps\root\WEB-INF\classes
trying to load by http://localhost:80/servlet/HelloWorld
Error: 500
Location: /servlet/HelloWorld
Internal Servlet Error:
java.lang.ClassCastException: HelloWorld
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268)
at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
at org.apache.tomcat.core.Handler.service(Handler.java:254)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
Compiled Code)
at java.lang.Thread.run(Thread.java:479)
advise highly appreciated!!!
[This message has been edited by Vladimir Kositsky (edited February 08, 2001).]
 
Vladimir Kositsky
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found it,
it was runtime error of the program itself , no connection with Tomcat settings
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic