修改WEB-INF目录下的weblogic.xml,将<context-root>你的目录名</context-root>改为<context-root>/</context-root>,如果还没有该文件,创建一个,内容大致如下
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 7.0//EN" "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<!--container-descriptor标签可以没有,这个是因为自己应用的需要加上去的-->
<container-descriptor>
<index-directory-enabled>true</index-directory-enabled>
</container-descriptor>
<context-root>你的目录名</context-root>
</weblogic-web-app>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 7.0//EN" "http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
<weblogic-web-app>
<!--container-descriptor标签可以没有,这个是因为自己应用的需要加上去的-->
<container-descriptor>
<index-directory-enabled>true</index-directory-enabled>
</container-descriptor>
<context-root>你的目录名</context-root>
</weblogic-web-app>
解决方案 »
- Struts 1 + Spring 2.5.6+hibernate 3.6 启动报错
- java贪吃蛇
- 请问service层中怎么拿到httpSession?
- ibator1.2自动生成的example类不会用求救!
- hibernate 模糊查询语句出错
- servlet怎么连SQLSERVER数据库(在JBOSS容器里)
- myeclipse下用jboss开发如何在启动jboss增加用户jar包
- hibernate中用middlegen产生映射文件时字段数据类型怎么不能随数据库更新呢?在线等,急!!!
- 给个图片上传和显示的程序段呗
- org.apache.axis.client.AdminClient的调用问题
- Equinox环境开发Web应用,jetty怎么配置,比如配置数据源和并发。
- 100分相赠,如解决SSH的Servlet action is not available错误!!拜请高手进!!!!!
<!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>
<context-root>/</context-root>
</weblogic-web-app>二、使用WebLogic Builder设置(也就是生成上述文件)
file->open->“Context Path”设为“/”,然后保存