I'm getting an IllegalStateException from my servlet when trying to forward the request to a simple html page!
I think it is a problem with Tomcat because my code seems to be correct. oreover I already use the same bunch of code before and it worked fine.
I also get the same exception when serving stylesheets but in this case the exception in thrown quite randomly... i.e. it doesn't happen ever time and I don't know why!
I'm using Tomcat 3.2 in its stand-alone mode... might this be the cause? Why did it work before?
Any help will be precious... I've been loosing a couple of days over this already and still I cannot deploy my app...
This is an abstrct of the code in my doPost:
RequestDispatcher rd = context.getRequestDispatcher ("/loginpage.html");
if (rd == null)
System.out.println("page not found");
else
rd.forward(request, response);
The page is found because rd is not null.
At line 82 (rd.forward method) I get this output:
Error: 500
Location: /StarWeb/loginpage.html
Internal Servlet Error:
java.lang.IllegalStateException: Can't happen - classname is null, who added this ?
at org.apache.tomcat.core.ServletWrapper.loadServlet (ServletWrapper.java:261)
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.ServletWrapper.service (ServletWrapper.java:372)
at org.apache.tomcat.facade.RequestDispatcherImpl.forward (RequestDispatcherImpl.java:194)
at StarWeb.LoginServlet.doPost(LoginServlet.java:82)
at StarWeb.LoginServlet.doGet(LoginServlet.java:44)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService (ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service
(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service (ServletWrapper.java:372)
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.processConne ction(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)
Thanks a lot for any help you could give me.
T
