Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes Display of Data on Jsp, alternate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Display of Data on Jsp, alternate" Watch "Display of Data on Jsp, alternate" New topic
Author

Display of Data on Jsp, alternate

fahad siddiqui
Ranch Hand

Joined: Jun 14, 2006
Posts: 85
I have some data i want to display on JSP. Standard method would be populate some beans, set beans in arraylist and send arraylist in request and fetch on JSP and display.

What other methods can be used to display data?
Please advise.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

There is no need for an array list. Why do you feel that the beans need to be added to a list before begin "sent" to the JSP?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
fahad siddiqui
Ranch Hand

Joined: Jun 14, 2006
Posts: 85
Ok, so the arraylist can be eliminated. But any other patterns which could be used?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

Why is there a need for other patterns? Any data that needs to be passed from the page controller (servlet) to its JSP should be added to the request as scoped vairables (using request.setAttribute()).

If the data needs to persist across multiple request, place it in session scope.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display of Data on Jsp, alternate