Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Model is not working?

 
Soumya Rout
Ranch Hand
Posts: 49
Java Java ME Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have a servlet from that two values given by the are passed to the model class set method.

But when try to retrieve those values in another servlet its not coming .

And i have imported the model class in both the servlets.

Help me

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65542
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
imports are meaningless at run time. Are you passing the same instance around?
 
Soumya Rout
Ranch Hand
Posts: 49
Java Java ME Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nop im not .

Im creating different instaces.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65542
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basic Java: values set in one instance will not be automatically available in another. What are you doing to set the values into the new instance?
 
samir singha
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
creating diffrent instances means you are creating diffrent objects. create a single object, set the value of the object and pass the object to the another servlet.
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!