Thanks for replying,
Sorry for writing
3.The request convert into threads by using method thread in servlet.java as follows:
code:
public Thread(String name) {
init(null, null, name, 0);}
public Thread(ThreadGroup group, String name){
init(group, null, name, 0);}
public Thread(Runnable target, String name) {
init(null, target, name, 0);}
public Thread(ThreadGroup group, Runnable target, String name) {
init(group, target, name, 0);}
public Thread(ThreadGroup group, Runnable target, String name,
long stackSize) {
init(group, target, name, stackSize);}
This code i read in servlet.java.
,
it is Thread.java not servlet.java
Now i want to ask, when we write servlet program, as every java program by default import java.lang.*; then when
The servlet runs as a thread in web container instead of in separate OS process. or hen the no of requests for a servlet rises, no additional instances of the servlet or OS processes are created. Each request is processed concurrently using one Java thread per request.
Then this thread.java which is 1 of in java.lang.*,calls or not?
As William Brogden write
All you have to worry about is making sure your code is "thread-safe."
What is meaning of "thread-safe"?