This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes JSP cast problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP cast problem" Watch "JSP cast problem" New topic
Author

JSP cast problem

marko markovic
Greenhorn

Joined: Mar 16, 2001
Posts: 28
Hi all,
i'm (confused)!
I have a class Class1 which extends from another class Class2 and both are written under Visual Age. When i try to cast Class2 in Class1 that work.
code : Class1 c1 = (class1)c2;
But when i use that in Jsp i get ClassCast Exception!
Here are my error that i get:
---------------------------------------------------------------
Error: 500
Location: /EntityFinder/jsp/Recherche.jsp
Internal Servlet Error:
javax.servlet.ServletException: lu.cltufa.util.entityFinder.common.Finder
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at jsp._0002fjsp_0002fRecherche_0002ejspRecherche_jsp_14._jspService(_0002fjsp_0002fRecherche_0002ejspRecherche_jsp_14.java:130)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
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.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.ClassCastException: lu.cltufa.util.entityFinder.common.Finder
at jsp._0002fjsp_0002fRecherche_0002ejspRecherche_jsp_14._jspService(_0002fjsp_0002fRecherche_0002ejspRecherche_jsp_14.java:111)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
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.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
---------------------------------------------------------------
I don't know why
Any ideas?
Mark Savory
Ranch Hand

Joined: Feb 08, 2001
Posts: 122
Would you please post a message with the JSP code from the top of the file to where this casting is done? Thanks.
marko markovic
Greenhorn

Joined: Mar 16, 2001
Posts: 28
Hi,
i resolve the problem.
Thanks for your reply.
$Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP cast problem
 
Similar Threads
jsp examples
Where to place a JSP file
Tomcat and Mysql Configuration
Cast object[][] into strings
struts problem