[thelist] How do you build dynamic pages?

Hassan Schroeder hassan at webtuitive.com
Mon May 24 15:08:22 CDT 2004


raditha dissanayake wrote:

>> Uh, that's what servlet containers do -- they compile a JSP into
>> a servlet *once* (unless it's changed, and the Context is marked
>> as reloadable="true") and save it. It's not dynamically generated
>> for each request. So for static pages this is kind of a non-issue.
> 
> I agree on the JSP getting compiled to a servlet part. Howver the 
> servlet is executed each time you request it so what you get is dynamic 
> content and not static content.

If you serve plain ol' static HTML through a servlet container, the
*default servlet* has to open the requested file, read the contents
and get a PrintWriter to output them; if a "static" (no params, DB
access, etc.) JSP has already compiled to its servlet form, it's got
all the content within it in output-ready form already, and can just
call a PrintWriter and go.

So it doesn't seem like it'd be worth a lot of auxiliary scripting
to dump those pages into a static format. IMHO. :-)

YMMV!
-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.




More information about the thelist mailing list