Hello Marc,

I'm not the best expert in page fragmentation, but I would say it's
impossible because RequestDispatcher.include cannot include anything from
another application, it just dispatch to another (or the same) servlert.

I think what you need requires one of the following:
a. frame
b. portlet


Sorry,

~ Simon

On 11/5/07, nikkomarc <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> My jsp page uses myfaces/tomahawk.  I'd like to import a page header and a
> page footer to my jsp page.  The page header and footer also use
> myfaces/tomahawk.  To research this, I downloaded the
> myfaces-examples-simple.  Then, I copied that application to create a new
> HelloWorldWeb application.  In my HelloWorldWeb application, I
> successfully
> included the page header by referencing page_header.jsp that is part of
> the
> same application.  Including it through jsp:include and c:import both were
> successful.
>
>
>        <f:facet name="header">
>             <f:subview id="header">
>                 <jsp:include  page="/inc/page_header.jsp" />
>             </f:subview>
>         </f:facet>
>
> or
>        <f:facet name="header">
>             <f:subview id="header">
>                 <c:import  context="/HelloWorldWeb"
> url="/inc/page_header.jsp" />
>             </f:subview>
>         </f:facet>
>
> I then, tried to import the same page_header.jsp page from a different web
> application as shown below:
>
>        <f:facet name="header">
>             <f:subview id="header">
>                 <c:import  context="/myfaces-examples-simple"
> url="/inc/page_header.jsp" />
>             </f:subview>
>         </f:facet>
>
> When I try to access that page, I get a FacesContext error:
>
> "Faces context not found. getResponseWriter will fail. Check if the
> FacesServlet has been initialized at all in your web.xml configuration
> fileand if you are accessing your jsf-pages through the correct mapping.
> E.g.: if your FacesServlet is mapped to  *.jsf (with the -element), you
> need
> to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp',
> you'd get this error-message."
>
> How can I import a page header from a different application and contains
> myfaces code to my jsp page?
>
> Thank  you,
>
> Marc
>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-use-jstl-import-to-import-a-page-fragment-from-a-different-application--tf4753529.html#a13592788
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Reply via email to