This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet Internal Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Internal Error" Watch "Servlet Internal Error" New topic
Author

Servlet Internal Error

Vladimir Kositsky
Ranch Hand

Joined: Nov 03, 2000
Posts: 116
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

Joined: Nov 03, 2000
Posts: 116
I found it,
it was runtime error of the program itself , no connection with Tomcat settings
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Internal Error
 
Similar Threads
error 500
Tomcat Installation
Problem in J2EE server URL call
error please need help!
Error 500 Location: /interest/InterestServlet