What do you mean "start" here ? load-on-startup will actually load your servlet on to the servlet container when the web application is started . It just avoid the overhead of loading your servlet on its first access.
Joined: Oct 04, 2007
Thanks for your response.Actually i need to run the two servlets and print the "Hello world" from the first servlet and "This is second servlet " from the second servlet. But in the console,The output "Hello world" only printed and second servlet does not prints its output.Is this possible to do? or am i doing wrong?
Ulf Dittmer wrote:
What do sockets have to do with background threads?
My Apologies. Even i am not having clear idea. but if servlet needs to run continously then we can go for ServerSocket right? please Correct me
Joined: Mar 22, 2005
seetharaman venkatasamy wrote:but if servlet needs to run continously then we can go for ServerSocket right?
No. Server sockets, too, have nothing at all to do with running a task continuously. You might want to read the Sun Java Tutorial on network programming to get an idea what sockets are and how they work. But let's not derail this topic by talking about sockets.