weblogic11g , 部署原来在tomcat下的项目(tomcat下运行正常)
在webloigc11g下部署时提示:VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'description发现原因是:web.xml中的三处配置问题代码如下,删除后就能部署成功!<ssourl>http://172.16.26.65:7002/ssouser/</ssourl>
<certForderUrl>d:/certForderUrl/</certForderUrl>
<logoImageUrl>/logo/</logoImageUrl>
从网上找解决办法,尝试了一种就是将原来的web.xml头信息<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">换成<?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>依然不通过,我想这个和weblogic对web.xml的严格检查有关,怎样才能让weblogic不报错呢??
在webloigc11g下部署时提示:VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'description发现原因是:web.xml中的三处配置问题代码如下,删除后就能部署成功!<ssourl>http://172.16.26.65:7002/ssouser/</ssourl>
<certForderUrl>d:/certForderUrl/</certForderUrl>
<logoImageUrl>/logo/</logoImageUrl>
从网上找解决办法,尝试了一种就是将原来的web.xml头信息<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">换成<?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>依然不通过,我想这个和weblogic对web.xml的严格检查有关,怎样才能让weblogic不报错呢??
从这个异常信息看,似乎元素少了description属性。以前遇见在weblogic下 遇到需要把“text/html;charset=utf8”修改为text/html”,原因是weblogic用正则解析web.xml的时候,不匹配第一种情况。
web.xml 中哪里有text/html;charset=utf8啊 只有encoding="UTF-8"啊
一: init-param 元素不能包含 description 元素二:检查你的taglib在web.xml里的引用方式, 用<jsp-config> </jsp-config> 将所有taglib引用封住。
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:spring/applicationContext*.xml,/WEB-INF/casContext.xml
</param-value>
</context-param>
<context-param>
<param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
</param-name>
<param-value>
/WEB-INF/classes/com/common/framework/config/runMoniMgt/runMoniMgt_tiles.xml,
/WEB-INF/classes/com/common/framework/config/userMgt/userMgt_tiles.xml,
/WEB-INF/classes/com/common/framework/config/accountMgt/accountMgt_tiles.xml,
/WEB-INF/classes/com/common/framework/config/resource/resource_tiles.xml,
/WEB-INF/classes/com/common/framework/config/servernodeMgt/servernodeMgt_tiles.xml,
/WEB-INF/classes/com/common/framework/config/dataAppMgmt/dataAppMgmt_tiles.xml,
/WEB-INF/classes/com/common/framework/config/dgwFrontWeb/dgwFrontWeb_tiles.xml
</param-value>
</context-param>
<ssourl>http://172.16.26.65:7002/ssouser/</ssourl>
<certForderUrl>d:/certForderUrl/</certForderUrl>
<logoImageUrl>/logo/</logoImageUrl>
<servlet>
<servlet-name>search</servlet-name>
<servlet-class>
com.common.core.servlet.proxy.ServletToBeanProxy
</servlet-class>
<init-param>
<param-name>targetBean</param-name>
<param-value>queryMgtServlet</param-value>
</init-param>
<init-param>
<param-name>targetBean2</param-name>
<param-value>nsBannerTag</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>logout</servlet-name>
<servlet-class>
com.common.core.servlet.proxy.ServletToBeanProxy
</servlet-class>
<init-param>
<param-name>targetBean</param-name>
<param-value>loginMgtServlet</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>search</servlet-name>
<url-pattern>/DBS/Search</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>logout</servlet-name>
<url-pattern>/logout</url-pattern>
</servlet-mapping>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>CAS Authentication Filter</filter-name>
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<!-- CAS login 服务地址-->
<init-param>
<param-name>casServerLoginUrl</param-name>
<param-value>https://172.16.26.65:8443/cas/login</param-value>
</init-param>
<init-param>
<param-name>renew</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>gateway</param-name>
<param-value>false</param-value>
</init-param>
<!-- 客户端应用服务地址-->
<init-param>
<param-name>serverName</param-name>
<param-value>172.16.26.65:7002</param-value>
</init-param>
</filter>
<!--负责Ticket校验-->
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>cas.validationfilter</param-value>
</init-param>
</filter>
<filter>
<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
<filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CAS Authentication Filter</filter-name>
<url-pattern>/background/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS Validation Filter</filter-name>
<url-pattern>/background/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
<url-pattern>/background/*</url-pattern>
</filter-mapping> <filter>
<filter-name>exportFilter</filter-name>
<filter-class>
org.displaytag.filter.ResponseOverrideFilter
</filter-class>
</filter>
<filter>
<filter-name>pagerFilter</filter-name>
<filter-class>
com.common.core.web.filter.PagerFilter
</filter-class>
</filter>
<filter>
<filter-name>struts2</filter-name>
<filter-class>com.common.core.servlet.MainServlet</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>pagerFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>exportFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter>
<filter-name>openSessionInView</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>openSessionInView</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <servlet>
<servlet-name>bsStartupServlet</servlet-name>
<servlet-class>com.common.core.base.BsServlet</servlet-class>
<init-param>
<param-name>plug-in</param-name>
<param-value>
com.common.core.base.WebApplicationContextInitPlugIn,
com.common.core.security.SecurityPlugin,
com.common.core.exception.ExceptionLoaderPlugIn
</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet>
<servlet-name>nsServlet</servlet-name>
<servlet-class>
com.common.core.servlet.NSInitServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>xmlhttp</servlet-name>
<servlet-class>
com.common.core.servlet.XHServlet
</servlet-class>
<init-param>
<param-name>needSetUtf8Charset</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>xmlhttp</servlet-name>
<url-pattern>/xmlhttp</url-pattern>
</servlet-mapping>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>ClientServer</servlet-name>
<servlet-class>com.ccidit.clientserver.service.ClientServer</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ClientServer</servlet-name>
<url-pattern>/servlet/ClientServer</url-pattern>
</servlet-mapping>
<!--
<servlet>
<servlet-name>casFetchData</servlet-name>
<servlet-class>
com.ccidit.framework.fetch.action.CasFetchDataAction
</servlet-class>
</servlet> -->
<!--
<servlet-mapping>
<servlet-name>casFetchData</servlet-name>
<url-pattern>/casFetchDatas</url-pattern>
</servlet-mapping> -->
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>BaseService</servlet-name>
<servlet-class>com.ccidit.platform.service.BaseService</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>BaseService</servlet-name>
<url-pattern>/servlet/BaseService</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> <listener>
<listener-class>
org.apache.struts2.tiles.StrutsTilesListener
</listener-class>
</listener> <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list></web-app>
<certForderUrl>d:/certForderUrl/</certForderUrl>
<logoImageUrl>/logo/</logoImageUrl>就是这块
你说的都是哪些在xsd中出现过的标签问题,而我的问题是这边添加的没有的标签出现的问题啊
有没有考虑是JDK的版本与WEBLOGIC的版本不兼容我看你的
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"版本是2.4,可以从这个地方下手。看看你的weblogic 支持什么版本的然后在看看你的工程是什么版本的?
嗯 版本问题~~ 版本得对啊。。我最近也是这个 愁死我了web。xm
weblogic.xml
ejb-jar.xml
weblogic-ejb-jar.xml各种xml 要命了我还有你看看你的weblogic是哪个版本 支持哪个DTD
<ssourl>http://172.16.26.65:7002/ssouser/</ssourl>
我的解决办法是在项目中使用ssourl标签值的地方修改代码,不从web.xml中获取,而是到properties文件中查找。