Hi, Since yesterday, I'm still stuck on the following problem: I can't list the items contained in a session's attribute of type Vector: Always the same following error is thrown: Line 236, column 59: variable i not found in class org.apache.cocoon.www.mount.essai.session3_xsp
Below is my code: <?xml version="1.0"?> <xsp:page xmlns:xsp="http://apache.org/xsp" xmlns:xsp-session="http://apache.org/xsp/session/2.0" xmlns:xsp-request="http://apache.org/xsp/request/2.0" create-session="true"> <xsp:structure> <xsp:include>java.util.Vector</xsp:include> </xsp:structure> <content> <xsp:logic> Vector items = (Vector)<xsp-session:get-attribute name="cart.items"/>; if (items == null) items = new Vector(10,5); items.add(<xsp-request:get-parameter name="item"/>); session.setAttribute("cart.items",items); **** the snippet below works fine ********* if (!<xsp-session:is-new/>) { <ul> <b>The list of items is:</b> <xsp-session:get-attribute name="cart.items" default="not set"/> </ul> } *** the snippet below doesn't work :-(( ***** if (!<xsp-session:is-new/>) { <ul> for (int i = 0; i < items.size(); i++) { <li><xsp:expr>items.get(i)</xsp:expr></li> } </ul> } </xsp:logic> </content> </xsp:page> SOmeone one can help me, please? Regards, Cyril. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>