Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

printing cart contents

 
ronald zook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can someone tell me how to print the contents of a bean?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ron_zook", please check your private messages.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get any type of substantive response, you'll need to provide a lot more detail than that. Please read this for more information.
 
ronald zook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
o im sorry for not being clear earlier. well i have a servlet cartDetails that gets a cartid from the DB and stores it in a customer bean. i also have a jsp page that is supposed to call this servlet. when i add stuff to the cart it does that successfully because i checked the DataBase but when i click on show cart i dont see the items that were added
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ron_zook",
At this point, it's very important that you check your private messages and follow the instructions within.
Once that's set, we'll be happy to discuss your question.
 
ronald zook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i get some help now?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ronald zook:
can i get some help now?

A word of advice: leaving attitude at the door works best when tryng to get people to volunteer their time to help you.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ron_zook:
but when i click on show cart i dont see the items that were added

So when you say "print" you mean to display on-screen rather than on a piece of paper?
 
ronald zook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i apologize if my response came accross in the wrong way. i wasnt trying to be arrogant in any way. well right now im getting the following error when i click on the shoppin cart link

Error: Cannot find any information on property 'TableData' in a bean of type 'bean'
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're not giving us much to go on.

First, I ask again, by "print" you mean display on-screen, right? Usually "print" means to send to a printer.

Secondly, how are you declaring and accessing the bean? Does it have properly formed bean accessors? Such as getTableData()?

If so, the property name would be "tableData".
[ November 14, 2007: Message edited by: Bear Bibeault ]
 
ronald zook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
o im sorry. by print i mean send to the browser i.e display on screen. i have the proper gets and sets in the bean. why should the property name be lower case?
 
ronald zook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the property name in the jsp is tableData but im still getting this error

Cannot find any information on property 'TableData' in a bean of type 'bean'
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ronald,

why don't you post relevant parts of your code (.jsp and bean)

Herman
 
ronald zook
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's the bean class

here's the jsp

here's the servlet that the jsp call. the one that has the cart info


thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cannot find any information on property 'TableData' in a bean of type 'bean'


This looks fishy.
Your useBean declaration looks OK but it's trying to cast your customer to an object of type "bean".

Have you restarted this app since the last time you recompiled your classes?
Also, are you sure that the latest version of your JSP is being used?
What container are you using?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic