包结构如下:
上图中的weblogic.xml是我部署weblogic时加上去的。
内容如下:
--------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
<jsp-descriptor>
<jsp-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</jsp-param>
<jsp-param>
<param-name>pageCheckSeconds</param-name>
<param-value>120</param-value>
</jsp-param>
<jsp-param>
<param-name>compilerSupportsEncoding</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>verbose</param-name>
<param-value>false</param-value>
</jsp-param>
</jsp-descriptor>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>UTF-8</java-charset-name>
</input-charset>
</charset-params>
<context-root>/YssUCO</context-root>
</weblogic-web-app>
--------------------------------
用weblogic部署好war包后启用startWebLogic.cmd时报这个错
然后在地址栏输入http://192.168.16.146:8083/YssUCO/(weblogic控制台的测试地址)报这个错:
Error 403--Forbidden
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
我猜是我写的那个 weblogic.xml有问题,但不知道具体什么问题。
------解决方案--------------------
包冲突。
你程序用了一个XML解析包,跟Weblogic自带的XML解析包不同版本,导致版本冲突。
具体解决办法参见这里:
http://hi.baidu.com/chenchendf/blog/item/4e1592d6b994e02506088bf1.html