There's nothing special about how objects work in servlets, they work exactly the same way that they work in Java code in general.
By the way I found your post hard to read so I gave up on trying to do that. There's a Code button at the top of the box where you post, and if you use that then your code can be formatted like code. That in turn means you don't need to make everything else bold. So if you could edit your post and do that, I'm sure people would be more likely to pay better attention to it.
If you want people to read your posts, you need to make them readable. Use bold sparingly. All bold is as hard to read as all-caps, which should also be avoided. And use code tags for code; read this for more information.
You can go back and change your post to add code tags and remove the bold by clicking the button on your post.