在IDEA中的struts2项目的web.xml里 一写上拦截器配置 启动tomcat就出错 求大神

![图片说明](https://img-ask.csdn.net/upload/201702/27/1488202197_796791.png)图片说明

27-Feb-2017 21:19:11.540 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1109)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4563)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5205)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

3个回答

错误很明显,找不到需要的类,你有引入Struts2的jar包?

没有引入struts2的 jar包

qq_27836205
Jordan裔 可是都引了啊
2 年多之前 回复

自动引入的有jar包,但是idea好像有问题,首先是jar包引入的有问题,其次过滤器配置有问题

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
IntelliJ IDEA 配置tomcat 启动项目
1.打开file中setting中搜索Application Servers,如下图 2.添加服务器类型,例如tomcat,如下图,添加完成之后可以选定tomcat的目录,tomcat Home配置tomcat的自定目录。 3.搜索tomcat,如下图,选定选定之后将后面的选择框(小正方形)选中. 4.创建一个java web项目,测试tomcat的是否配置成功. 5.打开...
Struts2一配置web.xml启动tomcat就报错
详细情况:rnrn严重: Exception starting filter struts2rnUnable to load configuration. - bean - jar:file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/web_0500/WEB-INF/lib/struts2-spring-plugin-2.2.1.jar!/struts-plugin.xml:29:132rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)rn at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)rn at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:48)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)rn at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)rn at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1173)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1271)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:296)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/web_0500/WEB-INF/lib/struts2-spring-plugin-2.2.1.jar!/struts-plugin.xml:29:132rn at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:222)rn at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)rn ... 18 morernCaused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAwarern at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:621)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1850)rn at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:621)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1850)rn at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)rn at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:138)rn at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193)rn ... 21 morernCaused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAwarern at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn ... 38 morernrn我的web.xml配置rn[code=HTML]rnrn rn rn index.jsprn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rnrn rn struts2rn /*rn rn[/code]rnrn把web.xml文件删除,在tomcat中reload不会出错,一把web.xml放进去就报上面的错误。刚开始不知道是web.xml引起的,找了很多种方法没有解决,刚刚再试的时候才发现是web.xml问题。我就觉得奇怪,我导入以前一些没问题的项目,依然报错,我就觉得挺纳闷的,这个web.xml文件本身应该没问题才对的,也还没有写什么东西去。tomcat、MyEclips都重装过,还是有问题。Jar包试过两组,一组是struts 2.1.6,一组是2.2.1的,不过这个问题应该不大,以前都可以用的rn这问题整了我好长时间了,求指点求解…………
创建struts2项目的步骤和拦截器配置
1,创建web project 2,右键加载struts2的框架 3,写页面,写对应的action 4,写配置文件。加上package,action 5,编写action里面对应的后台action和实体类 6,将后台处理成功之后的页面加在result标签里面 7,写一个result页面。 8,将工程加载到tomcat里面 9,启动tomcat,访问。 如何加载拦截器 1,写
Idea 下配置 tomcat 以及 项目的配置
从Eclipse转到IDEA不久,对于idea行多地方还不熟悉,所以遇到问题及时记录,以便以后查阅 1、idea新建servlet项目:File--new project --java项目--选择java ee--勾选web app--设置好名称等就进入第二步(类需要extends HttpServlet)) 2、配置tomcat全局设置:点击调试配置--编辑结构--添加一个t
struts2项目中web.xml配置
struts2.5中使用org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter替换org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter                                          Str
web.xml一加Listener,启动tomcat就出错 求大神给指导指导
MyEclipse10+tomcat7 用的是Spring+hibernatern[img=https://img-bbs.csdn.net/upload/201405/19/1400480902_818197.png][/img]rn[color=#FF0000]web.xml是这样的[/color]rnrnrn rn rn rn index.jsprn rn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn rn encodingrn rn org.springframework.web.filter.CharacterEncodingFilterrn rn rn encodingrn UTF-8rn rn rn rnrn rn contextConfigLocationrn classpath:beans.xmlrn rnrnrnrn rn dwr-invokerrn rn org.directwebremoting.servlet.DwrServletrn rn rn debugrn truern rn rn rn crossDomainSessionSecurity rn false rn rn 1rn rn rn rn This is the description of my J2EE componentrn This is the display name of my J2EE componentrn TabServContentServletrn com.farway.servlet.TabServContentServletrn rn rn rn rn dwr-invokerrn /dwr/*rn rn rn TabServContentServletrn /servlet/TabServContentServletrn rn rn rnrnrn[color=#FF0000]如果把 rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn去掉,运行就不会出错。错误是这样的:[/color]rn五月 19, 2014 2:04:15 下午 org.apache.catalina.core.StandardContext listenerStartrnSEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [beans.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: could not instantiate id generator [entity-name=po.TabPm]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1275)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1439)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)rn at java.lang.Thread.run(Unknown Source)rnCaused by: org.hibernate.MappingException: could not instantiate id generator [entity-name=po.TabPm]rn at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:109)rn at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)rn at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:192)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)rn ... 28 morernCaused by: org.hibernate.MappingException: Dialect does not support sequencesrn at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:596)rn at org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:65)rn at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:104)rn ... 36 morern五月 19, 2014 2:04:15 下午 com.sun.faces.config.ConfigureListener contextInitializedrnINFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b07-FCS) for context '/MyFarway'rn五月 19, 2014 2:04:16 下午 com.sun.faces.spi.InjectionProviderFactory createInstancernINFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.rn五月 19, 2014 2:04:16 下午 org.apache.catalina.core.StandardContext startInternalrnSEVERE: Error listenerStartrn五月 19, 2014 2:04:16 下午 org.apache.catalina.core.StandardContext startInternalrnSEVERE: Context [/MyFarway] startup failed due to previous errorsrn五月 19, 2014 2:04:16 下午 org.apache.catalina.core.ApplicationContext logrnINFO: Closing Spring root WebApplicationContextrn五月 19, 2014 2:04:16 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcrnSEVERE: The web application [/MyFarway] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.rn五月 19, 2014 2:04:16 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcrnSEVERE: The web application [/MyFarway] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.rn五月 19, 2014 2:04:16 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrnSEVERE: The web application [/MyFarway] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.rn五月 19, 2014 2:04:16 下午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreadsrnSEVERE: The web application [/MyFarway] appears to have started a thread named [Timer-3] but has failed to stop it. This is very likely to create a memory leak.rn五月 19, 2014 2:04:16 下午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaksrnSEVERE: The web application [/MyFarway] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@1b64d9f]) and a value of type [java.util.HashMap] (value [com.sun.faces.patternCache= = ]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.rn
ssh项目的IDEA配置
1.导入项目: 1.1在本地文件夹上,用svn直接导入到本地。 1.2使用idea,选择import project导入项目--选择第一项(因为项目有eclipse的 配置文件) 2.配置 2.1配置编译目录:打开File-ProjectStructure-Project,选择Project compiler output的目录,我的项目是在WebRoot\...
idea启动tomcat异常,求大神赐教
13-Jun-2017 15:56:07.140 严重 [RMI TCP Connection(20)-127.0.0.1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: rn org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@63c898fc]rn at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)rn at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:139)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)rn at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:709)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)rn at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4850)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4982)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)rn at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)rn at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)rn at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)rn at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)rn at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)rn at sun.rmi.transport.Transport$1.run(Transport.java:200)rn at sun.rmi.transport.Transport$1.run(Transport.java:197)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.Transport.serviceCall(Transport.java:196)rn at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:748)rnCaused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: error in opening zip filern at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:113)rn at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)rn ... 48 morernCaused by: java.util.zip.ZipException: error in opening zip filern at java.util.zip.ZipFile.open(Native Method)rn at java.util.zip.ZipFile.(ZipFile.java:219)rn at java.util.zip.ZipFile.(ZipFile.java:149)rn at java.util.jar.JarFile.(JarFile.java:166)rn at java.util.jar.JarFile.(JarFile.java:103)rn at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:110)rn ... 49 morernrn13-Jun-2017 15:56:07.145 严重 [RMI TCP Connection(20)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method manageApprn java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@63c898fc]rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:756)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)rn at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)rn at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)rn at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)rn at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)rn at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)rn at sun.rmi.transport.Transport$1.run(Transport.java:200)rn at sun.rmi.transport.Transport$1.run(Transport.java:197)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.Transport.serviceCall(Transport.java:196)rn at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:748)rnrn13-Jun-2017 15:56:07.145 严重 [RMI TCP Connection(20)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method createStandardContextrn javax.management.RuntimeOperationsException: Exception invoking method manageApprn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:308)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn[2017-06-13 03:56:07,154] Artifact JspTest:war exploded: Error during artifact deployment. See server log for details.rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)rn at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)rn at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)rn at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)rn at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)rn at sun.rmi.transport.Transport$1.run(Transport.java:200)rn at sun.rmi.transport.Transport$1.run(Transport.java:197)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.Transport.serviceCall(Transport.java:196)rn at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:748)rnCaused by: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@63c898fc]rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:756)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)rn at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn ... 33 more
Struts2初次配置启动tomcat出错
Tomcat log:rn[code=JScript]rn2011-1-6 0:04:30 org.apache.tomcat.util.digester.SetPropertiesRule beginrn警告: [SetPropertiesRule]Server/Service/Engine/Host/Context Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2Demo' did not find a matching property.rn2011-1-6 0:04:30 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:\Program Files\Java\jdk1.6.0_02\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.6.0_02/bin/../jre/bin/client;C:/Program Files/Java/jdk1.6.0_02/bin/../jre/bin;C:/Program Files/Java/jdk1.6.0_02/bin/../jre/lib/i386;C:\Program Files\PC Connectivity Solution\;C:\Program Files\Java\jdk1.6.0_02\bin;C:\Program Files\Java\jre1.6.0_02;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\EmEditor;C:\Program Files\TortoiseSVN\binrn2011-1-6 0:04:30 org.apache.coyote.http11.Http11Protocol initrn信息: Initializing Coyote HTTP/1.1 on http-8080rn2011-1-6 0:04:30 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 759 msrn2011-1-6 0:04:30 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2011-1-6 0:04:30 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/6.0.16rn2011-1-6 0:04:30 org.apache.catalina.core.StandardContext filterStartrn严重: Exception starting filter struts2rnjava.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcherrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)rn at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)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)rn2011-1-6 0:04:30 org.apache.catalina.core.StandardContext startrn严重: Error filterStartrn2011-1-6 0:04:30 org.apache.catalina.core.StandardContext startrn严重: Context [/Struts2Demo] startup failed due to previous errorsrn2011-1-6 0:04:30 org.apache.coyote.http11.Http11Protocol startrn信息: Starting Coyote HTTP/1.1 on http-8080rn2011-1-6 0:04:30 org.apache.jk.common.ChannelSocket initrn信息: JK: ajp13 listening on /0.0.0.0:8009rn2011-1-6 0:04:30 org.apache.jk.server.JkMain startrn信息: Jk running ID=0 time=0/31 config=nullrn2011-1-6 0:04:30 org.apache.catalina.startup.Catalina startrn信息: Server startup in 622 msrn[/code]rnEclipse: rnEclipse Java EE IDE for Web Developers. rnrnVersion: Helios Service Release 1 rnBuild id: 20100917-0705 rnTomcat:apache-tomcat-6.0.16 rnStruts:struts-2.2.1.1 rn以上均官网下载,附工程文件以及bug重现的过程截图。rnBug重现截图:[url=http://dl.javaeye.com/topics/download/9b03c1fa-d4c4-3125-a3cd-ca29b090fb44][/url]rn重现工程:[url=http://dl.javaeye.com/topics/download/a41c6fb3-f2f7-33d1-b60f-122546d61fde][/url]rn原帖地址:[url=http://www.javaeye.com/problems/56930][/url]rn我手动建立了文件org.apache.struts2.dispatcher.FilterDispatcher,再次发布,tomcat启动错误变化了,说明之前肯定是此包含此类的包没有被加载,可是。。。。你还想让我咋加载啊。原帖提到的问题我都验证过了,哎,两天了。rn
在eclipse中进行Struts2项目的配置
输入项目名确认即可,然后就建立了一个普通的web项目,和之前的没有区别,另外注意要创建web.xml配置文件 然后,打开我们刚才下载的Struts2中lib目录,这下面有非常多的Struts类库,并不是完全需要,一般情况下我们只导入常用的即可,其他的到需要的时候再导入,需要的jar包如下图: 复制到lib目录后,eclipse项目会自动导入web的类库 然后,配置web.xml,在&...
Struts2学习笔记一:web.xml的配置
WEB项目要使用Struts2框架进行开发的时候,必须将struts2框架配置到该WEB项目中。即在 WebContent/WEB-INF/web.xml 文件中做出如下配置: myStruts org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
Tomcat的配置和项目的部署
要想启动tomcat,需要配置两个环境变量: (1)JAVA_HOME:值为JDK的安装目录(bin目录的上一层目录)(例如:D:\Program Files\Java\jdk 1'6.0) (2)CATALINA_HOME:值为Tomcat的安装目录(C:\apache-tomcat-6.0.29,附:这个配置我从来都没有配置过) 项目的部署方式: (1)server.xml
tomcat中,web.xml配置filter出错
环境:win2000 pro , tomcat 4.1.24 ,mysql 4.0.18,struts 1.1rnrn根据网上流行的解决struts中文问题的方案,在web.xml中添加过滤器,如下:rn rn Set Character Encodingrn com.zhiss.JLLPro.common.SetCharacterEncodingFilterrn rn encodingrn GB2312rn rn rn ignorern truern rn rnrn rn Set Character Encodingrn actionrn rnrn问题:启动tomcat时,报错,错误信息如下:rnStarting service Tomcat-StandalonernApache Tomcat/4.1.24rn2004-4-6 14:35:08 org.apache.commons.digester.Digester errorrn严重: Parse Error at line 9 column 12: Element type "filter" must be declared.rnorg.xml.sax.SAXParseException: Element type "filter" must be declared.rn at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)rn at org.apache.xerces.util.ErrorHandlerWrapper.error(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.dtd.XMLDTDValidator.handleStartElement(Unknown Source)rn at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(rnUnknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)rn at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rnrn尝试解决方案如下,均告失败:rn1、因为是org.apache.commons.digester.Digester error,所以在apache.org重新下载了最新的digester包,替换本地tomcat 的 server/lib下的解析xml的包,无效;rn2、打开web.xml,发现doctype定义如下:rnrn直接使用http://java.sun.com/j2ee/dtds/web-app_2_2.dtd访问该dtd,发现无filter的定义,疑惑中……rn3、使用tomcat 5.0以上版本则正确。rnrn怎么办,请大侠指点迷津!!!!
tomcat,web.xml配置异常页面跳转与拦截器问题
无意发现这个问题,由于web.xml里 java.lang.Throwable /500.html 500 /500.html 404 /404.html 405 /404.html 配置一段类似这样的配置,tomcat内部会帮我们处理,这几种错误,自动跳转指定的页面错误页面。。 然后项目还配置了登陆的拦截器 public boolea
常用java的war项目的web.xml配置
常用java的war项目的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/
MVC拦截器web.xml配置
拦截器 web.xml配置 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaL...
IDEA下SSH项目的配置(一)-配置strut2
由于最近在学习SSH框架,所以需要配置SSH项目,以作备忘,使用的IDE为IDEA。 项目模型使用一个普通的servlet+jsp开发的项目。 (一)配置Project Structure (1)Project (2)Modules (3)Facets (4)Artifacts (二)Tomcat配置 (1)Server (2)Deployment
idea项目的web.xml中加入这一段话就出现404错误求指教
![图片说明](https://img-ask.csdn.net/upload/201907/17/1563352659_722899.png)rn![图片说明](https://img-ask.csdn.net/upload/201907/17/1563352005_404397.png)rn![图片说明](https://img-ask.csdn.net/upload/201907/17/1563346841_836249.png)![图片说明](https://img-ask.csdn.net/upload/201907/17/1563352747_442073.png)rn
在IDEA中启动tomcat时出错:
我在IDEA中启动tomcat时显示如下错误:不知是什么原因,请高手解决。rn我的iframe-course装在E:/tomcat/webapps下。rnrnjava.lang.IllegalArgumentException: Document base C:\Documents and Settings\xiaoming.MYNET\.IntelliJIdea\system\tomcat_iframe-course_412a4b80\webapps\iframe-course does not exist or is not a readable directoryrn at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)rn at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3910)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4138)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)rn at org.apache.catalina.core.StandardService.start(StandardService.java:480)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:556)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:284)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
intellij idea中启动tomcat出错
在intellij idea中启动tomcat(8.5)出错 :org.apache.catalina.core.AprLifecycleListener.init An incompatible version 1.1.34 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.2.6rnrn rnrn 按照百度中的方法,a.复制1.2.6版本的 tcnative-1.dll 到tomcat/bin目录,重启tomcatrn b.复制1.2.6版本和jdk/bin 目录下,重启tomcatrnrn 两种方法均无效,请问怎么解决?rn rn
idea启动java项目 一启动就报错 大神帮我看看
端口号改了也没用 ,肯定和端口号没关系rn![图片说明](https://img-ask.csdn.net/upload/201705/02/1493733288_945458.png)rn![图片说明](https://img-ask.csdn.net/upload/201705/02/1493732836_756502.png)
Tomcat中web.xml配置??急求!!!
我的web.xmlrnrnrnrnrnrnrnrnMy Web ApplicationrnrnrnA application for test.rnrnrnrnrnThreeParamsrnThreeParamsrnA ThreeParams Servletrncoreservlets.ThreeParamsrnrnrnrnThreeParamsrn/ThreeParamsrnrnrnrn但我提交jsp给这Servlet就出现404错误
idea配置tomcat启动web项目
windows系统中配置tomcat环境变量 idea配置https://blog.csdn.net/justdoit_potato/article/details/82994046
idea配置tomcat启动javaWeb项目
1.打开IDEA, 从本地导入javaWeb项目, 点击下图标记或者File>>Project Structure 2.Project  首先设置项目名称和Project SDK(项目名称随便设置, SDK选择你本地装的jdk路径) 3.Modules   查看Dependencies将依赖的jar包(自己项目lib下的)添加进来,  报错的删除掉,  4.Modul...
idea配置tomcat启动(Maven项目)
最近有意要转IDE工具由Eclipse到Idea上,eclipse中配置特别简单的tomcat,在idea中会麻烦些,把学习笔记记录下: 1.配置facets 这时它默认的目录需要修改下: {workspaceDir}\{projectName}\web\WEB-INF\web.xml要改成{workspaceDir}\{projectName}\src\main\webapp\WE...
空的Tomcat启动就出错
在MyEclipse里,Tomcat没有部署,只启动一个空的服务,就会出现上一个项目的错误,请问这怎么解决一下.
struts2中web.xml主要配置
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">   Demo5-struts2            
idea中web项目配置tomcat启动不了
刚开始使用idea,发现配置tomcat启动卡住,如下图这种 然后卡住,也并未调转到浏览器页面; 试过各种方式都不行,后来想到可能是web.xml未加载,是不是因为web目录未配置,所以在project structure中(快捷键ctrl_shift+alt+s),查看module的web配置 果然是web配置有问题 重新启动即可
web.xml启动struts2配置两点注意
注意1: StrutsPrepareAndExecuteFilter中的init()方法会在服务器启动的时候读取类路径下默认的配置文件struts.xml完成初始化操作 注意2: struts2读取到struts.xml里面的内容后,以javabean的形式存放到内存中去,以后struts2对用户的每次请求处理将使用内存中的数据,而不是每次都去读取struts.xml ...
在web.xml配置了struts2就出现404
web.xml配置rnrnrnrn rn rnrn struts2rn org.apache.struts2.dispatcher.FilterDispatcherrn rn rn struts2rn /*rn rn rn rn rn index.jsprn rnrnrnrnlogin.jsprnrn rn rn rn rn rn rn rnrnrnstruts.xml配置rnrnrnrnrnrn rn rn rn /success.jsprn rn rn rn rnrnrnrnaction类rnpackage qaction;rnrnimport com.opensymphony.xwork2.ActionSupport;rnimport javax.persistence.Entity;rnrnrnpublic class kkk extends ActionSupport rn private String hello;rn public String getHello() rn return hello;rn rn public void setHello(String hello) rn this.hello = hello;rn rn public String getHi() rn return hi;rn rn public void setHi(String hi) rn this.hi = hi;rn rn private String hi;rn rn rn public String sss()rn rn if(hello.equals("hhh")&&hi.equals("nnn"))rn return SUCCESS;rn elsern return "nono";rn rnrnrnrnrnrn
intellij IDEA 中无法启动tomcat 求大神求大神!!
工程名:prometheusrn工程路径:D:\workspace\prometheus\prometheus_active\prometheus-parentrntomcat路径:D:\workspace\apache-tomcat-7.0.52rnjdk版本1.7rnmaven JDK Mysql什么的都配好了 版本号也都没问题rn错误信息如下:rn下午23:50:31 All files are up-to-datern下午23:50:35 All files are up-to-datern下午23:50:39 Error running prometheus: Cannot run program "D:\workspace\apache-tomcat-7.0.52\bin\catalina.bat" (in directory "D:\workspace\apache-tomcat-7.0.52\bin"): CreateProcess error=2, ϵͳÕҲ»µ½ָrnrnrn求大神啊求大神....弄了好几天了都不行 感觉每个都配置好了 但就是启动不.... tomcat单独能启动(能正常显示网页) tomcat换过好几个都不行 软件也都重装过了 都不行!! 求大神啊求大神....[img=https://img-bbs.csdn.net/upload/201412/06/1417795764_467001.png][/img][img=https://img-bbs.csdn.net/upload/201412/06/1417795774_244465.png][/img][img=https://img-bbs.csdn.net/upload/201412/06/1417795789_530479.png][/img]rn[img=https://img-bbs.csdn.net/upload/201412/06/1417796188_645414.jpg][/img]
tomcat启动无法访问项目的情况
tomcat启动无法访问项目的情况项目中遇到tomcat启动无法访问项目的情况,网上查遍没有解决,最后解决方案如下: **打开红框中的路径tmp0 和 tmp1 删除一个 重启项目查看!
Struts2的项目的搭建
首先我们打开eclipse 点击左上角的File按钮 选择New 然后找到 Dynamic Web Project选项 双击   然后创建一个项目 完成后点击 "Finish",在找到lib文件向里面添加需要的.jar文件这里我只有七个,因为我是初学者,所以...  这几个下载的地址..... 然后打开web.xml文件,进行过滤器的配置,配置成下面的就行,
struts2的项目的疑问
基于struts2的项目一般对Action的配置有两种,xml方式的和属性文件方式的。我现在公司项目两种都没用用到,我想会不会有第三种情况,把这个配置写到oracle数据库中?这个方法可行吗?如果可以,流程是怎样的?rn
Struts2配置拦截器(拦截器特性)
拦截器特性: 拦截器是Struts2独有的; 拦截器只能对action请求起作用; 拦截器可以操作action上下文,值栈里的对象; 拦截器是基于java反射机制; 在action的生命周期中,拦截器可以被多次调用; 拦截器,不依赖于Servlet容器; 以下是在Struts2配置文件中配置拦截器
struts2一配置web.xml就Failed to start component [StandardServer[8005]]
[img=https://img-bbs.csdn.net/upload/201804/17/1523963471_260454.png][/img]这样就会rn严重: The required Server component failed to start so Tomcat is unable to start.rnorg.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:681)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)rnCaused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)rn at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn ... 7 morernCaused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)rn at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn ... 9 morernCaused by: org.apache.catalina.LifecycleException: A child container failed during startrn at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:949)rn at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn ... 11 morernrn删掉web.sml中的rn rn struts2rn org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilterrn rn rn rn struts2rn /*rn rn rn struts2rn *.action rn rn就不会出问题了 怎么解决啊rnrn
ssm框架在web.xml中配置shiro拦截器tomcat启动报错
rn rn shiroFilterrn org.springframework.web.filter.DelegatingFilterProxyrn rn rn targetFilterLifecyclern truern rn rn rn shiroFilterrn *.dorn rnrn错误信息如下:rn org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [shiro] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
struts2中拦截器的原理与配置
首先,向大家推荐一个关于拦截器较好的blog:http://developer.51cto.com/art/200906/126894.htm 1.拦截器的使用规则:先定义;再使用; 拦截器的定义: shengsiyuan 拦截器的使用: action2 ${
在Websphere上修改项目的web.xml中的配置后不起作用
往往在我们把一个java项目部署到了websphere上的时候,到后来需要修改项目中WEB-INF下的某些配置文件,如web.xml,通常我们是找到这个项目的部署路径,如: E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv02\installedApps\caocaoNode01Cell\caocao_war.ear\caoca...
struts2预定义的拦截器出错
一起使用struts2预定义的拦截器和自定义的拦截器,自定义的没有任何问题,但是预定义的timer和token却出错了rnrnstruts.xml文件中的配置:rnrn[code=text]rn rn rn rn rn rn rn rn rn rn rn rn rn rn /errorPage.jsprn rn rn rn rn /$tojsprn rn /$pcgrn $tojsprn rn /errorPage.jsprn rn rn[/code]rnrn其中MyInterceptor1是自定义的拦截器,正常输出了,没有问题rn但是使用预定义的拦截器时出现以下三个问题:rn1.使用token时,我还没有重复提交呢,就直接跳到了errorPage.jsp(访问的Action会暂停5s的)rn2.被注释的timer开始没有注释,也没有用token时,使用timer没有任何输出rn3.如果将现在的token换成tokenSession,并将invalid.token这个result去掉,会出错说找不到invalid.token。使用tokenSession不是不需要invalid.token的吗?rnrn请大神们帮帮忙吧,头疼了好久了。rn还有,会不会有可能是jar没有放对啊
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview