`

websphere报错can't declare any more prefixes in this context

 
阅读更多

现象JSP里引用C标签时报 java.lang.IllegalStateException: can't declare any more prefixes in this context,但在tomcat下没问题

原因:jdom/dom4j在解释xml时,用的是ibm的jre 1.4.1时,如果xml文件中有xmlns:udm时,就会在将string input stream转成document时出现:java.lang.IllegalStateException: can't declare any more prefixes in this context错误,如果用sun的jdk1.4.2就没这个问题.是由于xml parser: Crimson不能解释带有类似于xmlns:xsi这样的属性.要用Xerces才行,但是IBM的jre在默认情况下寻找Crimson作为parser

解决办法:是通过在程序中设定jre的xml parser为Xerces,同时将Xerces的jar包加入到classpath中,一共有三个包:xalan.jar,xercesImpl.jar,xml-apis.jar

http://xml.apache.org/xalan-j/上可以下载.

http://xerces.apache.org/xerces-j/
jre的xml parser设置:是jrelib下的一个叫jaxp.properties文件,最后有三行是关于指定 xml parser的,将注释去掉,或者在程序中加入以下语句也可以:
System.setProperty("javax.xml.parsers.DocumentBuilderFactory","org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
System.setProperty("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserFactoryImpl");

如下链接中的文章解释得非常具体:
http://www.javaworld.com.tw/jute/post/view?bid=19&id=14958&sty=3

注:JSTL标签在哪涉及到了xml的解析,这里有待研究

分享到:
评论

相关推荐

    websphere MQ错误代码

    很详细的 websphere MQ错误代码 包括了最常见的所有错误 websphere MQ错误代码

    websphere常见问题及解决办法

    WebSphere 常见问题及解决办法详解 在本文中,我们将详细探讨 WebSphere 中的一些常见问题及其解决方法。WebSphere 是一个基于 Java 的应用服务器,广泛应用于企业级应用开发中。然而,在实际开发和部署过程中,...

    Websphere Application Server 6.1乱码问题解决办法

    Websphere Application Server 6.1 是 IBM 提供的一个企业级的应用服务器,它为开发和部署Web应用程序和服务提供了强大的支持。然而,在实际使用过程中,乱码问题常常困扰着开发者和管理员,尤其是在处理不同编码...

    IBM Websphere Portal Primer

    A recent report from Forrester Research states, "IT executives expect eBusiness spending to drop 14% in 2002, but more than one-third of Global 3500 firms plan to purchase portal servers this year....

    websphere 6.1 资料集

    Websphere 6.1 资料集涵盖了关于IBM的Websphere Application Server (WAS) 6.1版本的全面知识,包括安装、配置和实用操作等多个方面。Websphere是IBM提供的一个强大的企业级Java应用服务器,用于部署和管理基于Java...

    websphere

    ### WebSphere设计与LDAP集成深度解析 #### 一、引言:目录服务与WebSphere的关系 WebSphere作为IBM的一款企业级应用服务器,提供了强大的中间件功能,包括事务处理、消息传递、安全性和集群管理等,旨在帮助企业...

    WebSphere实验报告.zip

    WebSphere是IBM开发的一款强大的企业级应用服务器,它在IT行业内扮演着至关重要的角色,尤其在企业级Java应用程序的部署和管理方面。本实验报告基于吉林大学的WebSphere课程,涵盖了八次实验的内容,旨在帮助学生...

    应用移植WebSphere问题列表(经验是买不到的)

    3. **Web.xml错误**:WebSphere对Java规范的检查非常严格,当发布应用时,如果`web.xml`文件中的元素顺序不正确,可能会报错。确保按照标准的XML顺序定义元素。 4. **404错误和响应头问题**:发布应用后,无论执行...

    linux下WebSphere启动停止

    "Linux下WebSphere启动停止" Linux操作系统下WebSphere服务器的启动和停止是非常重要的操作,因为这直接关系到WebSphere服务器的使用和维护。下面将详细介绍Linux下WebSphere启动停止的过程。 一、WebSphere服务器...

    解决WebSphere不支持JDK新特性的问题.doc

    解决 WebSphere 不支持 JDK 新特性的问题 在 WebSphere Application Server V6.1 中,如果 JSP 中嵌入的代码包含 JDK 5.0 的特性,编译的时候会出错。这是因为 WAS6.1 采用 JDK5.0,因此需要设置相应的 JSP 引擎...

    WebSphere在Myeclipse中的整合

    ### WebSphere 在 Myeclipse 中的整合知识点详解 #### 一、引言 随着企业级应用开发需求的增长,集成开发环境(IDE)与应用服务器之间的兼容性和整合变得尤为重要。Myeclipse作为一款广受欢迎的Java集成开发环境,...

    Websphere8.5安装

    【标题】:Websphere 8.5安装 在IT领域,WebSphere是IBM提供的一款企业级应用服务器,常用于构建、部署和管理各种企业应用程序。本文将详细讲解WebSphere 8.5的安装过程,包括IBM Installation Manager的安装、...

    Linux中安装WebSphere7部署手册

    在Linux(CentOS 7)环境下安装WebSphere 7的过程是一项关键任务,因为WebSphere是一个广泛应用的IBM中间件,常用于构建和部署企业级Java应用程序。以下是对标题和描述中涉及知识点的详细说明: 首先,**配置hosts...

    WebSphere如何打补丁

    ### WebSphere如何打补丁 #### 一、概述 在IT行业中,中间件如IBM WebSphere Application Server (WAS)的稳定性和安全性至关重要。为了确保系统能够正常运行并避免潜在的安全漏洞,定期更新和打补丁是必不可少的...

    IBM WebSphere MQ 安装包

    【IBM WebSphere MQ安装包详解】 IBM WebSphere MQ,前身为IBM MQSeries,是IBM公司推出的一款企业级的消息中间件产品。它在信息技术领域扮演着至关重要的角色,为跨网络、操作系统和应用程序提供了高效、安全的...

    WEBSPHERE乱码问题的解决和处理

    /opt/IBM/WebSphere/AppServer/classes:/opt/IBM/WebSphere/AppServer/lib:/opt/IBM/WebSphere/AppServer/installedChannels:/opt/IBM/WebSphere/AppServer/lib/ext:/opt/IBM/WebSphere/AppServer/web/help:/opt/IBM...

    在Linux服务器上每周自动重启WebSphere服务配置

    ### 在Linux服务器上每周自动重启WebSphere服务配置 #### 知识点概述 本文档将详细介绍如何在Linux环境中设置cron任务来实现WebSphere服务的自动重启。此方法不仅适用于WebSphere服务,还可广泛应用于需要定时执行...

    Beginning Java with WebSphere

    Beginning Java with WebSphere provides a step-by-step guide for creating and installing both client- and server-based Java applications using Rapid Application Development v8, WebSphere Application ...

    WebSphere

    ### WebSphere 6.1 安装与配置详解 #### 一、WebSphere 6.1 主程序安装 WebSphere Application Server 是一款由 IBM 开发的企业级应用服务器,广泛应用于构建和部署企业级 Java 应用。WebSphere 6.1 版本是一款...

    在WebSphere发布CXF注意事项

    在WebSphere上部署CXF(CXF全称为Apache CXF,是一个开源的Java服务框架)时,可能会遇到一系列挑战。本文将深入探讨这些常见问题及其解决方案,帮助你顺利地在WebSphere应用程序服务器上运行CXF服务。 首先,理解...

Global site tag (gtag.js) - Google Analytics