Mark Degenaar wrote:
>
> Hi Java lovers,
>
> >server.docbase=webpages
> >server.workdir=work
>
> >server.webapp.examples.mapping=/examples
> >server.webapp.examples.docbase=examples
>
> can any of you explain how the above mapping works.  Linking the HTML
> requests to the appropriate html files and class files...  It is
> probably in the spec, which I have been unable to download today due to
> network problems...  :-(

server.docbase=webpages
  The default context (mapped to "/") root directory, containing files to be
  served by the default context (e.g. /index.html) and the Web-inf directory
  for the default context (see below).

server.workdir=work
  The directory used for storing servlets generated from jsp files.

server.webapp.examples.mapping=/examples
  The URI path mapping for a context named "examples", i.e. all requests
  starting with a URI path "/examples" are handled by this context.

server.webapp.examples.docbase=examples
  The root directory for the "examples" context, containing files to be
  served by this context (e.g. /examples/index.html, /examples/jsp/cal/cal1.jsp)
  and the Web-inf directory for this context (see below).

The Web-inf directory holds all configuration files for the context, e.g.
servlets.properties, mappings.properties, etc. It can also contain a
"servlets" directory containing servlet class files available to the context.

So with the default configuration, a request like
http://localhost:8080/examples/jsp/cal/cal1.jsp is handed by the server to
the "examples" context. The "examples" context finds that a servlet named
"jsp" should handle the request (based on the mapping for .jsp extensions
in the examples/Web-inf/mappings.properties file). The "jsp" servlet turns the
cal1.jsp file into a servlet source file (stored in "work" directory),
compiles the source file, and invokes it. The next time the JSP page is
requested, the "jsp" servlet realizes the servlet already exists and invokes
it directly.


--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to