JSP/JSTL: Well-formed taglib

Running Tomcat 5.5.17 on Netbeans.
JSP page has the following:

    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>    


ScreenShot542.jpg
go4javaAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
summerianConnect With a Mentor Commented:
This should also work (XML style):
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:display="urn:jsptld:http://displaytag.sf.net"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:sql="http://java.sun.com/jstl/sql"  
 >
  <jsp:directive.page contentType="text/html; charset=UTF-8" />
  <jsp:directive.page import="org.displaytag.sample.*" />  
  <jsp:include page="inc/header.jsp" flush="true" />  
  <jsp:scriptlet> request.setAttribute( "test", new ReportList() ); </jsp:scriptlet>  
 
 
 
   
    <sql:query var="results">
      select * from table
    </sql:query>
    <display:table name="${results.rows}" />
 
 
 
 
  <display:table name="test" export="true" sort="list" pagesize="8">
    <display:column property="city" title="CITY" group="1" sortable="true" headerClass="sortable" />
    <display:column property="project" title="PROJECT" group="2" sortable="true" headerClass="sortable" />
    <display:column property="amount" title="HOURS" />
    <display:column property="task" title="TASK" />
  </display:table>
 
  <jsp:include page="inc/footer.jsp" flush="true" />
 
</jsp:root>

Open in new window

0
 
mohammedfCommented:
there is no error in ur includes , however try to run ur page i think it will run ok
0
 
summerianCommented:
What is there in line 9 in lists.jsp ? Post first 20 lines
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
go4javaAuthor Commented:
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:display="urn:jsptld:http://displaytag.sf.net">
  <jsp:directive.page contentType="text/html; charset=UTF-8" />
  <jsp:directive.page import="org.displaytag.sample.*" />  
  <jsp:include page="inc/header.jsp" flush="true" />  
  <jsp:scriptlet> request.setAttribute( "test", new ReportList() ); </jsp:scriptlet>  

 
 
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>    
   
    <sql:query var="results">
      select * from table
    </sql:query>
    <display:table name="${results.rows}" />
 
 
 
 
  <display:table name="test" export="true" sort="list" pagesize="8">
    <display:column property="city" title="CITY" group="1" sortable="true" headerClass="sortable" />
    <display:column property="project" title="PROJECT" group="2" sortable="true" headerClass="sortable" />
    <display:column property="amount" title="HOURS" />
    <display:column property="task" title="TASK" />
  </display:table>
 
  <jsp:include page="inc/footer.jsp" flush="true" />

</jsp:root>
0
 
mohammedfCommented:
try to put this

 
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>    


at the begining of the page
0
 
summerianCommented:
You mixed XML style with standard JSP style. Try this:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
  <%@page contentType="text/html; charset=UTF-8" %>
  <%@page import="org.displaytag.sample.*" %>
  <jsp:include page="inc/header.jsp" flush="true" %>
  <% request.setAttribute( "test", new ReportList() ); %>
 
 
 
 
    <sql:query var="results">
      select * from table
    </sql:query>
    <display:table name="${results.rows}" />
 
 
 
 
  <display:table name="test" export="true" sort="list" pagesize="8">
    <display:column property="city" title="CITY" group="1" sortable="true" headerClass="sortable" />
    <display:column property="project" title="PROJECT" group="2" sortable="true" headerClass="sortable" />
    <display:column property="amount" title="HOURS" />
    <display:column property="task" title="TASK" />
  </display:table>
 
  <jsp:include page="inc/footer.jsp" flush="true" />

Open in new window

0
 
go4javaAuthor Commented:
...results in error 'Invalid standard action'
0
 
summerianConnect With a Mentor Commented:
Here's a little article about it:

http://www.javaranch.com/journal/2002/02/xmljsp.html
0
All Courses

From novice to tech pro — start learning today.