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

Servlets and Beans  RSS feed

 
Amarnath Joshi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just want to know how to pass an Attribute along with its value from servlets to a plain Java class. Im using java beans but it's showing null...So as an alternative im using session to access variables in java class..I know its a wrong way please suggest me the good way to do.
Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet is a Java class just like any other, so there are no magic rules, you just pass parameters to other methods like in any other Java class.
 
Amarnath Joshi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You. For your reply.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!