1.看看WEB-INF目录下有么有一个weblogic.xml文件,如果没有则新建一个。
内容如下:
<?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>
2.如果有weblogic.xml,那太好办了,直接把<context-root></context-root>
中间的工程名去掉就可以了,注意,不要把“/”给去掉。
经过上述步骤,则可以访问自己想要的名称路径了。