tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "carnell" <carn...@iabg.de>
Subject Re: Integrating servlet output into JSP
Date Tue, 14 Nov 2000 13:10:23 GMT
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>
<%
    RequestDispatcher.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" <wyn_easton@yahoo.com>
To: <tomcat-user@jakarta.apache.org>
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 <carnell@iabg.de> 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
> wyn_easton@yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Calendar - Get organized for the holidays!
> http://calendar.yahoo.com/
>


Mime
View raw message