• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

need a help regarding "JSTL with xml tag"

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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><x:out select="symbol"/></td>
<td><x:out select="name"/></td>
<td><x:out 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: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry I forgot to mention the version of JSTL, am using JSTL1.1.
Thanks
Sisti
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic