日期:2014-05-17  浏览次数:20624 次

为什么我的web工程必须连网才能发布成功
我怀疑是不是我的那个头文件连了网才能发布,我不知道是那个或者我的配置文件该如何修改下,求教~~!!!
这个是我web.xml头文件
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
这个是spring的头文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">

------解决方案--------------------
这样貌似没错
你是不是需要某些东西要从其他电脑获取,比如数据库装在其他电脑,而你没网络数据库连不到装有数据库的电脑上去
------解决方案--------------------
有你们想要的
http://download.csdn.net/user/Strive20101101
------解决方案--------------------
我也遇到过一次,出问题的原因是xmlns的定义引用了一个dtd,可能这个dtd本地没有,所以需要联网。
解决方法是把某个xml配置文件的xmlns引用删除。

------解决方案--------------------
如果可能的话,看下web.xml的filter 看下是否有配置了连到外网的属性