You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/09/27 02:26:40 UTC

Hard coding HTML within Catalina...

on 9/26/01 10:44 AM, "remm@apache.org" <re...@apache.org> wrote:

> +        sb.append("<html><head><title>");
> +        sb.append(Globals.SERVER_INFO).append(" - ");
> +        sb.append(sm.getString("errorReportValve.errorReport"));
> +        sb.append("</title>");
> +        sb.append("<STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color
> : white;background-color : #0086b2;}

I find it extremely funny that Catalina has a JSP engine in it yet there is
STILL hard coded HTML in the source code. Let me guess, you don't want a
dependency on JSP...or even better...trying to do this with JSP would be
more effort than it is worth. :-)

Think you guys would accept a patch to have all these HTML pages as Velocity
templates? :-) That way, people could customize these pages however they
wanted to without having to hack source code.

-jon


Re: Hard coding HTML within Catalina...

Posted by Remy Maucherat <rm...@home.com>.
> on 9/26/01 10:44 AM, "remm@apache.org" <re...@apache.org> wrote:
>
> > +        sb.append("<html><head><title>");
> > +        sb.append(Globals.SERVER_INFO).append(" - ");
> > +        sb.append(sm.getString("errorReportValve.errorReport"));
> > +        sb.append("</title>");
> > +        sb.append("<STYLE><!--H1{font-family :
sans-serif,Arial,Tahoma;color
> > : white;background-color : #0086b2;}
>
> I find it extremely funny that Catalina has a JSP engine in it yet there
is
> STILL hard coded HTML in the source code. Let me guess, you don't want a
> dependency on JSP...or even better...trying to do this with JSP would be
> more effort than it is worth. :-)

Have you heard of the error page feature ?
;-)

The Catalina core cannot rely on any particular static resource being
present, so we have to hard code some HTML.

> Think you guys would accept a patch to have all these HTML pages as
Velocity
> templates? :-)

Yeah right. Why not use Cocoon 2 and XSP for the error pages ? ;-)
Note: I'm just kidding, ok, don't even think about it ;-)

> That way, people could customize these pages however they
> wanted to without having to hack source code.

They can do that, using the standard error page feature.

Remy