This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Can someone explain (detailed) how the creation process of Servlets/ JSPs is working when invoked via an URL. What I'm interested in is: - When I call a .jsp page is there a generic servlet that interprets the whole page, prints the static text to system.out and compiles the rest? Does this servlet exist per Webapp, per servlet-engine, per folder - know what I mean?? I would like to know how the whole process is working. Maybe someone can give some insights, that would great? Thanks, Mark
I never bothered to see if it's actually MANDATORY, but in practice, all the implementations I know about convert JSPs to their corresponding servlets. Very greatly simplified (ignoring custom tags and such), items outside the <% %> delimiters are passed verbatim to generated out.print( item outside delimiters ) statements, and items INSIDE the delimiters - which are presumed to be Java code that just gets copied into the generated servlet's source code. After that's done, the generated servlet is compiled and the compiled servlet class is executed. Often the generated servlet source code is then discarded, since it's no longer needed, but usally there's a "keep generated" option so you can debug the JSP more easily. There ARE situations where you have a "master servlet". The most common is where the web app is based on the Model/View/Controller design pattern. Or more precisely, on patterns that have been constructed in emulation of MVC. The original MVC requires more interactivity than HTTP servers can provide. The latest and greatest incarnation of this revised MVC architecture is "Model 2". The Jakarta Struts framework is based on this architecture. You might want to read my quick introduction to Struts at http://www.devx.com/premier/mgznarch/javapro/2002/04apr02/th0402/th0402-1.asp
An IDE is no substitute for an Intelligent Developer.