Trust me Craig..I'll stick to the standards!! :) No rolling my own compiler
here.
> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 02, 2001 2:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Servlets v. JSP
>
>
> "Duffey, Kevin" wrote:
>
> >
> > > As above, it is not forced. In fact, you as a page developer
> > > have the right to
> > > tell the JSP compiler to use your own base class, instead of
> > > its own, if you want
> > > to:
> > >
> > > <%@ page ... extends="com.mycompany.MyJspBaseClass" ... %>
> > >
> > > However, you are explicitly warned that this is likely to
> > > make performance *worse*,
> > > because the page compiler has to give up all the
> > > optimizations built in to the base
> > > class it knows about, and write extra code in the generated
> > > servlet to make sure
> > > your page obeys all of the rules of the spec.
> >
> > True, but if I wanted to make my own servlet from JSP, I could
> > "theoretically" do this. I mean..if I mapped *.jsp to my
> own servlet and
> > even if I didn't follow the spec by implementing the jsp
> interface, I could
> > actually make .jsp go to my servlet which I could then
> convert to my own
> > servlet class.
>
> You certainly could. But my primary contention remains --
> doing all this work
> *solely* to avoid extending a base class would not improve
> performance, so why
> bother?
>
> > I would have to implement code that checks if a class is
> > already available (time-date, size, etc checks), and use it
> if it exists,
> > otherwise convert the jsp into a servlet. This would not
> conform to the
> > spec, but I believe it might be possible to optimize a jsp
> page even more
> > so. Ofcourse, handling tag-libs, jsp syntax, and so on
> would be a pain in
> > the butt to implement just for a possible (not even
> guaranteed) improvement
> > in speed. I am contradicting what I said before..but when I
> re-read what I
> > wrote, I realize I wasn't exactly thinking about what I said. :)
> >
>
> If you are willing to go to all the effort to "roll your own"
> JSP compiler, the
> world would be a better place if you put that effort into
> improving the performance
> of one of the open source JSP implementations -- for example,
> it wouldn't be hard
> at all to improve the code quality that Tomcat's JSP compiler
> (Jasper) generates.
>
> Also, as anyone who has invented their own "template"-type
> language can tell you,
> maintaining such a proprietary language long term can be a
> pretty expensive
> proposition, sometimes costing more developer effort than the
> apps you write on top
> of it! I would encourage you to think carefully before going
> down that road.
>
> Craig
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets