“MyEclipse自动生成的web项目部署后在TOMCATE正常,resin下无法访问”解决方法

MyEclipse自动生成的web项目部署后在TOMCATE正常,resin下无法访问 收藏
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" 删除

 

本文来自CSDN博客,转载请标明出处:http://203.208.39.132/search?q=cache:QI5kpj8cQe0J:blog.csdn.net/fengfengjava/archive/2009/05/23/4210955.aspx+WEB-INF/web.xml:6:+%3Cweb-app+xmlns%3D%22http://java.sun.com/xml/ns/javaee%22%3E+is+an+unexpected+top-level+tag.+web.xml&cd=1&hl=zh-CN&ct=clnk&gl=cn&st_usg=ALhdy2-HPpxOegfT4ttRFvZiiEkbKkFQBw

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值