tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Mistroni <mmistr...@gmail.com>
Subject problems with JSTL's c:forEach
Date Thu, 16 Jun 2005 08:24:35 GMT
hello all,
  i am new to JSTL (i have used only struts tags so far), and i
decided to move my app to  use JSTL, but i am experiencing some
problems.
Situation is that i have a List that is in my ServletContext with the
name of WebConstants.EXPENSE_TYPE, and in my JSP i wanted to retrieve
it and possibly build a selectable list out of it...
i started by trying to display the list, by writing following code (i
couldn't find out how to refer to WebConstants.EXPENSE_TYPE so i put
the value of that constants, whch is "EXPENSE_TYPE")

<c:forEach var="item" items="${pageContext.servletContext.EXPENSE_TYPES}">
			${item.id}<br/>
			</c:forEach>

But i keep on getting this exception:

21:04:15,109 ERROR [Engine] StandardWrapperValve[StrutsActionServlet]:
Servlet.s
ervice() for servlet StrutsActionServlet threw exception
javax.servlet.jsp.JspException: ServletException in
'/layout/classicLayout.jsp':
 ServletException in '/insertBody.jsp': An error occurred while
evaluating custo m action attribute "items" with value
"${pageContext.servletContext.EXPENSE_TYPE
S}": Unable to find a value for "EXPENSE_TYPES" in object of class
"org.apache.c atalina.core.ApplicationContextFacade" using operator
"." (null)
        at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(Inser

i am running my code on JBoss 3.2.5....can anyone tell me where is the problem?

thanx in advance and regards
  marco

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message