为什么启动tomcat会调用ServletContextAttributeListener的attributeAdded方法。

代码如下:public class Mylist implements ServletContextAttributeListener{

@Override
public void attributeAdded(ServletContextAttributeEvent sce) {
    System.out.println("添加属性"+sce.getName()+":"+sce.getValue());
}

@Override
public void attributeRemoved(ServletContextAttributeEvent arg0) {

}

@Override
public void attributeReplaced(ServletContextAttributeEvent arg0) {

}

}
Tomcat启动时:图片说明

为什么在启动tomcat时候会调用ServletContextAttributeListener的attributeAdded方法,添加了的数据是什么

0

1个回答

你的配置文件有没有配置呢?

0
qq_40875650
qq_40875650 xml,那里已经注册了监听器
9 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
为什么启动tomcat会调用ServletContextAttributeListener的attributeAdded方法等?
刚刚学习了监听器,发现了几个现象不知道怎么解释?rn1.监听ServletContextListener,ServletContextAttributeListener后发现,每当启动tomcat时,都会调用attributeAdded()这个方法,不知道是为什么?rn而且在第一次访问页面时也会调用attributeAdded?rn2.监听ServletRequestListener,每次刷新页面时都会调用requestInitialized(ServletRequestEvent sre),requestDestroyed(ServletRequestEvent sre),这是为什么?rnrn以下是部分重写的监听器方法:rnrnpublic void attributeAdded(ServletContextAttributeEvent arg0) rn System.out.println("您向ServletContext中添加了一个属性");rn rnpublic void requestDestroyed(ServletRequestEvent arg0) rn System.out.println("一个request被销毁");rn rnrn public void requestInitialized(ServletRequestEvent arg0) rn System.out.println("一个request被创建");rn rnrn以下是jsp页面:rn<%rnString path = request.getContextPath();rnString basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";rnrn//测试TestServletContextListener等rnapplication.setAttribute("test","test");rnapplication.removeAttribute("test");rnapplication.setAttribute("test","test");rnapplication.setAttribute("test","other");rnrn//测试ServletRequestListener等rnString test = (String)request.getAttribute("test");rnrequest.setAttribute("test",test);rnrn%>
ServletContextAttributeListener
"java大数据培训学校全套教材"系列课程由750集视频构成,基本就 是1)时下流行的java培训学校主流内部教材,2)和市面上培训学校的通 行的课程体系几乎一样。所以这套课程都能自己学下来,等于上了培训学 校一次,完全可以找个java工程师的工作了。rn 本门课程为"java大数据培训学校全套教材"系列课程的第十八篇,通过学习让大家对Filter与Listener编程打下好的基础。
为什么会调用toString()方法????
package org.ngweb.java.chapt04.lang;rnrnpublic class ObjectDemo rn public static void main(String[] args) rn Student student = new Student();rn student.name = "张明";rn System.out.println("学生类是: " + student);rn // 字符串连接符 + 调用的是类的toString()方法rn rnrnrnclass Student rn String name;rnrn public String toString() // 覆盖Object类的toString()方法rn return name;rn rn
java 启动tomcat时为什么会报错
做项目的过程中,因为涉及到修改代码,往往需要重启tomcat,为什么我重启的时候老是要报错【有时先停掉 再启动也要报这个错】:rn严重: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: beans.Regionrnjava.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: beans.Regionrn at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)rn at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)rn at java.util.ArrayList.readObject(ArrayList.java:593)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)rn at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)rn at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)rn at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)rn at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)rn at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1439)rn at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:942)rn at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:394)rn at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)rn at org.apache.catalina.session.StandardManager.start(StandardManager.java:637)rn at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:433)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4257)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)rnrn但是,报错后,停掉,再启动,就没有错了,想问问这是为什?rn看错误的意思 是不是 说 session已经存在 ?rn搞不懂 求 指导 O(∩_∩)O~
为什么启动会这样?
在启动2000的时候,提示boot.ini非法,从winnt启动,接下来一切正常,这到底是什么故障?
Tomcat启动不了,为什么?
我用的是redhat7.2+j2sdk1.4.0,设置好了JAVA_HOME,下载的Tomcat为jakarta-tomcat-4.1.10.tar.gz,解开后到bin里执行./startup.sh,http://localhost:8080提示找不到页面,同时telnet 127.0.0.1 8080也连不上,那一定是服务器没有运行,查看logs目录下有一文件catalina.out,内容如下:rnrnjava.lang.NoSuchMethodError: java.util.logging.Logger.logp(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Vrn at org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:126)rn at org.apache.commons.logging.impl.Jdk14Logger.info(Jdk14Logger.java:192)rn at org.apache.commons.modeler.Registry.loadRegistry(Registry.java:264)rn at org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java:1591)rn at org.apache.catalina.mbeans.MBeanUtils.(MBeanUtils.java:162)rn at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.(GlobalResourcesLifecycleListener.java:115)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:33)rn at sun.reflect.InflatableConstructorAccessorImpl.newInstance(InflatableConstructorAccessorImpl.java:38)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:273)rn at java.lang.Class.newInstance0(Class.java:290)rn at java.lang.Class.newInstance(Class.java:249)rn at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:253)rn at org.apache.commons.digester.Digester.startElement(Digester.java:1237)rn at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:454)rn at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:217)rn at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:594)rn at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:777)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1453)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)rn at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)rn at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)rn at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)rn at org.apache.commons.digester.Digester.parse(Digester.java:1495)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:449)rn at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)rn at org.apache.catalina.startup.Catalina.process(Catalina.java:180)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:30)rn at sun.reflect.InflatableMethodAccessorImpl.invoke(InflatableMethodAccessorImpl.java:48)rn at java.lang.reflect.Method.invoke(Method.java:306)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)rnrn
为什么tomcat启动不了?
运行bin下的startup。batrn屏幕很快闪动后,但tomcat并没有启动。rn为什么?
tomcat为什么不能启动?
tomcat为什么不能启动?rn我在配置tomcat和apach的时候,改动了一些文件,后来tomcat就不能启动了,卸载后重装,也不能启动,环境变量我已经配置了。
为什么启动不了tomcat???
请高手帮忙,我刚学JSP,装了JDK和TOMCAT,打开那个startup,但开不了,再到浏览器输入http://localhost:8080/,没有可显示的页面,我D:\apache-tomcat-6.0.18\logs中的错误信息是:rn2009-4-6 0:33:42 org.apache.catalina.core.AprLifecycleListener initrn信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: c:\jdk1.6.0_01\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;;C:\jdk1.6.0_01\binrn2009-4-6 0:33:43 org.apache.coyote.http11.Http11Protocol initrn严重: Error initializing endpointrnjava.net.BindException: Cannot assign requested address: JVM_Bind:8080rn at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)rn at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)rn at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)rn at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)rn at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:530)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:550)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)rn2009-4-6 0:33:43 org.apache.catalina.startup.Catalina loadrn严重: Catalina.startrnLifecycleException: Protocol handler initialization failed: java.net.BindException: Cannot assign requested address: JVM_Bind:8080rn at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)rn at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)rn at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:530)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:550)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)rn2009-4-6 0:33:43 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 1408 msrn2009-4-6 0:33:43 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2009-4-6 0:33:43 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/6.0.18rn2009-4-6 0:33:44 org.apache.coyote.http11.Http11Protocol startrn严重: Error starting endpointrnjava.net.BindException: Cannot assign requested address: JVM_Bind:8080rn at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)rn at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:519)rn at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)rn at org.apache.catalina.connector.Connector.start(Connector.java:1131)rn at org.apache.catalina.core.StandardService.start(StandardService.java:531)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:578)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn2009-4-6 0:33:44 org.apache.catalina.startup.Catalina startrnrn请高手们帮我解决,小弟感激不尽rn
为什么启动不了TOMCAT?
我在命令行中输入startup,为什么出现提示:CATALINA环境变量没有设置?请问各位大虾应该在哪儿,该如何正确设置CATALINA环境变量.
tomcat为什么启动不了?
上次在tomcat还没启动完的时候就关闭,结果在启动时:rnD:\tomcat-4.0.6\bin>startuprnUsing CATALINA_BASE: ..rnUsing CATALINA_HOME: ..rnUsing CATALINA_TMPDIR: ..\temprnUsing JAVA_HOME: D:\j2sernjava.util.zip.ZipException: error in opening zip filern at java.util.zip.ZipFile.open(Native Method)rn at java.util.zip.ZipFile.(ZipFile.java:112)rn at java.util.jar.JarFile.(JarFile.java:117)rn at java.util.jar.JarFile.(JarFile.java:55)rn at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(rnStandardClassLoader.java:1216)
为什么tomcat不能启动?
我环境变量都设置好了~rnrn点击 startup.bat 时 dos界面一闪而过rnrn
为什么tomcat启动不了
各位高手,请帮我一个忙吧。昨天我可以启动tomcat,并运行了一个应用程序。但今天就启动不了tomcat,回想今天我只是改个IP地址,由本来的X.X.X.222改为X.X.X.17,其他也没做过什么。但把IP地址改回来也启动不了tomcat。在logs文件夹里面stderr.log信息里显示以下代码:rn2005-10-26 19:43:11 org.apache.commons.digester.Digester fatalErrorrn严重: Parse Fatal Error at line 361 column 39: Attribute name "reloadable-" associated with an element type "Context" must be followed by the ' = ' character.rnorg.xml.sax.SAXParseException: Attribute name "reloadable-" associated with an element type "Context" must be followed by the ' = ' character.rn at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)rn at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)rn at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)rn at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)rn at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at org.apache.commons.digester.Digester.parse(Digester.java:1548)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:489)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:528)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:250)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:424)rn2005-10-26 19:43:12 org.apache.commons.digester.Digester fatalErrorrn严重: Parse Fatal Error at line 361 column 39: Attribute name "reloadable-" associated with an element type "Context" must be followed by the ' = ' character.rnorg.xml.sax.SAXParseException: Attribute name "reloadable-" associated with an element type "Context" must be followed by the ' = ' character.rn at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)rn at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)rn at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)rn at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)rn at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at org.apache.commons.digester.Digester.parse(Digester.java:1548)rn at org.apache.catalina.startup.Catalina.load(Catalina.java:489)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:548)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)rn2005-10-26 19:43:12 org.apache.catalina.startup.Catalina startrn信息: Server startup in 0 msrnjava.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)rnCaused by: java.lang.NullPointerExceptionrn at org.apache.catalina.startup.Catalina.await(Catalina.java:619)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:579)rn ... 6 morern请问谁能帮我解答,感谢!
Tomcat为什么启动不了
我的Tomcat为什么启动不了rnUsing CATALINA_BASE e:\tomcat 5.0rnUsing CATALINA_Home e:\tomcat 5.0rnUsing CATALINA_TMPDIR e:\tomcat 5.0\temprnUsing JAVA_HOME c:\j2sdk1.4.2_04rn这些环境变量我都设好了,咋启动startup时,运行了一半就关闭了呢?
为什么不能启动tomcat?
在/etc/rc.d/rc.local中加入:rn/usr/local/tomcat/bin/startup.shrn/usr/local/apache/bin/apachectl startrn我的机器启动好后,为什么apache启动没问题,而tomcat却没有启动?只有再运行startup.sh后才好了,为什么?
Tomcat为什么启动不了???
如题!!!
Tomcat启动时方法启动
启动Tomcat的时候方法启动 ,可以使用监听。 1.继承ServletContextListener ,实现 contextInitialized(),contextDestroyed(),两个方法  。(第一个是要执行的方法,第二个监听器销毁) 2.配置web.xml监听(谨记) 3.测试结果
Tomcat启动执行方法
使用线程实现执行方法不影响Tomcat的正常启动。 web.xml: &amp;lt;!-- 配置tomcat 初始化数据 --&amp;gt; &amp;lt;servlet&amp;gt; &amp;lt;servlet-name&amp;gt;event-collector&amp;lt;/servlet-name&amp;gt; &amp;lt;servlet-class&amp;gt;com.hanshow.wise.base.delivery...
tomcat的启动方法
tomcat的启动方法
为什么调用terminate()方法,会出现系统错误??
生成一个线程对象,然后想通过terminate()方法将其终止,为什么会弹出一个系统对话框,说出现错误呢??rnrnProject NodeControl.exe raised exception class rnEAccessViolation with message'Access violation at rnaddress 4003648c in module 'rt160.bpl'.Write of addressrn0000000D'.Process stopped.Use or Run to continue.rnrn请问如何解决呢?
调用自编的方法时,为什么会报错?
提示是[Error] umain.pas(128): This form of method call only allowed for class methodsrn请问这是为什么?rn方法的代码及调用代码如下:rnfunction TMainForm.convertunixeproctime(rawtime: string):int64;rnvarrn raw:tdatetime;rnbeginrn raw:=strtodatetime(rawtime);rn result:=datetimetounix(raw);rnend;rnrnrnprocedure TMainForm.btnSiteRankQueryClick(Sender: TObject);rnvarrn inittime:string;rn convertedtime:int64;rnbeginrn inittime:=cbbYear.Text; rn convertedtime:=tMainForm.convertunixeproctime(inittime);rnend;
【tomcat】怎么让tomcat启动变快 tomcat启动快方法
tomcat启动快方法,tomcat优化实用方法,web.xml文件配置,<absolute-ordering/>
java调用命令行启动tomcat
java调用命令行启动tomcat
为什么会tomcat缺了个头?
我的build.xml如下:rn ......rn rn ......rn ......rn rn rn rn rn rn rn rn .......rnrn我给她来个ant all,结果出现这么个问题:rnD:\ omcat5\common\endorsed not foundrnrntomcat 少了t,但build.xml里并不缺啊?听说ant 用java写的,难道是转义字符\t在做怪??rn如果果真是这样,我就修改成这样value="D:\\tomcat5”,结果还是同样的问题!!!rn哪位高手知道是什么原因?怎么解决这个问题?rn谢谢!!
tomcat 配置为什么会还原?
请问下,项目通过eclipse 发布之后 ,为什么隔天 之后tomcat上面的配置会还原成最原始的,目前发现 Context.xml 和web.xml 这两个文件是这样, 还有[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/1.gif][/img]我发现 从7.0.23开始之后的版本都是这种情况 。rn搞的我现在每次都要重新配置,终于忍无可忍了。who can tell me why??
tomcat为什么会自动停止?
我在solaris上安装的tomcat4,发现过一段时间后,tomcat服务就会停止,不知是怎么回事?
为什么我的tomcat会自动启动?
为什么我的tomcat会在系统启动时自动启动?(在任务管理器中可以看到,但没有显示)。但在浏览jsp页面时却报错?
为什么会找不到方法?
import javax.swing.*;rn......rn JOptionPane.showConfirmDialog(....)rn......rn编译的时候提示:错误的方法:showConfirmDialog(....)
Springboot web项目 部署到tomcat 为什么会启动两次?
rnrn . ____ _ __ _ _rn /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \rn( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \rn \\/ ___)| |_)| | | | | || (_| | ) ) ) )rn ' |____| .__|_| |_|_| |_\__, | / / / /rn =========|_|==============|___/=/_/_/_/rn :: Spring Boot :: (v1.4.2.RELEASE)rnrn[2016-11-30 10/:37/:46]DEBUG org.jboss.logging(line/:19) -Logging Provider: org.jboss.logging.Log4jLoggerProviderrn[2016-11-30 10/:37/:46]INFO org.hibernate.validator.internal.util.Version(line/:30) -HV000001: Hibernate Validator 5.2.4.Finalrn[2016-11-30 10/:37/:46]INFO com.zhengyang.HgdcmsApplication(line/:48) -Starting HgdcmsApplication v0.0.1-SNAPSHOT on ZF-WJY with PID 41740 (E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes started by Administrator in E:\java_ide\eclipse)rn[2016-11-30 10/:37/:46]DEBUG com.zhengyang.HgdcmsApplication(line/:51) -Running with Spring Boot v1.4.2.RELEASE, Spring v4.3.4.RELEASErn[2016-11-30 10/:37/:46]INFO com.zhengyang.HgdcmsApplication(line/:661) -No active profile set, falling back to default profiles: defaultrn[2016-11-30 10/:37/:46]DEBUG org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver(line/:70) -Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\AdminDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\ChargeDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\LogDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\NoticeDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\PrisonerDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\UserDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\UserInfoDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\UserRoleDao.class]rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'adminDao' and 'com.zhengyang.dao.AdminDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'adminDao'.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'chargeDao' and 'com.zhengyang.dao.ChargeDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'chargeDao'.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'logDao' and 'com.zhengyang.dao.LogDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'logDao'.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'noticeDao' and 'com.zhengyang.dao.NoticeDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'noticeDao'.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'prisonerDao' and 'com.zhengyang.dao.PrisonerDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'prisonerDao'.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'userDao' and 'com.zhengyang.dao.UserDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'userDao'.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'userInfoDao' and 'com.zhengyang.dao.UserInfoDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'userInfoDao'.rn[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:181) -Creating MapperFactoryBean with name 'userRoleDao' and 'com.zhengyang.dao.UserRoleDao' mapperInterfacern[2016-11-30 10/:37/:51]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:217) -Enabling autowire by type for MapperFactoryBean with name 'userRoleDao'.rn十一月 30, 2016 10:37:55 上午 org.apache.catalina.core.ApplicationContext logrn信息: Initializing Spring embedded WebApplicationContextrn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver(line/:70) -Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.rn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.engine.ConfigurationImpl(line/:156) -Setting custom MessageInterpolator of type org.springframework.validation.beanvalidation.LocaleContextMessageInterpolatorrn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.engine.ConfigurationImpl(line/:178) -Setting custom ConstraintValidatorFactory of type org.springframework.validation.beanvalidation.SpringConstraintValidatorFactoryrn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.engine.ConfigurationImpl(line/:192) -Setting custom ParameterNameProvider of type com.sun.proxy.$Proxy56rn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser(line/:91) -Trying to load META-INF/validation.xml for XML based Validator configuration.rn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper(line/:47) -Trying to load META-INF/validation.xml via user class loaderrn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper(line/:54) -Trying to load META-INF/validation.xml via TCCLrn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper(line/:60) -Trying to load META-INF/validation.xml via Hibernate Validator's class loaderrn[2016-11-30 10/:37/:55]DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser(line/:98) -No META-INF/validation.xml found. Using annotation based configuration only.rn[2016-11-30 10/:38/:01]DEBUG org.apache.ibatis.logging.LogFactory(line/:135) -Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.rnrn . ____ _ __ _ _rn /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \rn( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \rn \\/ ___)| |_)| | | | | || (_| | ) ) ) )rn ' |____| .__|_| |_|_| |_\__, | / / / /rn =========|_|==============|___/=/_/_/_/rn :: Spring Boot :: (v1.4.2.RELEASE)rnrn[2016-11-30 10/:38/:17]DEBUG org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver(line/:70) -Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.rn[2016-11-30 10/:38/:17]INFO com.zhengyang.ServletInitializer(line/:661) -No active profile set, falling back to default profiles: defaultrn[2016-11-30 10/:38/:19]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\AdminDao.class]rn[2016-11-30 10/:38/:19]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\ChargeDao.class]rn[2016-11-30 10/:38/:19]DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner(line/:286) -Identified candidate component class: file [E:\workspace2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\hgdcms\WEB-INF\classes\com\zhengyang\dao\LogDao.class]
tomcat5.0 用 tomcat start 为什么会启动不了?
竟然提示 tomcat 不是内部或外部命令,也不是可运行的程序或批处理文件rnrn而我前几天用的早版本的tomcat都能这么做,环境变量也和以前一样设置rnrn现在这 5.0 版本在命令提示符下就没法用,唯一启动方式是像 sqlserver 那样启动rnrnrn问:在命令提示符下怎么启动?
Tomcat启动完毕后启动方法任务
        Tomcat启动完成后再执行一个指定的方法,不影响Tomcat的启动时间。         本文主要介绍Tomcat启动真正完成后(即在eclipse的控制台上出现类似于Server started in 2300ms这样的消息后)执行一个操作。          如下的3种方法都是在Tomcat启动过程中执行的,这样会影响Tomcat的启动时间,从而造成Tomcat不能启...
