File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Doubt in request.setAttribute ( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Doubt in request.setAttribute ("ListBean", userList); " Watch "Doubt in request.setAttribute ("ListBean", userList); " New topic
Author

Doubt in request.setAttribute ("ListBean", userList);

manjula pranathi
Greenhorn

Joined: Jun 04, 2007
Posts: 5
Here userList(ArrayList) contains some 5000 elements and I am trying to use request.setAttribute("ListBean", userList); to display userList in JSP page.

will this work fine?
is there any disadvantage of using request.setAttribute?

please help me...
Ro Dowd
Greenhorn

Joined: Jul 10, 2006
Posts: 22
Using request.setAttribute ensures that the userList object is stored in request scope (i.e. will be visible in the JSP for example that the action forwards to). I would recommend using the source forge "display tag" to render the list on the jsp (http://displaytag.sourceforge.net/11/). this will automatically paginate your data, you can customise its look and feel also. it's very easy to use

you should never really be displaying excessive information on a jsp anyways, give the user a search facility to narrow it down or use display tag.

hope this helps - Ro.
manjula pranathi
Greenhorn

Joined: Jun 04, 2007
Posts: 5
Thank you very much Ro...

ok I will try to use display tag...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in request.setAttribute ("ListBean", userList);