aspose file tools*
The moose likes Servlets and the fly likes Model is not working? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Model is not working?" Watch "Model is not working?" New topic
Author

Model is not working?

Soumya Rout
Ranch Hand

Joined: Aug 06, 2009
Posts: 49

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

Joined: Jan 10, 2002
Posts: 60082
    
  65

imports are meaningless at run time. Are you passing the same instance around?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Soumya Rout
Ranch Hand

Joined: Aug 06, 2009
Posts: 49

nop im not .

Im creating different instaces.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60082
    
  65

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

Joined: Mar 17, 2008
Posts: 23
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Model is not working?
 
Similar Threads
correct me
Design Question - Controllers
how to select using check box
doubt in model design
how to pass data from view to model?