Weblogic 错误 403--禁止 [英] Weblogic Error 403--Forbidden

查看:39
本文介绍了Weblogic 错误 403--禁止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 weblogic 上运行 Java EE 应用程序.该应用程序在 Tomcat 上运行良好.我已经自定义了 war 文件以包含 weblogic.xml.该文件包含以下代码:-

I am trying to run a Java EE application on weblogic. The application works fine on Tomcat. I have customized the war file to include weblogic.xml. This file includes the following code:-

<container-descriptor>
    <show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>

我还更改了应用程序属性文件中的配置,以反映容器正在侦听的端口.server.port=7001server.modjk.enabled=false

I have also changed the configuration in properties file of the application to reflect the port on which container is listening. server.port=7001 server.modjk.enabled=false

我的 web.xml 文件包含以下代码:-

My web.xml file includes the following code:-

<servlet>
    <servlet-name>olatservlet</servlet-name>
    <servlet-class>org.olat.core.servlets.OLATServlet</servlet-class>

    <!-- Set the load order -->
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>olatservlet</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>olatservlet</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

当我最初在 weblogic 11g 上运行 war 文件时,我收到了一个空指针异常.但是,当我从 lib 文件夹中删除 XerceImpl.jar 时,我可以部署该文件.现在我能够成功部署应用程序.我将 weblogic 中的上下文根命名为 war 文件的名称.当我尝试在其测试选项卡中打开由 weblogic 生成的链接时,出现以下错误:-

When I was initially running the war file on weblogic 11g, I was getting a nullpointer exception. However, I could deploy the file when I removed XerceImpl.jar from the lib folder. Now I am able to deploy the application successfully. I name the context root in the weblogic as the name of the war file. When I try to open the link generated by weblogic in its testing tab, I get the following error:-

错误 403--禁止

来自 RFC 2068 超文本传输​​协议 -- HTTP/1.1:

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

10.4.4 403 禁止

10.4.4 403 Forbidden

服务器理解请求,但拒绝满足它.授权无济于事,不应重复该请求.如果请求方法不是 HEAD 并且服务器希望公开请求未完成的原因,它应该在实体中描述拒绝的原因.当服务器不想透露请求被拒绝的确切原因或没有其他响应适用时,通常使用此状态代码.

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.

我想知道是否有人可以告诉我如何解决这个问题.

I was wondering if someone could tell me how to resolve this issue.

推荐答案

我知道现在回答这个问题已经很晚了.但我只是用我的一点知识来回答,希望它可以帮助那里的人.

I know it is very late to answer this question. But I am answering with my little knowledge in the hope it will help someone out there.

你应该在web.xml文件中的welcome-file-list中定义起始页.例如,如果client.jsp是你运行项目时要显示的页面,则welcome-file-list中的第一行web.xml 文件应该是

You should define the starting page in welcome-file-list in web.xml file.For eg, if client.jsp is the page to be displayed when you run your project, the first line in welcome-file-list in web.xml file should be

<welcome-file-list>
    <welcome-file>client.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
 </welcome-file-list>

这篇关于Weblogic 错误 403--禁止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