[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

JSTL xml issue

Posted on 2004-10-26
7
Medium Priority
?
369 Views
Last Modified: 2013-11-24
hi,

here is the portion of my code,

<x:parse doc="${requestScope.resp}" var="respData"/>
<x:forEach select="$respData/Results/Result">
    <tr>
    <c:forEach items="${requestScope.cols}" var="columns">
    <td><x:out select="$columns"/></td>
    </c:forEach>
    </tr>
</x:forEach>

${requestScope.cols} is a array of column names/xml tag name. The problem is that i want to dynamically select out the data base on the array ${requestScope.cols}. But i cannot do it with the way above.
I hope i get this clear for you all

please help

surbex-t


0
Comment
Question by:surbex-t
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 

Author Comment

by:surbex-t
ID: 12418241
Hi,

To be simple i want to select out the value from the XML that i parse in dynamically base on a string array that i get.

surbex-t
0
 

Author Comment

by:surbex-t
ID: 12419231
nobody got a sollution...?
forgive me for giving such little points coz this is only points that i got.But i indeed need your help in this.
Or I posted in wrong section....

Please help...
0
 
LVL 2

Expert Comment

by:siliconeagle
ID: 12420641
post a piece of example XML
also,
<x:out select="$columns"/> should be
<x:out select="${columns}"/>
0
 

Author Comment

by:surbex-t
ID: 12429517
tried that....
but got error like,

org.apache.jasper.JasperException: /util/grid.jsp(31,12) According to TLD or attribute directive in tag file, attribute select does not accept any expressions
        at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
        at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:376)
        at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150)
        at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:941)
        at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:696)
        at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
        at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
        at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:716)
        at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
        at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
        at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:716)
        at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
        at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
        at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
        at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
 ......


surbex-t
0
 
LVL 2

Accepted Solution

by:
siliconeagle earned 200 total points
ID: 12481643
<x:out select="?"/> doesn't accept expressions.
looks like you'll need to use
<c:choose>
<c:when test="${columns=='columnName'}"/><x:out select="columnName"/></c:when>
.....
</c:choose>
its a bit tedious but it' should work.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question