weblogic服务器部署的程序,如何直接通过IP访问(即URL中去掉工程名)

weblogic服务器部署的程序,如何直接通过IP访问(即URL中去掉工程名)

转载  2012年12月14日 16:11:19

用weblogic部署的程序,怎么能够直接通过IP访问呢?

下面就是了

 

打开你的工程,看看webroot下的WEB-INF中有没有一个weblogic.xml文件。

1、如果没有,自己建一个,里面写上:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 <context-root>/</context-root>
</weblogic-web-app>

里面的命名空间可根据自己的实际情况做改动,比如,如果你的工程较简单,可以这么简单的写:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app>
    <context-root>/</context-root>
</weblogic-web-app>

 对了,我用的是weblogic9.2,里面的xsd是9的,要根据自己的实际情况修改一下。

 

2、如果有weblogic.xml,那太好办了,直接把<context-root></context-root>中间的工程名去掉就可以了,

注意,不要把“/”给去掉。

 

偶了,访问吧。

 

转自:http://www.cnblogs.com/huangjingzhou/articles/2151067.htm

用weblogic部署的程序,怎么能够直接通过IP访问呢?

下面就是了

 

打开你的工程,看看webroot下的WEB-INF中有没有一个weblogic.xml文件。

1、如果没有,自己建一个,里面写上:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
 <context-root>/</context-root>
</weblogic-web-app>

里面的命名空间可根据自己的实际情况做改动,比如,如果你的工程较简单,可以这么简单的写:

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app>
    <context-root>/</context-root>
</weblogic-web-app>

 对了,我用的是weblogic9.2,里面的xsd是9的,要根据自己的实际情况修改一下。

 

2、如果有weblogic.xml,那太好办了,直接把<context-root></context-root>中间的工程名去掉就可以了,

注意,不要把“/”给去掉。

 

偶了,访问吧。

 

转自:http://www.cnblogs.com/huangjingzhou/articles/2151067.htm

猜你喜欢

转载自blog.csdn.net/qq_33443020/article/details/78657642