servlet连接数据库,修改web.xml文件之后,tomcat重新reload,然后报错:提示错误如下:2011-10-18 11:01:06 org.apache.catalina.startup.HostConfig checkResources
信息: Reloading context [/myweb]
2011-10-18 11:01:06 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/myweb] appears to have started a thread named [Timer-18] but has failed to stop it. This is very likely to create a memory leak.
数据库的链接,Statement等等我也全都关闭了,这是这么回事,就是reload之后报错,运行时不报;public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest req=(HttpServletRequest)request;
HttpServletResponse resp=(HttpServletResponse)response;
}
求解释HttpServletRequest req=(HttpServletRequest)request;这句为什么能够强制转换?
信息: Reloading context [/myweb]
2011-10-18 11:01:06 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/myweb] appears to have started a thread named [Timer-18] but has failed to stop it. This is very likely to create a memory leak.
数据库的链接,Statement等等我也全都关闭了,这是这么回事,就是reload之后报错,运行时不报;public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest req=(HttpServletRequest)request;
HttpServletResponse resp=(HttpServletResponse)response;
}
求解释HttpServletRequest req=(HttpServletRequest)request;这句为什么能够强制转换?
解决方案 »
- 服务器端response.sendRedirect后得到的httpcode 301
- 看看CSDN版主或者管理员在做什么吧!
- 如果通过按钮选择直接在WEB面页弹出选择文件窗口 就像邮件发送选择附件的效果 谢谢
- 怎样知道取得的String=""还是String=null
- struts简单问题
- struts+hibernate问题?
- jsp/servlet如何接收动态生成的表格输入的参数?问题解决立即给分!
- 急问,在线等
- jsp页面中表单的客户端确认问题?
- 代码编写完了出现了很多错误好像都是跟数据库有关的不懂就大神帮忙
- ckfinder上传图片中文乱码问题
- tomcat提示线程没有关闭,容易造成内存泄露
内存泄露~~
HttpServletRequest req=(HttpServletRequest)request;这句为什么能够强制转换?
A extentds b
那么 A 可以强制转成B
然后赋给子类req,