Results 1 to 1 of 1
Thread: JSTL loop
- 03-29-2011, 06:34 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 57
- Rep Power
- 0
JSTL loop
Hi, I have a web application and users can send each other messages i now want a page where i can display all messages of the user.
I found out that using a JSTL loop is probably the best option but when i use it it keeps just returning the last value in the list of messages. my code is as follows:
messages is my attribute set with request.setAttribute("messages", msg)Java Code:<jsp:useBean id="messagebean" class="model.MessageList" scope="session" > </jsp:useBean> ${messages.messageDetails.from} <c:forEach var="messages" begin="0" end="${messages.numberOfMessages}" step="1"> From ${messages.messageDetails.from}<br> </c:forEach>
where msg is an arrayList of type MessageList i created with a method to add all messages of the user into one list
please help Thankyou :)
Similar Threads
-
JSTL and JSP
By mohinicharankar in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 03-23-2011, 07:26 AM -
Need help in JSTL <c:set>
By raghavanjm in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 05-24-2010, 02:35 PM -
Jstl
By prakashkadakol in forum New To JavaReplies: 10Last Post: 01-13-2010, 07:17 PM -
Why are we using JSTL in jsp?
By makpandian in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 06-30-2009, 10:15 PM -
jstl in jsp
By nagaprasanna in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 11-18-2008, 08:18 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks