myeclipse开发webshpere工程的问题!
初学websphere,用MyEclipse创建enterprise application project后,自动生成index.jsp文件。application.xml文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
<display-name>wastest</display-name>
<module id="myeclipse.1217841523593">
<web>
<web-uri>wastestWeb.war</web-uri>
<context-root>/wastestWeb</context-root>
</web>
</module>
</application>
index.jsp如下
<%@ page contentType="text/html;charset=GBK"%>
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
""This is my JSP page. <br>
</body>
</html>
在websphere6.1中安装新应用时,如果websphere所在的机器没有上internet网,则报错:
[08-8-7 14:05:36:609 CST] 00000023 ArchiveDeploy W ADMA0142W: 尝试关闭已经关闭的归档。
[08-8-7 14:05:37:031 CST] 00000023 SystemOut O
+++ Warning +++: Thu Aug 07 14:05:37 CST 2008 org.xml.sax.SAXParseException: schema_reference.4:读取模式文档“http://java.sun.com/xml/ns/javaee/application_5.xsd”失败,因为 1)找不到文档;2)无法读取文档;3)文档根元素不是 <xsd:schema>。
如果联上internet网,则安装成功。
这是为什么啊?
[解决办法]
嗯,
我也碰到这问题了..
开始的时候,测试服务器没有设置网关,不能上网的.
结果,开发机器部署得了,测试服务器死活都部署不了.
看到楼主这个帖后,设置了一下网关,即时部署成功.
先谢过楼主了.
但有点疑问,这里面是不是会产生什么数据外泄?
[解决办法]
将:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
改为:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
<application id="Application_ID">
试试看。