Hello all, I have an app which is using struts 1.3.. I wanted to 'replace' existing struts tag with struts-el tag. So I downloaded struts-el-1.3.0-dev and put it into my jar, (along with struts-taglib-1.3.0-dev)
I have declared taglibs in web.xml, and I wrote a simple page which uses Struts-el inside a logic:tag And, to my surprise, it did't work.... Basically I have an attribute of type collection in my HttpSession, and I was trying to access it from the page using <Logic:present name="${sessionScope.results}"> for doublechecking, I wrote a scriptlet code that was trying to get the 'results' attribute from the session, to see that if it was actually there.. and it was there.... Even the c:forEAch loop that uses JSTL to get that attribute works fine.. for providing as much info as I can, here is my web.xml ****************** WEB.XML (TAGLIBS ONLY) ***************************** <!-- Struts Tag Library Descriptors --> <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib> <!-- Struts-EL Tag Library Descriptors --> <taglib> <taglib-uri>/WEB-INF/struts-bean-el.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean-el.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-html-el.tld</taglib-uri> <taglib-location>/WEB-INF/struts-html-el.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-logic-el.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic-el.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-tiles-el.tld</taglib-uri> <taglib-location>/WEB-INF/struts-tiles-el.tld</taglib-location> </taglib> *************************************************************** and here is my JSP (only relevant part)*************************** <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core' %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-logic-el.tld" prefix="logic"%> <% if(session.getAttribute("results") != null) { java.util.Collection coll = (java.util.Collection)session.getAttribute("RESULTS"); System.out.println("**** in session there are " + coll.size() + " elements!!!"); // this print successfully } %> <TR> <TD colspan="4"><center><logic:present name="${sessionScope.results}">hello</logic:present><c:out value="${statusMsg}"/></center> </TD> </TR> <c:forEach var="entry" items="${sessionScope.results}"> .... // this displays the loop data </c:forEach> *********************************************************** other than that, in my \lib directory I have both struts-taglib-1.3.0-dev and struts-el-1.3.0-dev, and I am running my code on Jboss 3.2.5 anyone could give me some hints on what's wrong? Do you think the fact that I have both struts-taglib and struts-el in my Lib directory could cause problems? Thanks in advance and regards marco --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]