Hello,

I am relatively new to JSF and I am stuck on a basic problem. I want a jsp
page to diplay simple read-only tabular data. I just want the index.jsp page
to retrieve data from a bean without going through an action nor to have any
navigation rule associated to it.

I want the jsp to be roughly as follows (using the forEach tag):

[code]

<c:forEach items="${AlbumsAction.myList}" var="item">

<c:out value="${item}"/>

</c:forEach>

[/code]

My bean would be roughly as follows:

[code]

package com.pedrolo.adriana.albums;

public class AlbumsAction {

private List myList;



public List getMyList() {

myList = new ArrayList();

myList.add("toto");

myList.add("titi");

return myList;

}

public void setMyList(List myList) {

this.myList = myList;

}

}

[/code]

In addition I have the following in the DD:

[code]

<managed-bean>

<managed-bean-name>AlbumsAction</managed-bean-name>

<managed-bean-class>com.pedrolo.adriana.albums.AlbumsAction</managed-bean-cl
ass>

<managed-bean-scope>request</managed-bean-scope>

</managed-bean>

[/code]

This does not seem to work. Can anyone help please??

Thanks in advance,

Julien.


Reply via email to