To be more exact, JSP's are pre-compiled into a
special servlet source (java files).  The servlets
are compiled into classes.

There exist mechanism for pre-compiling the JSP to classes,
before the first user request is received.

You can find these special servlet .java files in the
tomcat/work/ directory.

There is no rendering mechanism per-say.  In the end,
the JSP/Java files write information using JspWriter
class that subclasses from java.io.Writer.


To me, a JSP is just another view of a Servlet, without
all the ugly print statements.  The reason this is important,
is that you can do all those things that servlets can do, well sort of.

  > -----Original Message-----
  > From: Greg Reddin [mailto:[EMAIL PROTECTED]]
  > Sent: Wednesday, August 29, 2001 2:00 PM
  > Subject: RE: Struts behind the scene
  >
  >
  > Shelly,
  >
  > I'm not sure I fully understand the question, but I'll give it a shot.
  >
  > Struts does not generate anything.  You write the JSP's that Struts
  > uses.  When your JSP pages are invoked the first time, the web container
  > (i.e. Tomcat, etc.) compiles the JSP's and renders them.  That's why it
  > is slow the first time.
  >
  > Hope that helps.
  > > -----Original Message-----
  > > From: [EMAIL PROTECTED] at INTERNET
  > > [mailto:IMCEACCMAIL-struts-user+40jakarta+2Eapache+2Eorg+20at+
  > > 20INTERNET
  > > @alltel.com]
  > > Sent: Wednesday, August 29, 2001 2:27 PM
  > > To: [EMAIL PROTECTED] at INTERNET
  > > Subject: Struts behind the scene
  > >
  > >
  > > Hi,
  > >
  > > Could somebody explain me how struts work behind the scenes. The
  > > particular case being there is template, content and the renderer.
  > >
  > > So does it create precompiled jsps or how does it work coz the very
  > > first time you render a page it's very slow
  > >
  > >
  > >
  > > Shelly
  > >

Reply via email to