Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IllegalStateException: can't declare any more prefixes in this context  RSS feed

 
Cyril Stock
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I am trying to use the standard JSTL from Jakarta.

I did the good import in my JSP
(<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> .

I downloaded the last version of the standard.jar and jstl.jar, I am using TOMCAT 5 and J2SE 1.4.2_06.

I also put those libraries in the common/endorsed tomcat directory :
xalan.jar
xercesImpl.jar
xml-apis.jar

But I always get the same error at execution time :

org.apache.jasper.JasperException: <h3>errors from TagLibraryValidator for c</h3><p>null: java.lang.IllegalStateException: can't declare any more prefixes in this context</p>
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.jav a:94)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:406)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:109)
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1570)
org.apache.jasper.compiler.Validator.validate(Validator.java:1516)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:259)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
...

I don't understand where is the problem.

Thanks for your help.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to this blog the problem was caused by a conflict with an old version of Xerces in the SDK. They replaced it with a newer version of Xerces to fix the problem. Another post here also claimed a similiar problem was fixed by cleaning out old JDOM libraries from the Tomcat common libs folder.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!