HI,
I would say the only advantage I see to using a JSP page is that every time
you change it, the JSP page is recompiled for you by the server, whereas in
code, you have to restart the server usually to get it to reload the new
code. Other than that, I would rather use code. You can jar up code,
etc..but JSP pages are edited as JSP pages and converted to .class (and
.java), so to me, for maintainability, I would rather put it in code. But I
can see the advantage of JSP if you want to move it up to a production site
without restarting the production site.
> -----Original Message-----
> From: Robert Nicholson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 12, 2000 2:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Model 2, replacing servlet with an "all-code" JSP?
>
>
> I'll tell you a story.. I have to use this approach now as
> the site I'm at
> put all of their business logic or most of it into an
> abstract HttpJspPage
> subclass. Actually to top if off it's a subclass of Oracle's
> HttpJspPage and
> it's service method which I wanted to override in my servlet
> as a subclass
> of this class is defined as final and the class by definition
> has to be
> declared abstract so I cannot just create an instance helper
> in my servlet
> and use the existing functionality. so for now i've created a
> "controller"
> JSP who simply handles logic. Given the time constraints this
> project is
> under there's no time to go back to refactor things where
> they should be. So
> far the code in the JSP file is still maintainable but I
> dislike having to
> use a JSP where a servlet is much more appropriate.
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification
> and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Madigan, Brian
> > Sent: Monday, September 11, 2000 9:30 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Model 2, replacing servlet with an "all-code" JSP?
> >
> >
> > An 'all code' JSP sounds kind of backwards -- why define
> objects in a
> > servlet? I wouldn't define Objects or methods in a jsp when
> a class can be
> > defined to contain them. Even smaller systems benefit from
> this design.
> >
> > -----Original Message-----
> > From: JavierG [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 11, 2000 10:08 AM
> > To: [EMAIL PROTECTED]
> > Subject: Model 2, replacing servlet with an "all-code" JSP?
> >
> >
> > Hi out there:
> >
> > When using Model 2, can't I replace the servlet used as
> controller for an
> > "all-code" JSP, that is, a JSP that begins with <% and ends
> with %> and no
> > HTML or out statements whatsoever? My point is that coding that
> > way could be
> > easier and faster (much less typing) being as they are a
> lot of objects
> > predefined and the main parts of the servlet to whish the JSP is
> > translated
> > being automatically generated by the JSP engine. Any
> drawbacks to this
> > approach? Any comments, ideas, critics, etc, would be greatly
> > appreciated...
> >
> > J.
> >
> > ==================================================================
> > =========
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > 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".
> > 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".
> 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".
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