You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Emandi, Srinivasrao" <sr...@logicacmg.com> on 2006/06/02 08:17:14 UTC

Problem with JSTL

Hi all
	I m using jstl to parse xml in my jsp,
 i m facing a strange problem with the uri in <%@ taglib 
	
The following code is working fine:
	<%@ taglib prefix="x"   uri="http://java.sun.com/jstl/xml" %>
		<c:set var="val" value="${requestScope.responseXML}" />
		<x:parse var="doc" xml="${val}" />
however xml in <x:parse ..is deprecated one i want to use "doc" in place of "xml" , but its throwing an exception :"Attribute doc invalid for tag parse according to TLD"
If i use <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> then the result is "javax.servlet.jsp.JspException: Content is not allowed in prolog."
Version i m using : Tomcat : 5.0.3 
		   jstl :1.1
		  jetspeed 2
	Can any one please give some idea to solve this problem.




This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

Re: Problem with JSTL

Posted by Kris Schneider <kr...@dotech.com>.
The correct URI for JSTL 1.1 is: http://java.sun.com/jsp/jstl/xml

As you've noted, the parse tag would be used like so:

<x:parse var="doc" doc="${val}"/>

Make sure you have the proper JAR files for the Standard 1.1 taglib 
installed (instead of Standard 1.0).

Make sure that the value of ${val} doesn't contain any content before the 
prolog/declaration: <?xml version="1.0"?>

Make sure that the value of ${val} doesn't contain any non-XML content 
before the root element.

Emandi, Srinivasrao wrote:
> Hi all
> 	I m using jstl to parse xml in my jsp,
>  i m facing a strange problem with the uri in <%@ taglib 
> 	
> The following code is working fine:
> 	<%@ taglib prefix="x"   uri="http://java.sun.com/jstl/xml" %>
> 		<c:set var="val" value="${requestScope.responseXML}" />
> 		<x:parse var="doc" xml="${val}" />
> however xml in <x:parse ..is deprecated one i want to use "doc" in place of "xml" , but its throwing an exception :"Attribute doc invalid for tag parse according to TLD"
> If i use <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> then the result is "javax.servlet.jsp.JspException: Content is not allowed in prolog."
> Version i m using : Tomcat : 5.0.3 
> 		   jstl :1.1
> 		  jetspeed 2
> 	Can any one please give some idea to solve this problem.

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org