现象: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常见问题及解决办法 如 Error 404: SRVE0190E JSPG0049E
WebSphere+Application+Server+常见问题及解答
在Websphere Application Server 经常会出现乱码,有时候可以在项目中去设置,但有时候也是Websphere 造成的,所以需要你手动去更改Websphere 的设置。
webSphere指南webSphere指南webSphere指南webSphere指南webSphere指南
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....
往数据库插入数据时,有时候可以,有时失败,报错java.lang.NullPointerException oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431) 在websphere通过getClassLoader().getResource("").getPath()取配置文件...
websphere设计
WebSphere
This chapter introduces some of the WebSphere high availability concepts, the different levels of WebSphere end-to-end high availability, and WebSphere high availability solutions planning.
IBM Redbook - WebSphere Commerce Best Practices in Web 2.0 Store
was相关资料: Websphere安装步骤 websphere安装后配置说明 Websphere实用手册 WebSphere+v6.1配置文档
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 commerce的使用即websphere commerce图解.在网上扒了半天才找到的稀品啊!IBM创建商品店铺(websphere commerce).pdf 一些其他的相关资料: ...
第一部分 Websphere MQ原理和体系结构 11 第一章Websphere MQ原理 11 目标 11 1.1中间件 11 1.1.1中间件的优点 11 1.1.2中间件的分类 12 1.2三种通信技术的比较 13 1.3 WebSphere MQ的原理 15 1.4 WebSphere MQ的...
WebSphere Application Server v7.1互补产品 WAS v7.0 的价值在IBM z/OS WebSphere Application Server Version 7.0 特色 WebSphere Application Server Version V7.0技术简介 WebSphere Application Server v...
WebSphere在Myeclipse中的整合,Myeclipse下增加WebSphere的支持
解决WebSphere不支持JDK新特性的问题.doc
websphere7.0websphere7.0
linux 下websphere安装linux 下websphere安装linux 下websphere安装linux 下websphere安装linux 下websphere安装