RE: WML Generation from JSP broken!!!!

2000-12-18 Thread Miles Sabin

Tom Reilly wrote,
 So here's my proposal:

 JSP 1.2 engines have mime type mappings like so (or something
 like this):

 *.jsp - application/jsp 
 *.jspx - application/jsp-xml

 And documents of type application/jsp and application/jspx (or
 whatever names we decide on) are handled appropriately by 
 default without any special web.xml constructs.

 This will also enable one to author a mime-type based servlet 
 filter that can operate on JSP pages in a standard way.

That sounds good to me ...

One qualification: the current proposal on the table for XML
MIME types is to use a '+xml' suffix (there are various complicated reasons
why '+' is preferable to '-'). See,

  http://www.imc.org/draft-murata-xml

So the XML JSP type ought to be, 'application/jsp+xml'.

Cheers,


Miles

-- 
Miles Sabin   InterX
Internet Systems Architect5/6 Glenthorne Mews
+44 (0)20 8817 4030   London, W6 0LJ, England
[EMAIL PROTECTED] http://www.interx.com/



RE: WML Generation from JSP broken!!!!

2000-12-14 Thread Miles Sabin

Tom Reilly wrote,
 It seems to me there are a couple solutions:

 1) look for jsp:root
 2) use DOCTYPE
 3) based it on file extension

 I don't like 1 because it adds overhead to the translation 
 process, and you have to deal with cases like: %-- jsp:root 
 --%

 I don't like 2 because if your JSP page is generating XML and 
 you want to output a DOCTYPE then you have a collision.

 So that leaves 3 which I like the best.  A good standard default 
 would be "jspx".  Of course most app servers allow this to be 
 customized.  I also like this because then different filters can 
 be assigned to JSP pages written in XML and plain old JSP pages.

Yes and no. I agree that it'd be a mistake to handle this by
inspecting the contents of the document, but I don't think file
extensions are quite the right way to go.

We should do it based on MIME type, and allow servers to use their
existing file extension to MIME type mapping mechanisms to do the
rest.

What is the mime type for an XML-syntax JSP doc?
application/jsp+xml or text/jsp+xml would seem to be the most
likely candidates ... presumably they'd need to be registered.

Cheers,


Miles

-- 
Miles Sabin   InterX
Internet Systems Architect5/6 Glenthorne Mews
+44 (0)20 8817 4030   London, W6 0LJ, England
[EMAIL PROTECTED] http://www.interx.com/



RE: WML Generation from JSP broken!!!!

2000-12-14 Thread Miles Sabin

Nathan Abramson wrote,
 I don't think it should be done through a server's MIME type 
 mapping - that means that someone writing a web app needs to 
 know about the mappings installed on the target server, which 
 makes the web app less portable.

Hmm ... not convinced.

I'd have thought that configuring MIME types essential for the
operation of a JSP engine would be an basic part of the
installation of said engine. If that can't be done there's a
problem with the install mechanism, or the host server (or its 
administrator).

 Another approach is to declare each document's type in the 
 web.xml, or to declare categorization rules in web.xml (e.g., 
 XMLJSP == *.[jspx|jsx]), but that seems much clumsier to me.

Well, this is as near as makes no difference to specifying a MIME 
mapping in web.xml.

 Is there anything wrong with going by extension?  I'll bet 
 that's what a lot of tools are starting to do anyway, so we 
 might as well standardize it...

File extensions aren't more portable than MIME types, quite the 
reverse ... ie. some platforms don't use them at all (albeit a 
very small minority of those platforms which which are Servlet/JSP 
capable). And even where they are used there are issues with case-
sensitivity (ie. .JSP in the file system might be equivalent to 
.jsp on one platform but not on another).

Cheers,


Miles

-- 
Miles Sabin   InterX
Internet Systems Architect5/6 Glenthorne Mews
+44 (0)20 8817 4030   London, W6 0LJ, England
[EMAIL PROTECTED] http://www.interx.com/