I'm trying to decouple the existing dependencies to the abstract jspPage I
don't want to create more by inheriting from it.

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Andy Schmidt
> Sent: Monday, September 11, 2000 8:51 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Getting at the jspPage in a form's action servlet?
>
>
> Here is what you can do.  Inherit your 'action servlet' from the
> HttpJspPage in
> question ( or vise versa), and then inherit your JSP page from
> that.  Post your
> forms to 'self' (the default).  You will have to add some logic
> to your service()
> method, or your doPost() etc. whichever you are using so that it
> knows when to
> simply load the page, by calling the 'jspService()' method, and
> when to process the
> form.
>
> Robert Nicholson wrote:
>
> > I'm interested in a response to the question so I'll ask the
> question again.
> >
> > The site I'm at has factored a lot of useful functionality into a
> > HttpJspPage superclass and makes use of "extends" on all jsp pages.
> >
> > What I want do know is that since I'm developing my stuff so
> that I'm using
> > servlets to do most of the processing of forms etc I want to
> know the best
> > way of getting at the instance of the page because I need to
> call instance
> > methods on it. Things like getting a database connection, doing common
> > database queries etc, logging to custom log files are all
> instance methods
> > of the page.
> >
> > Other than by putting it into the users session. How after I've
> submitted my
> > input for a form can I get at the jsp page's instance from within the
> > servlet that's processing the form's data?
> >
> > If anybody is out there. Don't do this ... it makes it very
> hard to reuse
> > this functionality elsewhere.
> >
> > Cheers.
> >
> > > -----Original Message-----
> > > From: A mailing list about Java Server Pages specification
> and reference
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Nicholson Robert
> > > Sent: Friday, September 08, 2000 3:32 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Getting at the jspPage in a form's action servlet?
> > >
> > >
> > > OK so the site I'm at has put a tonne of functionality in an ancestor
> > > HttpJspPage superclass and I need to get at this from within a servlet
> > > that's an action from the form.
> > >
> > > can I just slap this into the request before I submit my form?
> > >
> > > There doesn't appear to be any way way to get at the JspPage
> other than
> > > passing it through as a request parameter.
> > >
> > > ==================================================================
> > > =========
> > > 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

Reply via email to