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
futrelle@ncsa.uiuc.edu
(217) 265-0296
Received on Friday, 13 June 1997 12:22:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT