Czesc problem jest dość powszechny na internecie, ale nie znalazłem rozwiązania =/
plik xml
<?xml version="1.0" encoding="UTF-8"?>
<customers>
<customer>
<num>1</num>
<name>SuperCom</name>
<city>Miami</city>
<phone>305-777-4632</phone>
</customer>
<customer>
<num>2</num>
<name>Livingston Enterprises</name>
<city>Miami</city>
<phone>305-456-8888</phone>
</customer>
<customer>
<num>25</num>
<name>Oak Computers</name>
<city>Dallas</city>
<phone>214-999-1234</phone>
</customer>
<customer>
<num>3</num>
<name>MicroApple</name>
<city>Atlanta</city>
<phone>555-275-9900</phone>
</customer>
</customers>
plik startowy jsp
<%@ page contentType="text/html" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@taglib prefix="x" uri="http://java.sun.com/jstl/xml"%>
<html>
<body>
<h1>Customer List</h1>
<!-- Parse the XML Customer List -->
<c:import url="customers.xml" var="xml"/>
<x:parse xml="${xml}" var="customers"/>
<TABLE border=1>
<TR>
<TD>Customer Num</TD>
<TD>Customer Name</TD>
<TD>Customer City</TD>
<TD>Customer Phone</TD>
</TR>
<x:forEach select="$customers/customers/customer" var="customers">
<TR>
<TD><x:out select="num"/></TD>
<TD><x:out select="name"/></TD>
<TD><x:out select="city"/></TD>
<TD><x:out select="phone"/></TD>
</TR>
</x:forEach>
</TABLE>
</body>
</html>
aaa oto error ... =/
org.apache.jasper.JasperException: /welcomeJSF.jsp(14,1) According to TLD or attribute directive in tag file, attribute xml does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1209)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:846)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1763)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)