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
	  
	  
	百度下: 
	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 <clinit> 
	警告: 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.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 start 
	严重: Error listenerStart 
	2010-11-19 9:50:33 org.apache.catalina.core.StandardContext start 
	严重: Context [/streetManager] startup failed due to previous errors 
	2010-11-19 9:50:33 org.apache.catalina.core.ApplicationContext log 
	信息: Closing Spring root WebApplicationContext 
	2010-11-19 9:50:33 org.apache.coyote.http11.Http11Protocol start 
	信息: Starting Coyote HTTP/1.1 on http-8080 
	2010-11-19 9:50:34 org.apache.jk.common.ChannelSocket init 
	信息: JK: ajp13 listening on /0.0.0.0:8009 
	2010-11-19 9:50:34 org.apache.jk.server.JkMain start 
	信息: Jk running ID=0 time=0/44  config=null 
	2010-11-19 9:50:34 org.apache.catalina.startup.Catalina start 
	信息: Server startup in 44841 ms 
	  
	看来是applicationContext-dailyOfficeBeans.xml文件配置问题喽~~打开看下 
	<?xml version="1.0" encoding="UTF-8"?> 
	<beans xmlns="http://www.springframework.org/schema/beans" 
	         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	         xmlns:aop="http://www.springframework.org/schema/aop" 
	         xmlns:tx="http://www.springframework.org/schema/tx" 
	         xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
	           http://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-2.0.xsd 
	           http://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-2.0.xsd"> 
	    <bean id="dailyOfficeAgentI" class="com.dailyOffice.agent.agentImpl.DailyOfficeAgentImpl"> 
	        <property name="dailyOfficeDaoI" ref="dailyOfficeDaoI"/> 
	    </bean> 
	    <bean id="dailyOfficeDaoI" class="com.dailyOffice.dao.daoImpl.DailyOfficeDaoImpl"> 
	        <property name="sessionFactory" ref="sessionFactory"/> 
	    </bean> 
	</beans> 
	呃…问题出在…感觉没错..⊙﹏⊙b汗  
	继续找其他文件…struts-config.xml 
	  
	无语中…注释写错了。 
	继续找问题….Daoimpl.java文件没有import… 
	import com.common.HibernateSessionFactory; 
	import com.dailyOffice.dao.daoI.DailyOfficeDaoI; 
	重新发布成功。 
	  
	怎么MyEclipse有时候不会提示出错…写代码时那个小红叉有时候从不出现…重启后才有… 
	查看下有什么红叉问题没有解决 
 |