You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Phillip Rhodes <rh...@yahoo.com> on 2002/02/13 02:43:42 UTC

RE: "complete" jsp displays turbine-generated header/footer probl em

Thank you for the good answer.  I appreciate it.  I would have been in 
trouble if I didn't have a workaround.

My workaround is to use the struts template tag with the Turbine JspLayout 
layout manager.

I do not use anything but the screen template, and that's a struts 
template, where I set my header,footer etc.

Turbine is cool that I can do this.



At 03:13 PM 2/11/2002 -0700, you wrote:
>I believe the header/footer issue is a side effect of using DefaultLayout. I
>am currently working with a slightly modified version of Turbine 2.1, so
>this may or may not work for you, but it is worth a try.
>
>1. Create a new screen class that extends the Turbine JspScreen class and
>overrides the getLayout() method so that it always returns null. This forces
>Turbine to skip layout processing and simply process JSP pages as "complete"
>screens. See the following example:
>
>package com.planetcad.iee.turbine.screens;
>
>import org.apache.turbine.util.RunData;
>import org.apache.turbine.modules.screens.BaseJspScreen;
>
>public class CompleteJspScreen extends BaseJspScreen
>{
>     public String getLayout(RunData data)
>     {
>         return null;
>     }
>}
>
>2. Refer to your custom screen class in the TR.properties file:
>
>   module.packages=com.planetcad.iee.turbine
>   services.JspService.default.layout = CompleteJspScreen
>
>
>Let me know if this works.
>
>Kevin
>
> > -----Original Message-----
> > From: Phillip Rhodes [mailto:rhodespc@yahoo.com]
> > Sent: Friday, February 08, 2002 8:57 PM
> > To: turbine-user@jakarta.apache.org
> > Subject: "complete" jsp displays turbine-generated
> > header/footer problem
> >
> >
> > Hi.
> > In the jsp how-to, it reads:
> > <<
> > If you want to use "complete" JSP pages (rather than using
> > Turbine's model
> > of having separate files for the navigation components,
> > etc.), then you
> > must set the JspService.default.layout entry so that
> > DefaultLayout is used:
> >  >>
> >
> > I want to use the complete JSP Page model.  Thus, I have the
> > following in
> > my file:
> > #services.JspService.default.layout = JspLayout
> > services.JspService.default.layout = DefaultLayout
> >
> > When I execute my application.  My screens are displayed (from
> > /templates/app/screens) fine.  But there is a header and footer being
> > generated from turbine.
> > The header/footer reads:  Turbine - A Servlet Framework for
> > building Secure
> > Dynamic Websites.
> >
> > Why is this header/footer being generated.  I think
> > "complete" JSP should
> > be just that, complete with their own header and footers.
> > Can you tell me
> > how I can get rid of this?
> >
> > Thanks everyone,
> > Phillip
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "complete" jsp displays turbine-generated header/footer probl em

Posted by Phillip Rhodes <rh...@yahoo.com>.
Will do.

At 09:42 PM 2/12/2002 -0700, you wrote:
>On Tuesday, February 12, 2002, at 06:43  PM, Phillip Rhodes wrote:
>
>>My workaround is to use the struts template tag with the Turbine 
>>JspLayout layout manager.
>>
>>I do not use anything but the screen template, and that's a struts 
>>template, where I set my header,footer etc.
>
>Would you mind posting more details about your setup.
>There have been question in the past asking about how
>to do it.  If you'll give the details, I can format
>it as an xdoc so it can be added to the web site.
>Think of it as a HOWTO use Struts and Turbine
>together.
>
>Thanks.
>-Eric
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "complete" jsp displays turbine-generated header/footer probl em

Posted by Eric Dobbs <er...@dobbse.net>.
On Tuesday, February 12, 2002, at 06:43  PM, Phillip Rhodes wrote:

> My workaround is to use the struts template tag with the Turbine 
> JspLayout layout manager.
>
> I do not use anything but the screen template, and that's a struts 
> template, where I set my header,footer etc.

Would you mind posting more details about your setup.
There have been question in the past asking about how
to do it.  If you'll give the details, I can format
it as an xdoc so it can be added to the web site.
Think of it as a HOWTO use Struts and Turbine
together.

Thanks.
-Eric


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>