IE错误如下:

HTTP Status 404 - /streetManager/index.jsp

type Status report

message /streetManager/index.jsp

description The requested resource

(/streetManager/index.jsp) is not available.

Apache Tomcat/6.0.10

a4c26d1e5885305701be709a3d33442f.png

百度下:

HTTP Status 404 - //

type Status report

message //

description The requested resource (//) is

not available.

Apache Tomcat/6.0.18

在百度搜索了,得到了提示:

原因:servlet没有配置正确 ,查看web.xml确认正确,以及自己的请求路径正确。

解决:在MyEclipse中点开web.xml查找了n遍,web.xml配置的没有一点错误。然后到程序中查找各个请求的路径,也没有错误。查找了好半天,终于找到了,原来是我在MyEclipse重构的时候复制web.xml的时候,不小心把它复制到了WEB-INF中的lib文件夹中了。当时没有察觉,浪费了我好多时间。把web.xml拖出来放到WEB-INF中就解决了。

HTTP Status 404

在IE中提示“404”错误有以下三种情况

I.未部署Web应用

II.URL输入错误

排错方法:

首先,查看URL的IP地址和端口号是否书写正确。

其次,查看上下文路径是否正确

Project--------Properties------MyElipse-----Web-----

Web Context-root检查这个路径名称是否书写正确。

最后,检查一下文件名称是否书写正确。

III.目录不能被引用

排错方法:

在 Eclipse的“包资源管理器(Package Explorer)”检查文件存放的位置。由于META-INF

WEB-INF文件夹下的内容无法对外发布,所以,如果你引用了带这两个目录的文件,肯定是不允许。例如: http://localhost:8080/guestbook/WEB-INF/index.html就是错误的

文件位置存放错误。

解决办法:查看下MyEclipse报错吧..

2010-11-19 9:49:49 org.apache.catalina.core.AprLifecycleListener

init

信息: The 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\bin;C:\Program

Files\Apache Software Foundation\Tomcat 6.0\bin

2010-11-19 9:49:49 org.apache.coyote.http11.Http11Protocol

init

信息: Initializing Coyote HTTP/1.1 on http-8080

2010-11-19 9:49:49 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 606 ms

2010-11-19 9:49:49 org.apache.catalina.core.StandardService

start

信息: Starting service Catalina

2010-11-19 9:49:49 org.apache.catalina.core.StandardEngine

start

信息: Starting Servlet Engine: Apache Tomcat/6.0.10

2010-11-19 9:49:49 org.apache.catalina.core.ApplicationContext

log

信息: ContextListener: contextInitialized()

2010-11-19 9:49:49 org.apache.catalina.core.ApplicationContext

log

信息: SessionListener: contextInitialized()

2010-11-19 9:49:50 org.apache.catalina.core.ApplicationContext

log

信息: Initializing Spring root WebApplicationContext

2010-11-19 9:50:09 com.microsoft.sqlserver.jdbc.AuthenticationJNI

警告: Failed to load the sqljdbc_auth.dll

09:50:10,052 WARN Configurator:126 - No

configuration found. Configuring ehcache from ehcache-failsafe.xml

found in the classpath: jar:file:/C:/Program Files/Apache Software

Foundation/Tomcat

6.0/webapps/streetManager/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml

09:50:32,997 ERROR ContextLoader:204 - Context initialization

failed

org.springframework.beans.factory.CannotLoadBeanClassException:

Error loading class

[com.dailyOffice.agent.agentImpl.DailyOfficeAgentImpl] for bean

with name 'dailyOfficeAgentI' defined in file [C:\Program

Files\Apache Software Foundation\Tomcat

6.0\webapps\streetManager\WEB-INF\classes\applicationContext-dailyOfficeBeans.xml]:

problem with class file or dependent class;

nested exception is java.lang.NoClassDefFoundError:

DailyOfficeAgentI Caused by:

java.lang.NoClassDefFoundError: DailyOfficeAgentI

at

java.lang.ClassLoader.defineClass1(Native Method)

at

java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)

at

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)

at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)

at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

at

org.springframework.util.ClassUtils.forName(ClassUtils.java:229)

at

org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:327)

at

org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1073)

at

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283)

at

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)

at

org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)

at

org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)

at

org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)

at

org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)

at

org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)

at

org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)

at

org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)

at

org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

at

org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

at

org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

at

org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

at

org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

at

org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at

org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

at

org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)

at

org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

at

org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)

at

org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at

org.apache.catalina.core.StandardService.start(StandardService.java:448)

at

org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at

org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at

java.lang.reflect.Method.invoke(Method.java:597)

at

org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

at

org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

2010-11-19 9:50:33 org.apache.catalina.core.StandardContext

listenerStart

严重: Exception sending context initialized event to listener

instance of class

org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.CannotLoadBeanClassException:

Error loading class

[com.dailyOffice.agent.agentImpl.DailyOfficeAgentImpl] for bean

with name 'dailyOfficeAgentI' defined in file [C:\Program

Files\Apache Software Foundation\Tomcat

6.0\webapps\streetManager\WEB-INF\classes\applicationContext-dailyOfficeBeans.xml]:

problem with class file or dependent class;

nested exception is java.lang.NoClassDefFoundError:

DailyOfficeAgentI Caused by:

java.lang.NoClassDefFoundError: DailyOfficeAgentI

at

java.lang.ClassLoader.defineClass1(Native Method)

at

java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)

at

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)

at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)

at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

at

org.springframework.util.ClassUtils.forName(ClassUtils.java:229)

at

org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:327)

at

org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1073)

at

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283)

at

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)

at

org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)

at

org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)

at

org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)

at

org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)

at

org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)

at

org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)

at

org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)

at

org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

at

org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

at

org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

at

org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

at

org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

at

org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at

org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

at

org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)

at

org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

at

org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)

at

org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at

org.apache.catalina.core.StandardService.start(StandardService.java:448)

at

org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at

org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl

Logo

更多推荐