Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

need a help regarding "JSTL with xml tag"  RSS feed

 
Sisti Dey
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Kindly help if anybody knows the solution.
while doing a very simple JSTL with xml tag example as below:-

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<html>
<head>
<title>JSTL Support for XML</title>
</head>
<body bgcolor="#FFFFCC">
<h3>Portfolio</h3>

<c:import url="stock.xml" var="xmldoc"/>
<x:parse xml="$xmldoc" var="output"/>
<p>

<table border="2" width="50%">
<tr>
<th>Stock Symbol</th>
<th>Company Name</th>
<th>Price</th>
</tr>
<tr>
<td><xut select="symbol"/></td>
<td><xut select="name"/></td>
<td><xut select="price"/></td>

</tr>
</table>
</body>
</html>
-------------------------------------------------------------
With xml file as below:-

<?xml version="1.0" encoding="UTF-8"?>
<portfolio>
<stock>
<symbol>SUNW</symbol>
<name>Sun Microsystems</name>
<price>17.1</price>
</stock>
</portfolio>

-----------------------------------------
getting error:-

This attribute does not support request time values.
<x:parse xml="${xmldoc}" var="output"/>

As I know it do take request time value.
I am doing it in MyEclipse with weblogic 9.x.
It would be nice if anybody have idea reagarding this error.
Thanks in advance

Sisti
 
Sisti Dey
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I forgot to mention the version of JSTL, am using JSTL1.1.
Thanks
Sisti
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the JSTL 1.1 Spec, the xml attribute is deprecated. Use doc instead. That may not be the problem, but it's one thing to get out of the way.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!