MyEclipse自动生成的web项目部署后在TOMCATE正常,resin下无法访问
2009-05-23 16:25
761 查看
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" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
异常:
Resin-3.0.25 (built Wed, 05 Dec 2007 08:19:34 PST)
Copyright(c) 1998-2006 Caucho Technology. All rights reserved.
Using Resin(R) Open Source under the GNU Public License (GPL).
See http://www.caucho.com for information on Resin Professional,
including caching, clustering, JNI acceleration, and OpenSSL integration.
Starting Resin on Sat, 23 May 2009 16:30:18 +0800 (CST)
[16:30:22.423] Server[] starting
[16:30:22.423]
[16:30:22.423] Windows XP 5.1 x86
[16:30:22.423] Java 1.6.0_03-b05, 32, mixed mode, GBK, zh, Sun Microsystems Inc.
[16:30:22.423] resin.home = D:/resin-3.0.25
[16:30:22.423] server.root = null
[16:30:22.423]
[16:30:22.763] Host[] starting
[16:30:23.284] WebApp[http://localhost:8080] starting
[16:30:25.708] WebApp[http://localhost:8080/resin-doc] starting
[16:30:26.819] WebApp[http://localhost:8080/sshtest] starting
[16:30:27.731] action: init
[16:30:31.526] com.caucho.config.LineConfigException: WEB-INF/web.xml:2: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[16:30:31.526]
[16:30:31.526] <web-app xmlns="http://caucho.com/ns/resin">,
[16:30:31.526] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[16:30:31.526] <web-app xmlns=""> are expected.
[16:30:31.526]
[16:30:31.526] Syntax: (<web-app> | <web-app> | <web-app>)
[16:30:32.808] WebApp[http://localhost:8080/resin-admin] starting
[16:30:33.138] http listening to *:8080
[16:30:33.349] hmux listening to localhost:6802
[16:30:33.379] Resin started in 11947ms
[16:31:31.192] WebApp[http://localhost:8080/cmsforssh] stopping
[16:31:31.973] com.caucho.config.LineConfigException: WEB-INF/web.xml:2: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[16:31:31.973]
[16:31:31.973] <web-app xmlns="http://caucho.com/ns/resin">,
[16:31:31.973] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[16:31:31.973] <web-app xmlns=""> are expected.
[16:31:31.973]
[16:31:31.973] Syntax: (<web-app> | <web-app> | <web-app>)
[16:31:32.283] WEB-INF/web.xml:2: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[16:31:32.283]
[16:31:32.283] <web-app xmlns="http://caucho.com/ns/resin">,
[16:31:32.283] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[16:31:32.283] <web-app xmlns=""> are expected.
[16:31:32.283]
[16:31:32.283] Syntax: (<web-app> | <web-app> | <web-app>)
解决方法:
将web.xml中的xmlns="http://java.sun.com/xml/ns/javaee" 删除
<?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" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
异常:
Resin-3.0.25 (built Wed, 05 Dec 2007 08:19:34 PST)
Copyright(c) 1998-2006 Caucho Technology. All rights reserved.
Using Resin(R) Open Source under the GNU Public License (GPL).
See http://www.caucho.com for information on Resin Professional,
including caching, clustering, JNI acceleration, and OpenSSL integration.
Starting Resin on Sat, 23 May 2009 16:30:18 +0800 (CST)
[16:30:22.423] Server[] starting
[16:30:22.423]
[16:30:22.423] Windows XP 5.1 x86
[16:30:22.423] Java 1.6.0_03-b05, 32, mixed mode, GBK, zh, Sun Microsystems Inc.
[16:30:22.423] resin.home = D:/resin-3.0.25
[16:30:22.423] server.root = null
[16:30:22.423]
[16:30:22.763] Host[] starting
[16:30:23.284] WebApp[http://localhost:8080] starting
[16:30:25.708] WebApp[http://localhost:8080/resin-doc] starting
[16:30:26.819] WebApp[http://localhost:8080/sshtest] starting
[16:30:27.731] action: init
[16:30:31.526] com.caucho.config.LineConfigException: WEB-INF/web.xml:2: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[16:30:31.526]
[16:30:31.526] <web-app xmlns="http://caucho.com/ns/resin">,
[16:30:31.526] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[16:30:31.526] <web-app xmlns=""> are expected.
[16:30:31.526]
[16:30:31.526] Syntax: (<web-app> | <web-app> | <web-app>)
[16:30:32.808] WebApp[http://localhost:8080/resin-admin] starting
[16:30:33.138] http listening to *:8080
[16:30:33.349] hmux listening to localhost:6802
[16:30:33.379] Resin started in 11947ms
[16:31:31.192] WebApp[http://localhost:8080/cmsforssh] stopping
[16:31:31.973] com.caucho.config.LineConfigException: WEB-INF/web.xml:2: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[16:31:31.973]
[16:31:31.973] <web-app xmlns="http://caucho.com/ns/resin">,
[16:31:31.973] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[16:31:31.973] <web-app xmlns=""> are expected.
[16:31:31.973]
[16:31:31.973] Syntax: (<web-app> | <web-app> | <web-app>)
[16:31:32.283] WEB-INF/web.xml:2: <web-app xmlns="http://java.sun.com/xml/ns/javaee"> is an unexpected top-level tag.
[16:31:32.283]
[16:31:32.283] <web-app xmlns="http://caucho.com/ns/resin">,
[16:31:32.283] <web-app xmlns="http://java.sun.com/xml/ns/j2ee"> or
[16:31:32.283] <web-app xmlns=""> are expected.
[16:31:32.283]
[16:31:32.283] Syntax: (<web-app> | <web-app> | <web-app>)
解决方法:
将web.xml中的xmlns="http://java.sun.com/xml/ns/javaee" 删除
相关文章推荐
- resin用MyEclipse自动生成的web项目部署后无法访问
- 解决:Intellij idea导入MyEclipse Web项目时,服务器搭建运行正常,但无法访问WebRoot下的页面
- myeclipse中的web项目导入到eclipse中注意事项,项目部署到tomcat后无法访问jsp文件
- tomcat中运行正常的web项目部署至websphere后,spring无法获取bean
- eclipse中把web项目部署在tomcat中,可以使用浏览器访问,但是无法在tomcat目录中的webapps中找到?
- Web项目部署Tomcat无法正常启动的原因
- Eclipse中的Web项目无法自动部署到Tomcat
- 在MyEclipse的web项目/java项目中,使用Hibernate-tools中的hbm2java和hbm2ddl工具,根据hbm文件自动生成pojo和数据库脚本
- 手机浏览器无法访问自己部署的tomcat程序(WEB项目)
- Myeclipse不能正常部署WEB项目
- 无法把Import到myeclipse里web项目部署到tomcat里的方法
- MyEclipse无法在tomcat部署web项目的可能原因
- myeclipse 发布 web 项目后 tomcat 无法正常启动
- 64位WIN7下Android 开发环境搭建(SDK Manager闪退,无法更新sdk,建立新项目时无法正常自动生成Activity的问题解决)
- eclipse或myeclipse,web项目无法自动编译,.classpath文件原因造成的
- web项目在tomcat部署正常,用weblogic部署无法导入httpservlet报错
- 项目部署到tomcat上,tomcat能正常启动,为什么却无法访问?
- WEB项目部署到Linux下无法访问html、css、js等静态文件的解决
- myeclipse复制一个web项目部署之后不能访问
- JPA项目使用myeclipse创建带注解的model实体类&web工程使用MyEclipse自动生成hibernate映射文件和实体类