Flask-为什么会启动两次
发现启动flask之后,会自动的重启 代码如下: $ ./run.py  Now starting to run....  * Running on http://hostname:port/ (Press CTRL+C to quit)  * Restarting with stat Now starting to run....  * Debugger is active!
为什么启动thread会出错???
定义一个TThread的派生类,Execute里没写任何代码。rnrn在一个form类的public中定义该线程类的实例(m_QueryThd),在一个menuitem的onclick中用m_QueryThd.Create(false);即出错。。。rnrnAccess Violation...
为什么启动j2ee会出错?
运行j2ee命令,却出错:rnERROR: Set JAVA_HOME to the path of a valid jdk.rn明明JAVA_HOME已经设对了呀,是j2se1.4的安装目录。奇怪了。rn且我是先装j2se1.4后装j2ee1.3的。rn为什么呢?rn谢谢大家!rn
linux下tomcat为什么不能启动
/disk2/usr/tomcat/apache-tomcat-6.0.24/bin # ./startup.shrnUsing CATALINA_BASE: /disk2/usr/tomcat/apache-tomcat-6.0.24rnUsing CATALINA_HOME: /disk2/usr/tomcat/apache-tomcat-6.0.24rnUsing CATALINA_TMPDIR: /disk2/usr/tomcat/apache-tomcat-6.0.24/temprnUsing JRE_HOME: /disk2/usr/jdkrnUsing CLASSPATH: /disk2/usr/tomcat/apache-tomcat-6.0.24/bin/bootstrap.jarrn/disk2/usr/tomcat/apache-tomcat-6.0.24/bin # netstatrnActive Internet connections (w/o servers)rnProto Recv-Q Send-Q Local Address Foreign Address StaternActive UNIX domain sockets (w/o servers)rnProto RefCnt Flags Type State I-Node Pathrn/disk2/usr/tomcat/apache-tomcat-6.0.24/bin #rnrn端口都没开,访问8080更是不行
为什么tomcat启动要10分钟?
启动tomcat时catalina.2009-11-12.log报下面的信息,从提示“XML validation disabled”到提示“Starting Coyote HTTP/1.1 on http-80”居然用了12分钟。rn这是为什么呢?请大家不吝赐教。rnrn2009-11-12 16:49:37 org.apache.catalina.core.AprLifecycleListener lifecycleEventrn信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbemrn2009-11-12 16:49:38 org.apache.coyote.http11.Http11BaseProtocol initrn信息: Initializing Coyote HTTP/1.1 on http-80rn2009-11-12 16:49:38 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 1312 msrn2009-11-12 16:49:38 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2009-11-12 16:49:38 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/5.5.14rn2009-11-12 16:49:38 org.apache.catalina.core.StandardHost startrn信息: XML validation disabledrn2009-11-12 17:01:52 org.apache.coyote.http11.Http11BaseProtocol startrn信息: Starting Coyote HTTP/1.1 on http-80rn2009-11-12 17:01:53 org.apache.jk.common.ChannelSocket initrn信息: JK: ajp13 listening on /0.0.0.0:8009
为什么tomcat一闪而过,启动不了
可是在eclipse中却能单独启动,,,没有问题,,,单独点击startup.bat就一闪而过...rnrn也配置了环境变量rnrnJAVA_HOMErnD:\J2EE\JAVArnrnPATHrnrnD:\J2EE\JAVA\binrnrnCLASSPATHrn.;D:\J2EE\JAVA\lib\dt.jar;D:\J2EE\JAVA\lib\tools.jarrnrnrnD:\J2EE\JAVA\binrnrnrnCATALINA_HOMErnrnD:\J2EE\WAS\jakarta-tomcat-5.0rnrn后来觉得也是我的tomcat不是安装版本,所以去下载了一个5.o的.但是我把项目\Tomcat 5.0\webapps,设置的端口是81,可是猫是能出来,但是页面会报HTTP Status 404rnrnrn不清楚为什么.就是在C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps目录下建一个文件夹,把所有jap页面拷进去的
为什么Tomcat不能启动(急)
JDK版本是1.5.0_04,使用apache-tomcat-5.5.12.zip,将这个文件展开,然后启动TomcatrnC:\apache-tomcat-5.5.12\bin\startup.batrnrnTomcat可以启动rnrn但是如果使用如下命令,Tomcat却产生错误:rnC:\apache-tomcat-5.5.12\bin\tomcat5.exernrn[2005-10-19 22:33:27] [402 prunsrv.c] [error]rnSystem can't find assigned filern[2005-10-19 22:33:27] [1246 prunsrv.c] [error]rnLoad configuration failedrnrn如果使用下列命令启动Tomcat,Tomcat也会产生错误:rnC:\apache-tomcat-5.5.12\bin\tomcat5.exernrnUnable to open the service 'tomcat5'rnrn为什么使用tomcat5.exe或tomcat5w.exe不能启动Tomcat,如何使用tomcat5.exe或tomcat5w.exe才能启动Tomcat?
tomcat启动为什么一闪消失
第一篇博客,记录下今天的蠢事。 背景:之前将war包装入TOMCAT进行部署,一切正常。 过程:今天翻看了下TOMCAT7.0bin目录中的tomcat7.0w面板的各种设置,然后做了下更改看了下各种效果,而后看到文件夹中部署的war包过多并且都经过了解压,所以心血来潮将war包删除,而后去吃午饭,一切安好。 下午要测试一个项目,结果TOM部署后总是一闪而过,心里发慌以为上午的设置哪里出了问
为什么Lomboz不能启动Tomcat?
我在Ecilpse里装了 Lomboz和TomcatPlugin 点Tomcat图标可以启动Tomcat 但是Lomboz怎么却不行?
相关热词 c#异步发送kafka c#窗体编号 c# 操作二进制文件 c# 反射 机制 c#线程 窗体失去响应 c#角度转弧度 c# 解析gps数据 c# vs设置 语法版本 c# json含回车 c#多线程demo