W3C home > Mailing lists > Public > www-jigsaw@w3.org > May to June 1997

Re: parse all .html as .shtml

From: Joseph M. Futrelle <futrelle@ncsa.uiuc.edu>
Date: Fri, 13 Jun 1997 11:22:10 -0500 (CDT)
Message-Id: <199706131622.LAA25531@pecos.ncsa.uiuc.edu>
To: neil@iphil.net (Neil D. Quiogue)
Cc: www-jigsaw@w3.org

> On Mon, 2 Jun 1997, Joseph M. Futrelle wrote:
> > Use the extensions template editor to delete the template for "html".
> > Re-create it but use the class "w3c.jigsaw.ssi.SSIResource" instead
> > of "w3c.jigsaw.resources.FileResource".
> > 
> > The reason not to do this is that unless every single html document on
> > your server contains SSI commands, the server will do some
> > time-consuming parsing unnecessarily.
> Why not have a name space configuration for handling the different
> document types like text (shtml, html), audio(realaudio),
> application(cgi), etc. instead of changing the resources,
> SSIResource from FileResource?

Well, that's what the extensions template is.

FileResource only implements the behavior of reading a file and
sending it to the client, unaltered, in the entity body of an HTTP
reply. Since executing a CGI script or parsing SSI commands, for
instance, are very different kinds of behavior, they're implemented in
other subclasses of HTTPResource, namely w3c.jigsaw.forms.CgiResource
and w3c.jigsaw.ssi.SSIResource. The template for an extension
specifies the resource class *and* its default attributes.

That way, you can also for instance create different FileResource
templates for different content-types. For instance if you want .doc
files to be sent as application/msword and .jpg files to be sent as
image/jpeg, create FileResource templates for both of them and modify
their content-type attributes appropriately.

Joe Futrelle
Developer, Joule/Jigsaw Java/HTTP
National Center for Supercomputing Applications
(217) 265-0296
Received on Friday, 13 June 1997 12:22:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:31 UTC