I've just done some testing with the following JSP:
___________________________
<html>
<head>
 <title>TEST  JSP</title>
</head>

<body>
        Tapestry returns this:
  <jsp:include page="/app?page=ProjectOverviewPrint&service=page"/>
    Now some JSP-Stuff ...
</body>

</html>
____________________________________

this works (Tap4, Tomcat 5.5, no friendly url's) - but only to some extent.
Tomcat's Jasper complains about a closed stream after Tapestry is done with
its stuff. Any further output of the JSP is abandoned. That means You never
see the "Now some JSP-Stuff" from the example above. So, Tomcat at least
seems to take some shortcut when doing an include, obviously just passing on
the request/response objects ...

Btw, one gets rather nasty html, since Tapestry renders a full page
(<html><head> ....) within the JSP-Output, resulting in
<html><head></head><body><html> and so on.

I think I'll go with <iframe> in my project ...

Marcus

> -----Original Message-----
> From: Inge Solvoll [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 27, 2006 3:59 PM
> To: Tapestry users
> Subject: Re: Including tapestry page with jsp:include doesn't work
> 
> 
> I'm sorry to keep asking this question, but this problem is 
> very critical
> for my project right now, so I really could use some input on why the
> jsp:include mechanism makes tapestry requests go to the home-service,
> instead of the requested page.
> 
> I hope someone can bring some ideas or personal experience 
> here, this is the
> last time I spam the list with this question. Thanks!
> 
> Inge
> 
> On 1/27/06, Inge Solvoll <[EMAIL PROTECTED]> wrote:
> >
> > Yes, that works. That is just like accessing the page in a 
> browser. The
> > problem arises when a tapestry url is included with 
> jsp:include, serverside.
> > It seems that there are problems when tapestry is called 
> from within a
> > struts/servlet request.
> >
> > On 1/26/06, Schulte Marcus <[EMAIL PROTECTED]> wrote:
> > >
> > > Does it work when you use an <iframe 
> src="your/tapestry/url" /> instead
> > > of
> > > the include?
> > > I'd be interested how you solve this, because I'll have 
> to do something
> > > similar these days ;(
> > >
> > > Marcus
> > >
> > > > -----Original Message-----
> > > > From: Inge Solvoll [mailto: [EMAIL PROTECTED]
> > > > Sent: Thursday, January 26, 2006 9:46 AM
> > > > To: Tapestry users
> > > > Subject: Re: Including tapestry page with jsp:include 
> doesn't work
> > > >
> > > >
> > > > Thanks, Mark, all good suggestions.
> > > >
> > > > But I'm pretty sure that all my url's are correct. I have set
> > > > up tapestry 4,
> > > > with friendly urls of this style (/Page.html,
> > > > /Page.external), and it works.
> > > > I've also verified that the tapestry ApplicationServlet is
> > > > called when I use
> > > > the mentioned url with jsp:include, other urls causes 
> the jsp to print
> > > > "unknown resource".
> > > >
> > > > The problem is that the tapestry ApplicationServlet (or some
> > > > other tapestry
> > > > class) calls the wrong service (home, not page). And I'm
> > > > still not able to
> > > > point out where this happens. Big problem, since I want to
> > > > reuse a tapestry
> > > > page I made in other struts-based parts of the system...
> > > >
> > > > Anyway, thanks for the input!
> > > >
> > > > Inge
> > > >
> > > > On 1/25/06, Mark Stang <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Inge,
> > > > > I noticed you have:
> > > > >
> > > > > <jsp:includepage="/MyPage.external?sp=l1&sp=l2"/>
> > > > >
> > > > > It seems that there should be a /app/ in there.  I don't
> > > > believe your
> > > > > tapestry servlet and your jsp servlet are one.  In your
> > > > web.xml I thin you
> > > > > have specified
> > > > >
> > > > >      22     <servlet-mapping>
> > > > >      23         <servlet-name>HuronPeak</servlet-name>
> > > > >      24         <url-pattern>/app</url-pattern>
> > > > >      25     </servlet-mapping>
> > > > >
> > > > > My URL's are of the form:
> > > > >
> > > > >
> > > > >
> > > > https://localhost:9031/pingfederate3/app?service=direct/1/Home
> > > 
> /Holder/portalMenu.editSpLink&sp=Spingfederate3%3Adefault%3AentityId
> > > > >
> > > > > And if I want to reference a particular page:
> > > > >
> > > > > https://localhost:9031/pingfederate3/app?service=page/Testing
> > > > >
> > > > > Just a thought...
> > > > >
> > > > > regards,
> > > > >
> > > > > Mark
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Inge Solvoll [mailto:[EMAIL PROTECTED]
> > > > > Sent: Wed 1/25/2006 10:35 AM
> > > > > To: Tapestry users
> > > > > Subject: Re: Including tapestry page with jsp:include 
> doesn't work
> > > > >
> > > > > Not sure if I know excactly what you mean, but it's 
> all in the same
> > > > > context,
> > > > > meaning that the JSP is in the same web application as my
> > > > tapestry pages.
> > > > >
> > > > > I've tried stepping through this with the eclipse debugger
> > > > to try to see
> > > > > where the tapestry ApplicationServlet or other Tapestry
> > > > classes decide to
> > > > > call the Home service on jsp include, even though the
> > > > request is for the
> > > > > external or page service. No luck so far, I don't really
> > > > know where to
> > > > > look,
> > > > > it's a big system...
> > > > >
> > > > > Once again, all tapestry features has been proven to 
> work on regular
> > > > > requests.
> > > > >
> > > > > On 1/25/06, Mark Stang < [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Inge,
> > > > > > Are they both off of the same context?
> > > > > >
> > > > > > hth,
> > > > > >
> > > > > > Mark
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Inge Solvoll [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Wed 1/25/2006 7:28 AM
> > > > > > To: Tapestry users
> > > > > > Subject: Re: Including tapestry page with 
> jsp:include doesn't work
> > > > > >
> > > > > > Same result with <c:import url="sameUrl"/> and <tiles:insert
> > > > > > page="sameUrl"/> by the way. They all probably use the
> > > > same mechanism
> > > > > for
> > > > > > including content.
> > > > > >
> > > > > > Maybe tapestry depends on some kind of request
> > > > information that isn't
> > > > > > there
> > > > > > when the webserver performs an include like this?
> > > > > >
> > > > > > On 1/25/06, Inge Solvoll < [EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > I have the following problem:
> > > > > > >
> > > > > > > Old parts of my application is implemented in struts,
> > > > while new parts
> > > > > > are
> > > > > > > implemented in tapestry. This causes a need for 
> quite a few
> > > > > integration
> > > > > > > points, which have been no problem so far.
> > > > > > >
> > > > > > > Now I need to include a tapestry page from a jsp, or
> > > > get the html
> > > > > > response
> > > > > > > of a tapestry page and deliver it to my jsp in some
> > > > way. It works to
> > > > > > > include struts actions (/path/to/MyAction.do) via the tag
> > > > > > <jsp:includepage="/path/to/MyAction.do"/>. But when I try
> > > > to do the same
> > > > > > thing with
> > > > > > > tapestry pages like this
> > > > > > (<jsp:includepage="/MyPage.external?sp=l1&sp=l2"/>),
> > > > tapestry dispatches
> > > > > the
> > > > > > request to
> > > > > > > the tapestry home service.
> > > > > > >
> > > > > > > I don't see why this doesn't work, both struts (*.do)
> > > > and tapestry
> > > > > > > (*.html, *.external...) are servlets, that should 
> be equally
> > > > > > "insertable" in
> > > > > > > a JSP. Or?
> > > > > > >
> > > > > > > More info:
> > > > > > > - The url I'm trying to include via jsp works when
> > > > accessing it the
> > > > > > > regular way, through a browser
> > > > > > > - Any tapestry extension causes the same behaviour
> > > > (.external, .html)
> > > > > > >
> > > > > > >
> > > > > > > Inge
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > >
> > >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to