Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing a bean object to a servlet  RSS feed

 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a form.jsp that has around 15 fields. Now i want to set the values of these fields in a bean and then pass the bean object to a servlet and from there to a java class where these field values will be inserted in a database.
I have used this code to set the bean properties in form.jsp for one of the fields.


and now in the servlet when i try this :



this gives me a NullPointerException.

Can anyone tell me is my approach right and what is the mistake that i am making?

Thanks,
Bitz
[ March 30, 2006: Message edited by: S bitz ]
 
Ajith George
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of giving property=*, try setting each values individually. Try name only first. Then see what happens
 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, i tried that but i'm getting the same result i.e NullPointerException.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!