jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@voyager.apg.more.net>
Subject Re: [UPDATE] Converting existing taglibs to use new build
Date Wed, 25 Jul 2001 19:59:47 GMT
That is the original problem I was trying to address.  Different browsers
treat *.txt files differently.  Some try to be smart and guess what the
file contents are, then render them.  If we explicetly convert the *.jsp
to *.html, everyone can view the source correctly.

Regards,

Glenn

James Strachan wrote:
> 
> Maybe an even easier mechanism is just to leave the JSP sources as *.txt
> files?
> 
> James
> 
> ----- Original Message -----
> From: "James Strachan" <james_strachan@yahoo.co.uk>
> To: <taglibs-dev@jakarta.apache.org>
> Sent: Wednesday, July 25, 2001 7:55 PM
> Subject: Re: [UPDATE] Converting existing taglibs to use new build
> 
> > Hi Glenn
> >
> > > What we really need to do is turn the JSP into a well formed XML
> document.
> > > This would require that any HTML in the JSP be XHTML.
> >
> > Not quite - we just want the JSP source code to be viewable in a web
> > browser - so we need to encode
> >
> > <html>
> > </html>
> >
> > as
> >
> > &lt;html&gt;
> > &lt;/html&gt;
> >
> > So that in a web browser it looks like the source code...
> >
> > <html>
> > </html>
> >
> >
> > I'd prefer if we can keep all JSP in whatever textual format.
> >
> >
> > > I would prefer if we created some generic ant tasks that we can
> contribute
> > > back to the Ant Project.
> >
> > Though pretty-printing JSP source code as HTML would be nice too ;-)
> >
> >
> > > The replace ant task is too restrictive.  We could
> > > add a nested <header file=""/> and <footer file=""> to the replace
task.
> >
> > That would do all we need to get going. We can do the escaping of &, <, >
> > already, we just need to add a fixed
> >
> > <document>
> > .. the text...
> > </document>
> >
> > header & footer so its XML.
> >
> >
> > > Then perhaps clone the replace task and create a regexp task.  The
> regexp
> > > task could be used to run multiple substitution regular expressions on
> the
> > > source file.  The regular expressions could be used to transform the JSP
> > > page into a valid XML document by using regexp to escape rtexprvalues,
> > > and replace <%@ with jsp:directive. <%! with jsp:declaration <%= with
> > > jsp:expression <%-- with jsp:comment, etc.
> >
> > I'd like this - maybe that could be version 2?
> >
> > We could then use the regexp task to turn (say) <io:request> into <font
> > color="blue">&lt;io:request&gt;</font>
> >
> > then we could color-code the use of custom tags in the source code, so
> users
> > can easily see what is the custom tags parts and whats regular HTML stuff.
> >
> > James
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com

-- 
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

Mime
View raw message