Hi, I remember reading somwhere the following difference Servelt spawna a new process for each client request while JSP's use single process but multiple threads. Is it true? Given that JSP in turn compiles into a servlet, I am not sure how this can be.
The servlet engine uses a separate Thread for each request to a servlet - as you say, JSP turn into servlets. Servlet engines keep a pool of Threads so they don't have the expense of creating a new one for each request. Bill
Hi William , Thanks for your reply. I still have one doubt (may be foolish one!) How does servlet engine know whether it's a simple servlet or JSP compiled servlet?
I'm not sure what you mean... the servlet engine goes through some naming tricks to direct requests to a JSP to the equivalent compiled servlet, but as a programmer you don't have to worry about it. Bill
Hi Bill, It's very true that as a programmer I need not worry. I was asked in the interview about the difference in JSP and servlet.I answered what we discussed. But when I was counter questioned how can it be different when JSP also compiles into a servlet, I was baffled.
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
a bit of art, as a gift, the permaculture playing cards