Link to home
Start Free TrialLog in
Avatar of prain
prainFlag for United States of America

asked on

Servlet Technical Questions

Ok. Here is the scenario....

I have two buttons on a Browser. Both buttons are attached to the same Servlet.

Say Button1, Button2

Button1 clicked - Set of data is transferred to the doPost(). Data is picked up in the doPost() and saved in a GLOBAL VARIABLE(s)
Now the Screen Referfhes
Button2 is Clicked - a Different set of data is transferred to the doPost(). Data is picked up in the doPost() and saved in a GLOBAL VARIABLE(s)

SO here are the questions...
1. Is the same Servlet instance in the Server-Side Container still exists when the second button is clicked? SO that the data I sent via the first click is NOT LOST when the second is clicked?

2. If a another user opens up a brower in his machine while I am working, and goes to the same program, will BOTH SHARE the
save Servlet instance or a different servert?

Thanks
prain
ASKER CERTIFIED SOLUTION
Avatar of bloodredsun
bloodredsun
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks prain.

As a general guide, if an answer is not comprehensive enough to warrant an A grade feel free to ask for clarification so that the experts can at least try to earn an A grade.
Avatar of prain

ASKER

Ooops. I did not mean to give a B grade. Probably I clicked the wrong button in a haste.
You, I consider as an expert and my guding light in my development here.

Sorry about that!.

More quesitons coming up.!!! :-)
haha, no probs prain :-)

I've been around here too long to be worried about points all that much but to the newer guys it really helps to get them fighting to answer your questions when you get known as a person would gives A grades for quality answers.