aspose file tools*
The moose likes Servlets and the fly likes printing cart contents Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "printing cart contents" Watch "printing cart contents" New topic
Author

printing cart contents

ronald zook
Greenhorn

Joined: Jul 31, 2007
Posts: 11
can someone tell me how to print the contents of a bean?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61196
    
  66

"ron_zook", please check your private messages.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61196
    
  66

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

Joined: Jul 31, 2007
Posts: 11
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

Joined: Dec 11, 2004
Posts: 13410

"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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
ronald zook
Greenhorn

Joined: Jul 31, 2007
Posts: 11
can i get some help now?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61196
    
  66

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

Joined: Jan 10, 2002
Posts: 61196
    
  66

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

Joined: Jul 31, 2007
Posts: 11
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

Joined: Jan 10, 2002
Posts: 61196
    
  66

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

Joined: Jul 31, 2007
Posts: 11
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

Joined: Jul 31, 2007
Posts: 11
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

Joined: Jul 17, 2006
Posts: 387
hi ronald,

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

Herman
ronald zook
Greenhorn

Joined: Jul 31, 2007
Posts: 11
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

Joined: Dec 11, 2004
Posts: 13410

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: printing cart contents