Allen,

You are not getting EL working properly.

DSpace 1.5.0 already comes with JSTL 1.1.2 provided, so you do not
need to add the jars to the jspui webapp so you do not need to add
them. You should already see:

WEB-INF/lib/jstl-1.1.2.jar
WEB-INF/lib/standard-1.1.2.jar

I recommend reading through the following:
http://wiki.apache.org/jakarta-taglibs/FrequentlyAskedQuestions

Your trying to use EL syntax in your tags and there need to be some
important settings in place for that to work...

1.) Make sure your using in your web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
 version="2.4">

2.) Make sure your using the right URL for your taglibraries:

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

You should test if you really need to add the taglib directive to your
web.xml first.  I seem to recall something about JSP checking in the
jstl jar first for it.

Good luck,
Mark

p.s. we should have had this added a long time ago, if you get it
working please feel free to contribute the result back fro DSpace 1.6,
likewise DSpace 1.5.2 has some significant fixes over 1.5.0, I would
recommend using it if you can.

On Thu, Jul 16, 2009 at 9:37 PM, Allen Lam<[email protected]> wrote:
> Hello developers,
>
> I am trying to use jstl for writing jsp in dspace.
>
> What I've done:
> * added jar files from jstl package to WEB-INF/lib of dspace. I have
> tried jstl-1.2.jar from EE5, and also 1.1.2 from Apache taglib project.
> * added the tld files from jstl package to WEB-INF of dspace.
> * added several <taglib> to web.xml of dspace (below is one of them)
>
> <taglib>
>  <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
>  <taglib-location>/WEB-INF/c.tld</taglib-location>
> </taglib>
>
> * prepared a test.jsp in jspui of dspace:
>
> <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
> <html>
>  <head>
>    <title>Count to 10 Example (using JSTL)</title>
>  </head>
>  <body>
>    <c:forEach var="i" begin="1" end="10" step="1">
>      <c:out value="${i}" />
>      <br />
>    </c:forEach>
>  </body>
> </html>
>
> * open the test.jsp page from browser and get:
> ${i}
> ${i}
> ${i}
> ${i}
> ${i}
> ${i}
> ${i}
> ${i}
> ${i}
> ${i}
>
> No error message or exception in tomcat's/dspace's log.
>
> In a separated barebone webapp in the same server with similar setup, I
> get numbers 1 to 10, which is the correct result.
>
> Is jstl clashing with dspace's own tag lib? How can I make jstl work
> inside dspace?
> My dspace version is 1.5.0.
>
> Any expert could show me the way to do it, or give a comment? Thanks.
>
> Allen.
> HKU Hub Administrator, http://hub.hku.hk
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to