Well, nobody else has jumped in to tell us which method will be called,
so, try putting the print statements in the servlets init() and
service() methods.  Maybe that will give us something to go on.

--- carnell <[EMAIL PROTECTED]> wrote:
> I have been using doGet()!. So I make myself a doPost, and add in
> some
> System.err.println,
> and neither doGet or doPost is being called. :(
> 
> Craig.
> 
> ----- Original Message -----
> From: "Wyn Easton" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "C S Carnell" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 14, 2000 5:15 PM
> Subject: Re: Integrating servlet output into JSP
> 
> 
> > Hmm...
> > I know that if I'm in the doPost() of a servlet and I include()
> another
> > servlet the included servlet's doPost() method will be called.
> > I'm not sure which method in the servlet is called when you do the
> > include from a JSP to a servlet.
> > Maybe you could put a System.out.println() in the doGet() and
> > doPost() of the included servlet to see which method is being
> called.
> > (Or maybe someone else already knows...)
> >
> > --- carnell <[EMAIL PROTECTED]> wrote:
> > > Thanks, I've tried the code,  the JSP produces my layout/menus
> and
> > > stuff,
> > > but theres no output from the servlet.
> > >
> > > getRequestDispatcher appears to work correctly as rd is not null,
> but
> > > nothing seems to be included. I have tried
> > > both the bookholidayshow, and /servlet/bookholidayshow. The
> servlet
> > > works
> > > fine when entered
> > > into the browser.(although missing html/end html tags etc, IE
> doesn't
> > > care
> > > :)
> > >
> > > ----- Original Message -----
> > > From: "Wyn Easton" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, November 14, 2000 2:55 PM
> > > Subject: Re: Integrating servlet output into JSP
> > >
> > >
> > > > See code added below.
> > > >
> > > > --- carnell <[EMAIL PROTECTED]> wrote:
> > > > > If in my JSP page, say bookholiday.jsp, I would like to
> include
> > > > > output from
> > > > > bookholidayshow servlet...
> > > > >
> > > > > bookholiday.jsp:
> > > > > <html>
> > > > > <include body/various menus and stuff>
> > > > > <%
> > > >  RequestDispather rd =
> > > request.getRequestDispatcher("bookholidayshow");
> > > >  if (rd != null)
> > > >      rd.include(request, resource);
> > > > > %>
> > > > > </body>
> > > > > </html>
> > > > >
> > > > > bookholidayshow.java(class/servlet)
> > > > > doGet(...)
> > > > > {
> > > > >     out.println... etc..
> > > > > }
> > > > >
> > > > > But how do I use RequestDispatcher in the JSP? Can't make
> much
> > > sense
> > > > > of the
> > > > > docs.
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Wyn Easton" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Tuesday, November 14, 2000 12:38 PM
> > > > > Subject: Re: Integrating servlet output into JSP
> > > > >
> > > > >
> > > > > > This may be over simplifying your problem, but have you
> looked
> > > > > > at the RequestDispather include() method?
> > > > > > It allows you to use the output of another servlet/JSP in
> the
> > > > > current
> > > > > > servlet/JSP.
> > > > > >
> > > > > > --- carnell <[EMAIL PROTECTED]> wrote:
> > > > > > > I am currently migrating two projects that we have, both
> in
> > > > > Servlets
> > > > > > > into
> > > > > > > JSP.
> > > > > > >
> > > > > > > Rather than rewriting everything into Model 2/with JSP
> > > > > architecture,
> > > > > > > is it
> > > > > > > possible for me to write a JSP page that includes the
> output
> > > of
> > > > > the
> > > > > > > Servlet(which make use of out.println a lot etc). I could
> > > simply
> > > > > > > remove the
> > > > > > > outs in the Servlet which generate the html/body/end
> body/end
> > > > > html
> > > > > > > HTML
> > > > > > > tags.?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Craig.
> > > > > > >
> > > > > >
> > > > > >
> > > > > > =====
> > > > > > Wyn Easton
> > > > > > [EMAIL PROTECTED]
> > > > > >
> > > > > > __________________________________________________
> > > > > > Do You Yahoo!?
> > > > > > Yahoo! Calendar - Get organized for the holidays!
> > > > > > http://calendar.yahoo.com/
> > > > > >
> > > > >
> > > >
> > > >
> > > > =====
> > > > Wyn Easton
> > > > [EMAIL PROTECTED]
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > Yahoo! Calendar - Get organized for the holidays!
> > > > http://calendar.yahoo.com/
> > >
> >
> >
> > =====
> > Wyn Easton
> > [EMAIL PROTECTED]
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Calendar - Get organized for the holidays!
> > http://calendar.yahoo.com/
> 


=====
Wyn Easton
[EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/

Reply via email to