• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Passing a list of beans to jsp

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
could someone tell me what the best way is for passing a list of objects (beans) to a jsp page? It's not working for me

My servlet code



The out.println is just to prove that the information is getting passed to the servlet from my dataAccess page that talks to the server, but when I try using the request dispatcher and request.setattribute stuff, it gives me a blank page...

Here is what is happening on my jsp page I'm trying to send this list of objects to



 
author & internet detective
Posts: 40793
828
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
${grpCrt.getFolderRef} would call a method named getGetFolderRef() on grpCrt. This isn't what you want. ${grpCrt.folderRef} is better. Also, using the same name for the list and item in the list is confusing. (and I'm not sure if it works.) I recommend a different name.

 
Jesse Snadden
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:${grpCrt.getFolderRef} would call a method named getGetFolderRef() on grpCrt. This isn't what you want. ${grpCrt.folderRef} is better. Also, using the same name for the list and item in the list is confusing. (and I'm not sure if it works.) I recommend a different name.



thanks... ok this works and gives me the first line... now how do I iterate through them all?

 
Jesse Snadden
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tried this and get nothing in my table



I'm missing something...
 
Jesse Snadden
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ha... turns out my problem was that I didn't have the jstl jar files in my tomcat 6.0.18 lib directory... geeeeez...

Thanks for the help anyhow.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic