怎么在tomcat中看错误信息?

sxchun 2001-09-06 02:39:24
我是jsp的初学者,用tomcat执行jsp程序,请问大虾如何看错误信息?
比如以下的错误,错误原因到底显示在哪一行呀?能看出源程序是在哪一行出的错吗?谢谢了!
Error: 500
Location: /temp/chat/showmsg.jsp
Internal Servlet Error:

javax.servlet.ServletException: java.lang.String
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at temp.chat._0002ftemp_0002fchat_0002fshowmsg_0002ejspshowmsg_jsp_0._jspService(_0002ftemp_0002fchat_0002fshowmsg_0002ejspshowmsg_jsp_0.java:122)
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: java.lang.String
at temp.chat._0002ftemp_0002fchat_0002fshowmsg_0002ejspshowmsg_jsp_0._jspService(_0002ftemp_0002fchat_0002fshowmsg_0002ejspshowmsg_jsp_0.java:71)
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)

...全文
178 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
java6 2001-09-06
这需要一定的JAVA理论功夫, 但还是可以象reset2000那样做解决所有问题,我想可以大部分人都是如此的吧


如哪位大哥对此有高招,请快快指点!
关注
回复
season_fly 2001-09-06
resin是个什么东东
回复
rox 2001-09-06
找个resin调试好了在丢回来,再调。
回复
reset2000 2001-09-06
你调试程序的时候,应该在程序中加上system.out.print( );这样你就可以在调试程序的时候,在启动tomcat的窗口看到你的程序执行到哪一步了
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2001-09-06 02:39
社区公告
暂无公告