weblogic发布程序提示失败,Error 404--Not Found
将程序包发布到weblogic8.1上,现将web.xml和weblogic.xml贴上,看看问题出在那里了,个人感觉出在路么下了,可是就是不明白,我的index.jsp在目录下,而index.html在portal下,为什么登陆提示如下报错呢:
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-->
<web-app>
<display-name>beta</display-name>
<description>test系统</description>
<context-param>
<param-name>daoType</param-name>
<param-value>jdbc</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>ApplicationResources</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml</param-value>
</context-param>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>rzfilter</filter-name>
<filter-class>com.jtpsoft.webapp.filter.RzFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>rzfilter</filter-name>
<url-pattern>/menu/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<listener>
<listener-class>com.jtpsoft.webapp.listener.StartupListener</listener-class>
</listener>
<listener>
<listener-class>com.jtpsoft.webapp.listener.RzListener</listener-class>
</listener>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>appinitservlet</servlet-name>
<servlet-class>com.jtpsoft.AppInitServlet</servlet-class>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
weblogic.xml
<?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>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>
</jsp-descriptor>
<container-descriptor>
<session-monitoring-enabled>true</session-monitoring-enabled>
</container-descriptor>
<context-root>/portal</context-root>
</weblogic-web-app>
那位高人帮看看,我不是搞网页中间件的,现在是公司发来一个网站系统,我现在需要布署在这个上面,可是总是提示这个出错,不知道问题出在那里了,总感觉路径那里不对,也就是weblogic.xml里
</container-descriptor>
<context-root>/portal</context-root>
</weblogic-web-app>
上述路径怎么给,比方说我的整个程序包文件夹名wangzhan放在盘符的根目录下,如f:/wangzhan.而index.jsp在f:/wangzhan/index.jsp ,而index.html在f:/wangzhan/portal/index.html,怎么改上述两个文件,急!
[ 本帖最后由 wfcjz 于 2009-12-27 13:03 编辑 ]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
不是这个了
</container-descriptor>
<context-root>/portal</context-root>
</weblogic-web-app>?
我们一般的用法是,不用WEBLOGIC.XML,将XXX.WAR发布成功;
然后直接访问http://localhost:7001/XXX/index.jsp;
http://localhost:7001/defaultroot/
weblogic.xml文件内容:
<!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>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>
</jsp-descriptor>
<container-descriptor>
<session-monitoring-enabled>true</session-monitoring-enabled>
</container-descriptor>
<context-root>defaultroot</context-root>
</weblogic-web-app>
你的访问URL贴出来?
现在weblogic配置没问题,因为之前在这上面布署了应用程序,运行正常,而这个网站是不需要配置数据库连接的,所以网页是以JSP形式做好的,只要扔在weblogic上就可以了,现在可以肯定是我上述的两个文件配置那里出了问题!
1、首先看一下你WEBLOGIC上需不需要配置你网站需要用的DB POOL,也就是所谓的数据库连接池;
2、然后看一下你发布的网站程序所需要设置的系统环境变量CLASSES,例如我的应用服务器配置的是UNIX的,修改/ETC/PROFILE,添加JAVA_HOME="/usr/local/java"
CLASSPATH="/opt/allfangx/WEB-INF/lib/jcommon-1.0.0.jar:/usr/local/classes/mysql-connector-java-3.0.10-stable-bin.jar:/opt/shopweb/WEB-INF/lib/jfreechart-1.0.1.jar:/usr/local/classes/md.jar:/usr/local/classes/key.jar:/opt/shopweb/WEB-INF/lib/dom4j.jar:/opt/shopweb/WEB-INF/lib/gnujaxp.jar:/usr/local/java/lib:/usr/local/java/jre/lib:/usr/local/classes:/usr/local/classes/jsdk.jar:/usr/local/classes/MyUpload.jar:./"
PATH="$PATH:/usr/local/java/bin:/usr/local/java/jre/bin:./"
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CLASSPATH
export DISPLAY=:1.0,这些适系统和网站情况而定;
3、看看你的WEB服务有没有添加WEBLOGIC的动态解析模块, 如果是apache,在/apache/bin下执行httpd -l,看看是否有以下core.c、 worker.c、 http_core.c、 mod_so.c模块,如果没有需安装,在此不在解讨论如何安装,可问GOOGLE;
4、配置HTTPD.CONF,添加WEBLOGIC动态解析,如下
<IfModule mod_weblogic.c>
WebLogicHost 10.10.10.8
WebLogicPort 7001
KeepAliveEnabled true
KeepAliveSecs 20
DefaultFileName index.shtml
MatchExpression */examplesWebApp/*.jsp
MatchExpression /servlet/*.*
MatchExpression *.do
MatchExpression */portal/*
MatchExpression /WEB-INF/*.xml
MatchExpression *.class
ConnectTimeoutSecs 3
ConnectRetrySecs 2
MaxSkipTime 20
</IfModule>
至此WEBLOGIC的应用配置全部完成,虽后才是网站程序的发布。
+++++++++++++++++++++++++++++++++++++++++++++++
拼一年春夏秋冬,搏一生无怨无悔
ITAA红火 QQ:244298220
1、首先看一下你WEBLOGIC上需不需要配置你网站需要用的DB POOL,也就是所谓的数据库连接池;
2、然后看一下你发布的网站程序所需要设置的系统环境变量CLASSES,例如我的应用服务器配置的是UNIX的,修改/ETC/PROFILE,添加JAVA_HOME="/usr/local/java"
CLASSPATH="/opt/allfangx/WEB-INF/lib/jcommon-1.0.0.jar:/usr/local/classes/mysql-connector-java-3.0.10-stable-bin.jar:/opt/shopweb/WEB-INF/lib/jfreechart-1.0.1.jar:/usr/local/classes/md.jar:/usr/local/classes/key.jar:/opt/shopweb/WEB-INF/lib/dom4j.jar:/opt/shopweb/WEB-INF/lib/gnujaxp.jar:/usr/local/java/lib:/usr/local/java/jre/lib:/usr/local/classes:/usr/local/classes/jsdk.jar:/usr/local/classes/MyUpload.jar:./"
PATH="$PATH:/usr/local/java/bin:/usr/local/java/jre/bin:./"
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CLASSPATH
export DISPLAY=:1.0,这些适系统和网站情况而定;
3、看看你的WEB服务有没有添加WEBLOGIC的动态解析模块, 如果是apache,在/apache/bin下执行httpd -l,看看是否有以下core.c、 worker.c、 http_core.c、 mod_so.c模块,如果没有需安装,在此不在解讨论如何安装,可问GOOGLE;
4、配置HTTPD.CONF,添加WEBLOGIC动态解析,如下
<IfModule mod_weblogic.c>
WebLogicHost 10.10.10.8
WebLogicPort 7001
KeepAliveEnabled true
KeepAliveSecs 20
DefaultFileName index.shtml
MatchExpression */examplesWebApp/*.jsp
MatchExpression /servlet/*.*
MatchExpression *.do
MatchExpression */portal/*
MatchExpression /WEB-INF/*.xml
MatchExpression *.class
ConnectTimeoutSecs 3
ConnectRetrySecs 2
MaxSkipTime 20
</IfModule>
至此WEBLOGIC的应用配置全部完成,虽后才是网站程序的发布。
+++++++++++++++++++++++++++++++++++++++++++++++
拼一年春夏秋冬,搏一生无怨无悔
ITAA红火 QQ:244298220
可以配置虚拟目录
这个版块人气不旺,其实这个可能对一个刚接触的人来说都知道问题出在那儿,问题是我刚上手一天,郁闷!