File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 61198
    
  66

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: 61198
    
  66

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?