一个jsp页面能发出多少请求?一个servlet能响应多少请求?如何让jsp发出的请求与servlet的响应对应?

一个jsp页面能发出多少请求?一个servlet能响应多少请求?如何让jsp发出的请求与servlet的响应对应?

5个回答

可以发送无数个,请求无数个。

qq_35417985
qq_35417985 后面还有个问题,大脚有没有独到见解?
接近 4 年之前 回复

一条吧……哈哈哈,上学期才学

qq_35417985
qq_35417985 额,谢谢!
接近 4 年之前 回复

可以响应多个请求,servlet是多线程的!一个实例可以服务于多个请求

qq_35417985
qq_35417985 谢谢,不过后面还有一个问题不知道大脚有没有独到见解?
接近 4 年之前 回复

在web.xml当中配置吧,然后就可以了吧。。。。自我感觉

jsp页面一次一条吧..........

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
jsp与servlet如何交互
jsp向servlet发送请求,servlet处理将请求包含的数据存储到数据库,怎么实现? 用action调用servlet会导致页面跳转或者刷新啊,但我不想页面跳转也不想让页面刷新,仅仅是发送请求到servlet,然后由响应的servlet处理请求。不用ajax!谢谢
Servlet+JavaBean+JSP中,请求对象与响应对象是在哪里生成,如何传递的?
Servlet+JavaBean+JSP中,请求对象与响应对象是在哪里生成,如何传递的? 以及由哪个对象管理?
java语言jsp怎么从一个客户端发出请求让服务器响应到另一个客户端去
就是一个点击,发出请求,然后服务器响应发到其他客户端去,可以实现吗,怎么根据ip来改变服务器响应的客户端,是客户端不是界面
怎么判断一个jsp servlet请求是通过forward跳转过来的
想要判断一个方法的请求是forward过来的还是直接响应用户的某个操作
servlet查出数据库图片让页面显示的问题
各位CSDN的朋友,大家好。今天做一个用户头像的上传显示遇到了一个问题,在此想请教一下大家。 首先,servlet的到数据库的图片后,通过以下代码发到jsp中: ![图片说明](https://img-ask.csdn.net/upload/201710/21/1508553311_881890.jpg) 然后。jsp页面使用<img alt='头像' width='158px' height='188px' src='${pageContext.request.contextPath }/JsTxShowServlet?gonghao=102'> 来接收信息并显示图片。当然,图片也能正常显示,但如果jsp页面采用ajax向该servlet发请求,并将获得的响应信息直接赋值给src属性,显示的确实一窜乱码,即<img alt='头像' width='158px' height='188px' src=‘data’>,data为ajax的响应响应数据。 希望大家能讨论一下,共获提升,不胜感激!
java web ssm项目,点击页面一直在响应,前端后端都不报错,停止tomcat后,后端报错,新手求解答。具体情况如下:
下面是停止tomcat后的报错信息: 08-Mar-2020 19:21:22.961 ���� [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:[ org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:191) org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:409) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1141) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1023) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) javax.servlet.http.HttpServlet.service(HttpServlet.java:660) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)] 08-Mar-2020 19:21:22.963 ���� [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:[ java.io.WinNTFileSystem.canonicalize0(Native Method) java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428) java.io.File.getCanonicalPath(File.java:618) org.apache.catalina.webresources.AbstractFileResourceSet.file(AbstractFileResourceSet.java:90) org.apache.catalina.webresources.DirResourceSet.getResource(DirResourceSet.java:101) org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281) org.apache.catalina.webresources.Cache.getResource(Cache.java:62) org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216) org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225) org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2241) org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:833) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1278) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:348) com.sun.beans.finder.ClassFinder.findClass(ClassFinder.java:103) com.sun.beans.finder.InstanceFinder.instantiate(InstanceFinder.java:93) com.sun.beans.finder.InstanceFinder.find(InstanceFinder.java:66) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)] 08-Mar-2020 19:21:22.969 ���� [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:[ org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:191) org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:409) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1141) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1023) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) javax.servlet.http.HttpServlet.service(HttpServlet.java:660) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)] 08-Mar-2020 19:21:22.984 ���� [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:[ org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:191) org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:409) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1141) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1023) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) javax.servlet.http.HttpServlet.service(HttpServlet.java:634) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)] 08-Mar-2020 19:21:22.987 ���� [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:[ org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:191) org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:409) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1141) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1023) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) javax.servlet.http.HttpServlet.service(HttpServlet.java:660) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)] 08-Mar-2020 19:21:22.995 ���� [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very likely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:[ org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:191) org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:409) org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) org.springframework.web.servlet.FrameworkServlet.publishRequestHandledEvent(FrameworkServlet.java:1141) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1023) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) javax.servlet.http.HttpServlet.service(HttpServlet.java:660) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Thread.java:748)] 08-Mar-2020 19:21:22.998 ���� [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [mysql-cj-abandoned-connection-cleanup] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: java.lang.Object.wait(Native Method) java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144) com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:85) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) 08-Mar-2020 19:21:23.018 ��Ϣ [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcess![图片说明](https://img-ask.csdn.net/upload/202003/08/1583673409_243459.png) orBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) ![图片说明](https://img-ask.csdn.net/upload/202003/08/1583673431_759386.png) 之前都好好的,莫名其妙就不行了。白色部分用ajax请求查询数据,统计人数,绿色和蓝色部分是几个统计图,之前都没问题,突然就报错了。下面是页面转换的代码和统计人数的代码(白色部分): ![图片说明](https://img-ask.csdn.net/upload/202003/08/1583673520_970977.png)![图片说明](https://img-ask.csdn.net/upload/202003/08/1583673530_529970.png) ``` 下面附上配置文件的代码:applicationContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"> <!-- 配置扫描包 --> <context:component-scan base-package="com.clgc.service"></context:component-scan> <!-- 加载配置文件 --> <bean id = "dbConfig" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"> <property name="locations"> <array> <value>classpath:db.properties</value> </array> </property> </bean> <!-- 配置数据库连接池 --> <bean id = "dataSource" class = "com.alibaba.druid.pool.DruidDataSource"> <property name="driverClassName" value="${jdbc.driverClassName}"></property> <property name="url" value="${jdbc.url}"></property> <property name="username" value = "${jdbc.username}"></property> <property name="password" value="${jdbc.password}"></property> </bean> <!-- spring整合mybatis(将mybatis的核心sqlSessionFactory交给spring管理) --> <!-- 1,配置sqlSessionFactory --> <bean id = "sqlSessionFactory" class = "org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"></property> <!-- 自动扫描mapping.xml文件 --> <property name="mapperLocations" value ="classpath:mapper/*.xml"></property> </bean> <!--2,将sqlSessionFactory交给spring mapperScanner --> <bean class = "org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property> ``` ``` <!-- 指定批量生产那个包中的mapper ,DAO接口所在包名,Spring会自动查找其下的类 --> <property name="basePackage" value="com.clgc.dao"></property> </bean> <!-- 配置事务管理器 --> <bean id = "txManager" class = "org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref = "dataSource"></property> </bean> <!-- 增加spring对事务的支持 --> <tx:annotation-driven transaction-manager="txManager"/> <!--启动注解--> <context:annotation-config/> </beans> ``` ``` applicationContext-Controller.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> <!-- 将控制器所在包加入容器 --> <context:component-scan base-package="com.clgc.controller"></context:component-scan> <!-- 配置试图解析器 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/views/"></property> <!--前缀: --> <property name="suffix" value=".jsp"></property> <!-- 后缀: --> <!--Controller中的方法中,返回值是/views/xxx.jsp 如Controller中的welcome,会返回/views/success.jsp --> </bean> <!-- mvc基础配置,标配 --> <mvc:annotation-driven></mvc:annotation-driven> <mvc:default-servlet-handler /> </beans> ``` ``` web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> ``` ``` <welcome-file-list> <welcome-file>/views/index.jsp</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.jsp</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <display-name>PersonManager</display-name> <!-- Spring和mybatis的配置文件 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <!--Spring监听器--> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- 编码过滤器 --> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <async-supported>true</async-supported> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 防止Spring内存溢出监听器 --> <listener> <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class> </listener> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/resources/*</url-pattern> </servlet-mapping> ``` ``` ``` ``` <!--Spring MVC servlet--> <servlet> <servlet-name>SpringMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext-Controller.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> <async-supported>true</async-supported> </servlet> <servlet-mapping> <servlet-name>SpringMVC</servlet-name> <!-- 此处可以可以配置成*.do,对应struts的后缀习惯 --> <url-pattern>/</url-pattern> </servlet-mapping> </web-app> ``` 求求各位大神帮帮忙,百度了好久了,找到问题所在。 好像是数据库查询的问题,今天我把主页的js代码全部注释了 ,新建了一个ajax,当自己设置一组值返回的时候没问题,但是一涉及到数据库查询,就不行了 ![图片说明](https://img-ask.csdn.net/upload/202003/09/1583724656_836612.jpg) ![图片说明](https://img-ask.csdn.net/upload/202003/09/1583724724_674167.png)
apache tomcat servlet
如果我请求的是一个jsp,jsp中有js的链接,当jsp页面响应到浏览器后 浏览器会去加载js文件 我想知道的是如果我配置了apache server服务,这js请求链接能不能 由apache server来提供响应,让tomcat只是做servelet和jsp的请求的相应 小白 求大神指导
jsp里面的foreach如何正确获取从 servlet里list里的值
jsp页面 <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'addowner.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> </head> <body style="background-color:pink;"> <form action="AddOwnerServlet" method="post"> <center> <table style="background-color:pink; color:#2c92fb; text-align:center; margin:0 auto;"> <tr> <td><img src="image/1.png"/></td> <td> <div style="background-color:pink; color:#0ee3db"> <h1 style="color:write;">宠物医院管理系统</h1> </div> </td> <td><img src="image/3.png"/></td> </tr> <tr> <td><a href="index.jsp">系统首页</a></td> <td><a href="login.jsp">登录</a></td> <td><a href="register.jsp">注册</a></td> </tr> <tr> <table width="600" border="1" bordercolor="red" bgcolor="#FFFFEE"> <tr> <td>用户ID:</td> <td><input type="text" name="ownerID"></td> </tr> <tr> <td>用户登录名:</td> <td><input type="text" name="oname"></td> </tr> <tr> <td>用户密码:</td> <td><input type="password" name="opassword"></td> </tr> <tr> <td>性别:</td> <td><input type="text" name="osex"></td> </tr> <tr> <td>联系方式:</td> <td><input type="text" name="phone"></td> </tr> <tr> <td>地址:</td> <td><input type="text" name="address"></td> </tr> <tr> <td>宠物ID:</td> <td> <select id="list" name="petID"> <option value="">请选择宠物ID..</option> <c:forEach items="${requestScope.list}" var="listpets"> <option value="${listpets}">${listpets}</option> </c:forEach> </select> </td> </tr> <tr> <td><input type="submit" value="添加"></td> <td><input type="reset" value="重置"></td> </tr> </table> </tr> </table> </center> </form> </body> </html> servlet页面 package www.bttc.manager.ownerservlet; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import www.bttc.manager.model.Pets; import www.bttc.manager.model.Powner; import www.bttc.manager.service.OwnerService; import www.bttc.manager.service.PetsService; import www.bttc.manager.service.impl.OwnerServiceImpl; import www.bttc.manager.service.impl.PetsServiceImpl; import www.bttc.manager.utils.ServiceException; public class AddOwnerServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request,response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8");// 设置请求的编码方式 response.setCharacterEncoding("UTF-8");// 设置响应的编码方式 response.setContentType("text/html;charset=utf-8"); OwnerService ownerService=new OwnerServiceImpl(); PetsService petsService=new PetsServiceImpl(); HttpSession session=request.getSession(); int ownerID=Integer.parseInt(request.getParameter("ownerID")); String osex=request.getParameter("osex"); String oname=request.getParameter("oname"); String opassword=request.getParameter("opassword"); int phone=Integer.parseInt(request.getParameter("phone")); String address=request.getParameter("address"); int petID=Integer.parseInt(request.getParameter("petID")); /*try { List<Pets> list=(List<Pets>) petsService.findAllPetID(); //request.setAttribute("ownerID", ownerID); request.setAttribute("list", list); } catch (ServiceException e1) { e1.printStackTrace(); }*/ try { //Pets pets=new Pets(); Pets pets=petsService.findPetsByPetsID(petID); if(ownerService.findOwnerByOwnerID(ownerID)!=null){ session.setAttribute("message", "添加的普通用户记录已存在!"); request.getRequestDispatcher("addowner.jsp").forward(request, response); }else{ Powner owner=new Powner(ownerID,osex,oname,opassword,phone,address,pets); ownerService.addOwner(owner); //Powner owner=ownerService.addOwner(owner); session.setAttribute("message", "添加普通用户已成功!"); request.getRequestDispatcher("/admin.jsp").forward(request, response); } } catch (ServiceException e) { e.printStackTrace(); } } } 另一个servlet package www.bttc.manager.ownerservlet; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import www.bttc.manager.model.Pets; import www.bttc.manager.service.PetsService; import www.bttc.manager.service.impl.PetsServiceImpl; import www.bttc.manager.utils.ServiceException; public class SelectPetID extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request,response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8");// 设置请求的编码方式 response.setCharacterEncoding("UTF-8");// 设置响应的编码方式 response.setContentType("text/html;charset=utf-8"); //int petID=Integer.parseInt(request.getParameter("petID")); PetsService petsService=new PetsServiceImpl(); try { List<Pets> pets = petsService.findAllPetID(); request.setAttribute("listpets", pets); request.getRequestDispatcher("/addowner.jsp").forward(request, response); } catch (ServiceException e) { e.printStackTrace(); } } }
ajax如何实现页面跳转
当我用AJAX像服务器发送一个登录请求后,服务器验证数据是否正确,是则跳到另一个 页面,否则返回一个数据错误的信息给AJAX,页面不刷新。 当验证正确时我用的是servlet的 request.getRequestDispatcher("../index.jsp").forward(request, response);跳转方式 错误就直接out.print();可是不管怎样都是跳到了那个请求页面 请问要怎样才能跳到另一个页面,还能带着数据过去 ajax代码 //声明XMLHttpRequest对象 var xmlrequest; //初始化XMLHttpRequest function createXMLHttpRequest(){ if(window.XMLHttpRequest){ xmlrequest = new XMLHttpRequest(); }else if(window.ActiveXObject){ try{ xmlrequest = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlrequest = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ } } } } //定义回调函数 function processResponse(){ //响应完成 if(xmlrequest.readyState == 4){ //响应正常 if(xmlrequest.status == 200){ var head = xmlrequest.responseText; alert(head); } } } servlet代码 public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("post被触发了"); request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); String account = request.getParameter("account"); String password = request.getParameter("password"); if (account == "admin" & password == "admin"){ request.getRequestDispatcher("../index.jsp").forward(request, response); }else{ PrintWriter out = response.getWriter(); out.print("错误"); }
jsp页面登录错误,doPost代码问题
![图片说明:这是登录界面](https://img-ask.csdn.net/upload/201603/09/1457526889_21465.jpg) ![点登录按钮后,出现下图错误,求大神指教](https://img-ask.csdn.net/upload/201603/09/1457526903_884525.jpg) 这是ManageSevlet.java部分代码: package wyf.zrk; import javax.servlet.http.*; import java.io.*; import javax.servlet.*; import java.util.*; import org.springframework.web.context.support.*; import org.springframework.web.context.*; import org.springframework.beans.factory.*; import java.text.DateFormat; public class ManageServlet extends HttpServlet{ private static final long serialVersionUID = 1L; public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{ this.doPost(request,response); //调用doPost方法 } public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{ request.setCharacterEncoding("gbk"); //设置请求编码格式 response.setCharacterEncoding("gbk"); //设置响应编码 response.setContentType("text/html;charset=gbk"); //设置请求页面格式 PrintWriter out = response.getWriter(); //得到输出流对象 HttpSession session = request.getSession(); UserBean userBean = (UserBean)session.getAttribute("userBean"); if(userBean==null){ userBean = new UserBean(); } //获取WebApplicationContext WebApplicationContext wac= WebApplicationContextUtils.getWebApplicationContext(this.getServletContext()); DButil db = (DButil)wac.getBean("DButil"); DBinsert dbin = (DBinsert)wac.getBean("DBinsert"); DBupdate dbup = (DBupdate)wac.getBean("DBupdate"); DBdelete dbde = (DBdelete)wac.getBean("DBdelete"); String action = request.getParameter("action").trim(); //得到请求动作 if(action.equals("login")){ //动作为登陆时 String aname = request.getParameter("uname").trim();//得到用户名 String apwd = request.getParameter("upwd").trim(); //得到密码 aname = new String(aname.getBytes(),"ISO-8859-1"); //将用户名转码 apwd = new String(apwd.getBytes(),"ISO-8859-1"); //将密码转码 System.out.println(aname+"\t"+apwd); String hql = "from AdminInfo as p "+ //hql语句 "where p.aname='"+aname+"' and p.apwd='"+apwd+"'"; List<AdminInfo> list = (List<AdminInfo>)db.getInfo(hql); String url = ""; //记录提示信息 if(!list.isEmpty()){ AdminInfo ai = list.get(0); url = "/index.jsp"; session.setAttribute("admin",aname); //将管理员名存入session session.setAttribute("alevel",ai.getAlevel()); //将管理员级别存入session } else{ String msg = "对不起,登陆失败!!!"; request.setAttribute("msg",msg); //将错误信息添加到请求中 url = "/info.jsp"; } ServletContext sc = getServletContext(); //得到上下文 RequestDispatcher rd = sc.getRequestDispatcher(url); rd.forward(request,response); //页面跳转 } else if(action.equals("logout")){ //当管理员注销时 request.getSession(true).invalidate(); //使session失效 response.sendRedirect("adminlogin.jsp"); //页面跳转 } 求大神指教,在做一个进销存管理系统,菜鸟一个呀 ![这里是对应的代码段](https://img-ask.csdn.net/upload/201603/10/1457579739_417489.jpg)
http协议怎么下载中文名的文件,总是乱码
加了下载响应头“Content-Disposition”"attachment;filename=xxxxxxx" 我做了个下载本地文件的应用,用的JSP显示本地文件然后发出http请求给Servlet下载下来的文件名都是响应头里的filename给的 可是http响应式ISO-8859-1编码,绝对显示不出中文的,怎么办呢,下下来的中文名文件都没名字
tomcat中,访问html时,会走servlet引擎吗?
servlet和jsp由tomcat的servlet引擎统一管理,servlet的资源地址都有RequestDispacher包装。 当用户访问html文件的时候,tomcat会为该html文件生成servlet来处理请求和生成响应吗?有专门的RequestDispacher包装吗? 另外的资源呢?如css文件,js文件,和图片等等。 找不到这方面的资料查,向各位高人寻求帮助。
ajax怎样获取返回的特定值
ajax代码 //声明XMLHttpRequest对象 var xmlrequest; //初始化XMLHttpRequest function createXMLHttpRequest(){ if(window.XMLHttpRequest){ xmlrequest = new XMLHttpRequest(); }else if(window.ActiveXObject){ try{ xmlrequest = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlrequest = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ } } } } //定义回调函数 function processResponse(){ //响应完成 if(xmlrequest.readyState == 4){ //响应正常 if(xmlrequest.status == 200){ var head = xmlrequest.responseText; alert(head); // location.href = head; } } } //事件处理函数 function change(){ //初始化XMLHttpRequest对象 createXMLHttpRequest(); //设置请求的URI var uri = "servlet/LoginServlet"; //打开与服务器响应地址的连接 xmlrequest.open("POST", uri, true); //设置请求头 xmlrequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); //设置处理响应的回调函数 xmlrequest.onreadystatechange = processResponse; var account = document.form.account.value; var password = document.form.password.value; //发送请求 xmlrequest.send("account=" + account + "&password=" + password); } servlet代码: public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("post被触发了"); request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); String account = request.getParameter("account"); String password = request.getParameter("password"); // if (account == "admin" & password == "admin"){ HttpSession session=request.getSession(); session.setAttribute("client","返回的用户名"); PrintWriter out = response.getWriter(); out.print("index.jsp"); out.print("返回了吗"); 我要怎样做才能获取上面那两个our.print的值呢,是分别获取,不是组成一个字符串
为什么AJAX调用不了Servlet控制器
1、这是登录页面login.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript" language="javascript"> var XMLHttpReq = false; function creatXMLHttpRequest(){ if (window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } } } //发送请求的函数 function sendRequest(url){ alert(url); creatXMLHttpRequest(); XMLHttpReq.open("GET",url,true); XMLHttpReq.onreadystatechange = processResponse();//指定响应函数 alert("66"); XMLHttpReq.send(null);//发送请求 } //处理返回信息函数 function processResponse(){ alert("3333"); if(XMLHttpReq.readyState==4)//判断对象状态 { alert("444"); if(XMLHttpReq.status==200){//信息已经成功返回,开始处理信息 alert("55555"); var res = XMLHttpReq.responseXML.getElementsByTagName("res")[0].firstChild.data; window.alert(res); }else{ window.alert("你所请求的页面有问题"); } } } function checkUser(){ var Uname = document.myform.myname.value; alert(Uname); var psw = document.myform.mypsw.value; alert(psw); if(Uname==null){ window.alert("名字不能为空"); document.myform.myname.focus(); return false; }else{ var url = "LoginAction?myname="+Uname+"&mypsw="+psw;//应该是这里,为什么没起作用 sendRequest(url); System.out.println("2222222222222"); } } </script> </head> <body> <form action="" method="post" name = "myform"> name:&nbsp&nbsp&nbsp&nbsp<input type="text" name="myname" size="12"><p> password:<input type="password" name="mypsw" size="12"><p> <input type="button" value="确定" onclick="checkUser()"> </form> </body> </html> 2、这是Servlet页面 package com.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class LoginAction extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("进入servlet"); request.setCharacterEncoding("UTF-8"); String uname = request.getParameter("myname"); String psw = request.getParameter("mypsw"); response.setContentType("text/xml;charset=UTF-8"); response.setHeader("Cache-Control", "no-cache"); PrintWriter out = response.getWriter(); out.println("<response>"); if(uname.equals("amin")&&psw.equals("a")){ out.println("<res>"+"热烈欢迎AMIN"+"</res>"); }else{ out.println("<res>"+"对不起你登录失败"+"</res>"); } out.println("</response>"); out.close(); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request,response); } public void init() throws ServletException { // Put your code here } } 3、这是Web.xml页面 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <description>This is the description of my J2EE component</description> <display-name>This is the display name of my J2EE component</display-name> <servlet-name>LoginAction</servlet-name> <servlet-class>com.servlet.LoginAction</servlet-class> </servlet> <servlet-mapping> <servlet-name>LoginAction</servlet-name> <url-pattern>/LoginAction</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> </web-app> 可以说说为什么调用不了?
基于TOMCAT容器的BASIC认证,如何对C语言客户端的HTTP请求进行认证
我现在用SERVLET和JSP开发了一个WEB应用,其中有一项主要功能是响应来自C语言客户端的HTTP请求.在没有采用基于TOMCAT容器的BASIC认证之前,通信完全没有问题.但是如果服务端增加了认证功能之后,来自客户端的请求被拒绝了.请问怎么设置才能实现客户端的通信要求?客户端也能够发送认证密码和拥护名给服务端,就是不知道服务端怎么设置和处理!
为什么我的我用AJAX提交数据到Servlet最后数据始终是乱码??
这是jsp的页面,数据提交到doPost,然后响应到div里面显示,但是 AJAX中的中文数据提交到Servlet 始终是乱码;怎么改啊,大神们。。。 ``` <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- 引入写了AJAX的js文件 --> <script type="text/javascript" src="${pageContext.request.contextPath }/AJAXDemo02POST/ajax_posttext.js"></script> <title>Insert title here</title> </head> <body> <h1>AJAX POST获取数据的练习</h1> <div style="width:300px;height:200px;border:1px solid red;" id="divajax"></div> <input type="button" value="点我获取数据" onclick="ajaxPostText()"/> </body> </html> ``` 这是 写了AJAX的js的文件 function ajaxPostText(){ // 创建异步对象: var xhr = createXMLHttp(); // 设置监听: xhr.onreadystatechange = function(){ if(xhr.readyState == 4){ if(xhr.status == 200){ document.getElementById("divajax").innerHTML = xhr.responseText; } } } // 打开路径: xhr.open("POST","/AJAXDemo01/AJAXDemo01Servlet",true); //这一句没能将提交到post的中文数据编码改掉 xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); // 发送请求: xhr.send("name=张三&pass=密码"); } function createXMLHttp() { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch (e) { try {// Internet Explorer xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } } } return xmlHttp; } 这是Servlet代码 public class AJAXDemo01Servlet extends HttpServlet { private static final long serialVersionUID = 1L; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//未完成 request.setCharacterEncoding("UTF-8"); String pass =request.getParameter("pass"); String name = request.getParameter("name"); response.setContentType("text/html;charset=UTF-8"); response.getWriter().println( "名称是:" + name + "密码是:" + pass); System.out.println("名称是:" + name + "密码是:" + pass); } } ![图片说明](https://img-ask.csdn.net/upload/201709/17/1505634495_151318.png)
jsp+servlet开发碰到查询数据"错乱"现象
我和我的同事在做web测试时发现一个诡异的问题 我们都用各自的用户名正常登录后,对数据库进行增删改查的操作,比如: select * from bill where userId='"+userId+"'" 但是奇怪的是有时候查询到的不是自己录入的记录,是别人的; 而别人会查询到我的记录。 我查了下,代码应该不会有错,因为userId登录后肯定不会变,相当于一个常量了。 那为什么还会出现上面的情况呢,请同志们看看啊,谢谢。 我猜是不是没有使用ThreadLocal,大家在用同一条线程操作数据库啊? [b]问题补充:[/b] 对的,的却是后登录者替换了前面的!!! [b]问题补充:[/b] hearken01大虾,可以可以给个例子代码,麻烦您了,谢谢! [b]问题补充:[/b] 这个是我使用的数据库类,看下有什么问题 [code="java"] public class DBConnection { public ThreadLocal threadConnection = new ThreadLocal(); public Connection conn = null; public DBConnection() { } public Connection getMySqlConnection() { try { Class.forName(Constants.driver); conn = DriverManager.getConnection(Constants.url, Constants.name,Constants.password); if (conn == null) throw new SQLException("Can't connect MsSql!"); } catch (ClassNotFoundException e2) { e2.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } return conn; } public Connection getCurrentConnection() throws SQLException { conn = (Connection) threadConnection.get(); if (conn == null) { System.out.println("--------------打开链接---------------------"); conn = getMySqlConnection(); threadConnection.set(conn); } return conn; } public Connection getCurrentConnection(boolean isTransaction) throws SQLException { conn = (Connection) threadConnection.get(); if (conn == null) { conn = getMySqlConnection(); threadConnection.set(conn); } if (isTransaction) conn.setAutoCommit(false); return conn; } public void closeCurrentConnection() { try { Connection conn = (Connection) threadConnection.get(); threadConnection.set(null); conn.close(); } catch (SQLException e) { e.printStackTrace(); } } public void closeConnection(Connection conn) throws SQLException { try { if (conn != null) conn.close(); } catch (SQLException e) { e.printStackTrace(); } } public void beginTransaction() { try { getCurrentConnection().setAutoCommit(false); } catch (SQLException e) { e.printStackTrace(); } } public void commitTransaction() { try { getCurrentConnection().commit(); } catch (SQLException e) { e.printStackTrace(); } } public void rollbackTransaction() { try { getCurrentConnection().rollback(); } catch (SQLException e) { e.printStackTrace(); } } public int executeUpdate(String sqlQuery, String sqlValue[])throws Exception { int count = 0; try { PreparedStatement ps = conn.prepareStatement(sqlQuery); if (sqlValue != null) { for (int i = 0; i < sqlValue.length; i++) ps.setString(i + 1, sqlValue[i]); } count = ps.executeUpdate(); } catch (Exception e) { throw e; } return count; } //记录数 public int executeQuery(String sql){ ResultSet rs = null; PreparedStatement ps; int count=0; try { ps = conn.prepareStatement(sql); rs = ps.executeQuery(sql); rs.next(); count=rs.getInt(1); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return count; } public ArrayList executeQueryList(String sql) { Statement st = null; ArrayList alResult = new ArrayList(); try { st = conn.createStatement(); ResultSet rs = st.executeQuery(sql); ResultSetMetaData rsmd = rs.getMetaData(); int count = rsmd.getColumnCount(); String colum[] = new String[count]; for (int i = 0; i < colum.length; i++) if (rsmd.getColumnName(i + 1) != null) colum[i] = rsmd.getColumnName(i + 1); else colum[i] = rsmd.getColumnLabel(i + 1); HashMap hdRow = null; String fieldValue = null; for (; rs.next(); alResult.add(hdRow)) { hdRow = new HashMap(); for (int i = 0; i < colum.length; i++) { int iType = rsmd.getColumnType(i + 1); if (iType == 2 || iType == 3) { if (rsmd.getScale(i + 1) == 0) fieldValue = String.valueOf(rs.getLong(i + 1)); else fieldValue = rs.getString(i + 1); } else if (iType == 8) fieldValue = String.valueOf(rs.getDouble(i + 1)); else if (iType == 6 || iType == 7) fieldValue = String.valueOf(rs.getFloat(i + 1)); else fieldValue = rs.getString(i + 1); if (fieldValue == null) fieldValue = ""; else fieldValue = fieldValue.trim(); hdRow.put(colum[i], fieldValue);//.toLowerCase() } } } catch (Exception e) {} return alResult; } public static void main(String arg[]) throws Exception { DBConnection db = new DBConnection(); db.getCurrentConnection(); } } [/code] [b]问题补充:[/b] 我在servlet里这样用的,有什么不妥? [code="java"] public class LoginServlet extends HttpServlet{ private DBConnection db; public void init() throws ServletException { db = new DBConnection();//打开链接 try { db.getCurrentConnection(); } catch (SQLException e1) { } } public void destroy() { db.closeCurrentConnection(); } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String sql="select * from bill where userId='"+userId+"'" ; List list=db.executeQueryList(sql); ......... } } [/code] [b]问题补充:[/b] To hearken01: 我把ThreadLocal部分去掉,还是不行啊。 [b]问题补充:[/b] To 蔡华江: 这里别省?什么意思,完整些啊,麻烦了。 [b]问题补充:[/b] To Ihavegotyou: 没有static的都。 [b]问题补充:[/b] To 蔡华江: [code="java"] public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String sql="select * from bill where userId='"+userId+"'" ; List list=db.executeQueryList(sql); request.setAttribute("list", list); request.getRequestDispatcher("infoList.jsp").forward(request, response); } [/code] 省略号里就这些啊,也没什么特别的啊 [b]问题补充:[/b] TO hearken01: userId就是登录的时候表单里的数据,这样子: [code="java"] String userId=request.getParameter("userId"); String password=request.getParameter("password"); String sql="select * from user where userId='"+userId+"' and password='"+password+"'"; List list=db.executeQueryList(sql); if(list==null||list.size()==0){//没有记录 ...... }else{ request.getSession().setAttribute(Constants.USER_KEY, userId);//一旦登录成功,创建session ...... } [/code] 就是这么做的,也没什么特别的。 [b]问题补充:[/b] to hearken01: 后台打印出来是变了,可为什么变了呢?这个。。。。 :cry: [b]问题补充:[/b] to hearken01: 恩,不过我也在不同的机器上试过2个帐号,结果都一样查询错乱。 [b]问题补充:[/b] to hearken01: 你当初是怎么解决的呢? “我就把那些公共的方法,改成了要传入request和response,接下来就没这样的问题出现了,我想你的问题应该是请求和响应错乱了。” QQ聊吧,50342016
python爬虫爬取时提示org.xml.sax.SAXParseException: Content is not allowed in prolog.
最近在研究爬虫,请求方法是POST,请求内容类型是application/x-www-form-urlencoded,说明以表单的方式提交。 观察响应正文,可以发现,响应内容类型是xml,其中想要提取的数据就在new节点内: ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566957248_729059.png) 首先构造headers: ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566957271_146204.png) 请求参数在请求正文中: ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566957295_533999.png) 可以发现请求参数也是放在xml中,将__xml参数解码后可以发现内容如下: ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566957318_627236.png) 提交的参数放在p标签里,每次提交请求变化的也只有那些参数,并没有发现加密的迹象 因此构造params: ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566957346_765493.png) 代码如下: ```python import requests target = ".../dorado/smartweb2.RPC.d?__rpc=true" # 公司内网地址,外网无法访问 headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko", "Referer": ".../pages/policynewbiz/inputapplication/pmGDVehicleQuery.jsp?VEHICLELICENSE=&VIN=LEFYECG257HN34234&LICENSETYPE=&Kind=AUTOCOMPRENHENSIVEINSURANCE2014PRODUCT&", "Content-Type": "application/x-www-form-urlencoded", "Cookie": "jsessionidp09=X2tfdlLTBZH7xzKwnhSgh2W2N5374T0HnHWYQkl2MRShjBxfpKpW!1484787398; F5cookie=1410712842.6521.0000" } params = { "__type": "loadData", "__viewInstanceId": "org.view.policynewbiz.inputapplication.pmGDVehicleQuery~org.view.common.viewmodel.CpicViewModel", "__xml": '%3Crpc%20id%3D%22datasetResult%22%20type%3D%22wrapper%22%20objectClazz%3D%22%22%20pi%3D%221%22%20ps%3D%22100%22%20pc%3D%221%22%20prc%3D%220%22%20fs%3D%22vin%2ClicensePlateNo%2ClicensePlateType%2CengineNo%2CpmVehicleType%2CpmUserNature%2CineffectualDate%2CrejectDate%2CfirstRegisterDate%2ClastCheckDate%2CtransferDate%2CwholeWeight%2CratedPassengerCapacity%2Ctonnage%2Cdisplacement%2CmadeFactory%2Cmodel%2CbrandCN%2CbrandEN%2Chaulage%2Ccolor%2CfuelType%2CvehicleStatus%2CmotorTypeCode%22%3E%3Cps%3E%3Cp%20name%3D%22flag%22%3E1%3C/p%3E%3Cp%20name%3D%22carMark%22/%3E%3Cp%20name%3D%22RackNo%22%3E2FMDK3J95DBC93811%3C/p%3E%3C/ps%3E%3C/rpc%3E%0D%0A', "__rpc": "true", } res = requests.post(url=target, headers=headers, data=params) html = res.content.decode("utf-8") print(html) ``` 执行结果报错: ```python D:\Users\CPIC\AppData\Local\Programs\Python\Python37\python.exe E:/Workspace/Python/SchoolInfo/test56.py <?xml version="1.0"?> <result succeed="false" > <errorMessage>org.xml.sax.SAXParseException: Content is not allowed in prolog.</errorMessage> <stackTrace><![CDATA[com.bstek.dorado.utils.xml.dom4j.Dom4jXmlBuilder.buildDocument(Dom4jXmlBuilder.java:59) com.bstek.dorado.view.rpc.AbstractRPCHandler.init(AbstractRPCHandler.java:58) com.bstek.dorado.view.rpc.LoadDataRPCHandler.init(LoadDataRPCHandler.java:41) com.bstek.dorado.core.FilterHandle.doFilter(FilterHandle.java:131) com.bstek.dorado.core.DoradoFilter.doFilter(DoradoFilter.java:70) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43) com.cpic.p09.auto.common.filter.CompatibleFilter.doFilter(CompatibleFilter.java:34) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:43) com.cpic.p09.auto.common.filter.ClientCacheFilter.doFilter(ClientCacheFilter.java:71) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916) weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) weblogic.work.ExecuteThread.run(ExecuteThread.java:181) ]]></stackTrace> <viewProperties></viewProperties> </result> Process finished with exit code 0 ``` 有哪位大神遇到过这种情况,小弟要抓狂了
关于用java开发微信公众平台开发 token验证失败的问题
大家好,最近在学习用java开发微信公众平台,第一次写的代码token验证通过了,用的是阿里云的服务器换系统(server2008->2003)后就怎么也通过不过验证。直接输入域名www.zhenggufang.com/aip/longin网页显示404.域名也已经备过案。服务器上的tomcat也启动正常tomcat/conf/server也修改了。多谢提交还是token验证失败。请各位帮忙看看代码如下: package service; import java.io.IOException; import java.io.PrintWriter; import java.util.Date; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import message.resp.TextMessage; import util.ValidationUtil; public class LoginServlet extends HttpServlet{ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println(get 请求); String signature = request.getParameter(signature); String timestamp = request.getParameter(timestamp); String nonce= request.getParameter(nonce); String echostr=request.getParameter(echostr); PrintWriter out=response.getWriter(); System.out.println(signature+ signature); System.out.println(timestamp+ timestamp); System.out.println(nonce+ nonce); System.out.println(echostr+ echostr); 验证请求确认成功原样返回echostr参数内容,则接入生效,成为开发者成功,否则 if(ValidationUtil.chechSignature(signature, timestamp, nonce)) { out.print(echostr); } out.close(); } 接受微信服务器发过来的xml数据包(通过post)形式发过来的 @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String respXml=;响应的xml串 request.setCharacterEncoding(utf-8); response.setCharacterEncoding(utf-8); String signature = request.getParameter(signature); String timestamp = request.getParameter(timestamp); String nonce= request.getParameter(nonce); PrintWriter out=response.getWriter(); if(ValidationUtil.chechSignature(signature, timestamp, nonce)) { 接收并解析来自用户的xml数据包中的内容 MapString,String reqMap=MessageUtil.parseXml(request); String ToUserName=reqMap.get(ToUserName); String FromUserName=reqMap.get(FromUserName); String MsgType=reqMap.get(MsgType); String Content=reqMap.get(Content); System.out.println(用户给公众号发的消息+Content); 开始响应消息给用户 String respContent=;要响应的文本内容 构建一条文本消息 TextMessage textMsg=new TextMessage(); textMsg.setFromUserName(FromUserName); textMsg.setFromUserName(ToUserName); textMsg.setCreateTime(new Date().getTime()); textMsg.setMsgType(MessageUtil.RESP_MESSAGE_TYPE_TEXT); if(MsgType.equals(MessageUtil.RESP_MESSAGE_TYPE_TEXT)) { respContent=大家好,来自工作公众平台的测试消息!!; } textMsg.setContent(respContent); respXml=MessageUtil.messageToXml(textMsg); System.out.println(respXml+respXml); 接受打印的字符 out.println(respXml); } out.close(); out=null; } } package util; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Arrays; /** * 微信请求校验工具类 * @author y * */ public class ValidationUtil { private static String token="wlghr0479"; public static boolean chechSignature(String signature,String timestamp,String nonce) { //1.将token,timestamp,nonce三个参数排序 String[] str= new String[]{token,timestamp,nonce}; Arrays.sort(str); //2.将三个参数字符串接成一个字符串 StringBuilder buff=new StringBuilder(); for (int i=0;i<str.length;i++) { buff.append(str[i]); } //3.进行sha1加密 MessageDigest md=null; String result=""; try { md= MessageDigest.getInstance("SHA-1"); byte[]date =md.digest(buff.toString().getBytes()); //将字节数组转换成字符串 result=bytesToStr(date); System.out.println("加密后的"+result); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } return result!=null ?(result.equals(signature.toUpperCase())) :false; } //将直接数组转换成十六进制字符串 private static String bytesToStr(byte[] byteArray) { String strDigest=""; for (int i=0;i<byteArray.length;i++) { strDigest += byteToHexStr(byteArray[i]); } return strDigest; } //将一个字节转换成16进制字符串 private static String byteToHexStr(byte mByte) { char[]Digit ={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; char[]temp1=new char[2]; temp1[0]=Digit[mByte>>>4 & 0X0F]; temp1[1]=Digit[mByte & 0X0F]; String str=new String(temp1); return str; } } <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <!-- 部署配置 --> <servlet> <servlet-name>LoginServlet</servlet-name> <servlet-class>service.LoginServlet</servlet-class> </servlet> <!-- 配置映射 --> <servlet-mapping> <servlet-name>LoginServlet</servlet-name> <url-pattern>/api/login</url-pattern> </servlet-mapping> <display-name></display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
Idea 中最常用的10款插件(提高开发效率),一定要学会使用!
学习使用一些插件,可以提高开发效率。对于我们开发人员很有帮助。这篇博客介绍了开发中使用的插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
立即提问