Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi request in servlet

Status
Not open for further replies.

yytan

Programmer
May 8, 2002
113
MY
hi there;
<p>
currently, i am using servlet to do payment and display the customer information after processing.

<p>

in SERVLET doGet() it will do request.getParameters() and gen random session ID. i set all the var to a object called LOG. sometime, they might have > 1 user connect in concurrently. so, i designed to spawn a thread for handling multi request coming in at the same time. i pass this LOG obj when spawning a thread. inside the THREAD will have few method to do the processsing and also getting information from db. after that, i set the final result to replace the LOG object.

<p>

now, how am i suppose to pass the LOG object from THREAD back to the SERVLET? as i need to print the information like ID, name, etc on the servlet page?

<P>

10;
yoke yew
 
Every request to a servlet spawns its own thread - so there is no need to spawn another thread from your servlet. You are just over-complicating matters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top