In that case, you can use a jsp:include

-R

On Mon, Sep 14, 2009 at 10:03 PM, Durin Dal <[email protected]> wrote:
>
> The files aren't simple HTML --- they're JSP files with JSF components in
> them.  I'm trying to use some of the Trinidad tagging in those pages as well
> and/or instead of the JSF core and HTML ones, which seemed like a reasonable
> possibility based on my reading of the documentation. :-T
>
>
>
>> -----Original Message-----
>> From: Richard Yee [mailto:[email protected]]
>> Sent: Tuesday, September 15, 2009 12:51 AM
>> To: MyFaces Discussion
>> Subject: Re: Content rendered outside of body tags when using Apache
>> Trinidad 1.0.11
>>
>> Can you read in the files, store them in a backing bean, and then
>> reference them with  the value attribute in tr:outputText?
>>
>>
>> -R
>>
>> On Mon, Sep 14, 2009 at 9:38 PM, Durin Dal <[email protected]>
>> wrote:
>> > Not an option on this project... but I will take another look at
>> that.
>> >
>> >> -----Original Message-----
>> >> From: Richard Yee [mailto:[email protected]]
>> >> Sent: Tuesday, September 15, 2009 12:19 AM
>> >> To: MyFaces Discussion
>> >> Subject: Re: Content rendered outside of body tags when using Apache
>> >> Trinidad 1.0.11
>> >>
>> >> Sounds like you need to use Facelets. You can mix HTML and JSF tags
>> >> with them. They are similar to Tiles but better.
>> >>
>> >> -R
>> >>
>> >> On Mon, Sep 14, 2009 at 8:58 PM, Durin Dal <[email protected]>
>> >> wrote:
>> >> > My bad... I wrapped it in the tags instead of using the value
>> >> attribute,
>> >> > which does work --- thanks.
>> >> >
>> >> > Unfortunately, I have much larger JSF pages with a lot of HTML ---
>> >> this was
>> >> > a small example --- and using this method would not do me any good
>> >> with
>> >> > those. :-(
>> >> >
>> >> >
>> >> >> -----Original Message-----
>> >> >> From: Richard Yee [mailto:[email protected]]
>> >> >> Sent: Monday, September 14, 2009 5:42 PM
>> >> >> To: MyFaces Discussion
>> >> >> Subject: Re: Content rendered outside of body tags when using
>> Apache
>> >> >> Trinidad 1.0.11
>> >> >>
>> >> >> What did you try that doesn't work? Did you set escape="false"?
>> >> >> This works for me: <tr:outputText escape="false" value="<p>Hello
>> >> >> World!</p>"/>
>> >> >>
>> >> >> On Mon, Sep 14, 2009 at 11:41 AM, Durin Dal
>> <[email protected]>
>> >> >> wrote:
>> >> >> >
>> >> >> > That does not work either, I'm afraid. :-(
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >> -----Original Message-----
>> >> >> >> From: Richard Yee [mailto:[email protected]]
>> >> >> >> Sent: Monday, September 14, 2009 1:17 PM
>> >> >> >> To: MyFaces Discussion
>> >> >> >> Subject: Re: Content rendered outside of body tags when using
>> >> Apache
>> >> >> >> Trinidad 1.0.11
>> >> >> >>
>> >> >> >> You need to output content like that with a tr:outputText tag.
>> I
>> >> >> think
>> >> >> >> it is a problem with the JSF 1.0 spec. Otherwise, use Facelets
>> >> >> instead
>> >> >> >> of JSP
>> >> >> >>
>> >> >> >> -Richard
>> >> >> >>
>> >> >> >>
>> >> >> >> On Sun, Sep 13, 2009 at 10:56 PM, Durin Dal
>> >> <[email protected]>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> > I'm having some issues with content being rendered with a
>> JSF
>> >> >> page.
>> >> >> >>  The JSF
>> >> >> >> > page looks fine without using Trinidad, but when I use the
>> >> >> >> tr:document tags,
>> >> >> >> > something goes awry.
>> >> >> >> >
>> >> >> >> > I've set up a simple page like so
>> >> >> >> >
>> >> >> >> > <%@ page contentType="text/html;charset=windows-1252"%>
>> >> >> >> > <%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
>> >> >> >> > <%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
>> >> >> >> > <%@ taglib uri="http://myfaces.apache.org/trinidad";
>> >> prefix="tr"%>
>> >> >> >> > <%@ taglib uri="http://myfaces.apache.org/trinidad/html";
>> >> >> >> prefix="trh"%>
>> >> >> >> >  <f:view>
>> >> >> >> >   <tr:document title="Empty Trinidad Test Page">
>> >> >> >> >    <tr:form>
>> >> >> >> >      <p> Content goes here! </p>
>> >> >> >> >    </tr:form>
>> >> >> >> >   </tr:document>
>> >> >> >> >  </f:view>
>> >> >> >> >
>> >> >> >> > That, upon being requested, has its source code looking like
>> >> the
>> >> >> >> following:
>> >> >> >> >
>> >> >> >> >      <p>Content goes here!</p>
>> >> >> >> >
>> >> >> >> >   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
>> >> Transitional//EN"
>> >> >> >> > "http://www.w3.org/TR/html4/loose.dtd";><html dir="ltr"
>> >> >> >> > lang="en-US"><head><title>Empty Trinidad Test
>> Page</title><meta
>> >> >> >> > name="generator" content="Apache MyFaces Trinidad"><link
>> >> >> >> rel="stylesheet"
>> >> >> >> > charset="UTF-8" type="text/css"
>> >> >> >> > href="/TPMS-TPMS-context-root/adf/styles/cache/minimal-
>> desktop-
>> >> >> >> v6hjep-en-ltr
>> >> >> >> > -gecko-cmp.css"><script type="text/javascript">var
>> >> >> >> _AdfWindowOpenError='A
>> >> >> >> > popup window blocker has been detected in your browser.
>> Popup
>> >> >> >> blockers
>> >> >> >> > interfere with the operation of this application. Please
>> >> disable
>> >> >> your
>> >> >> >> popup
>> >> >> >> > blocker or allow popups from this site.';</script><script
>> >> >> >> > type="text/javascript"
>> >> >> >> > src="/TPMS-TPMS-context-
>> >> >> >> root/adf/jsLibs/Common1_0_11.js"></script><script
>> >> >> >> > type="text/javascript">_defaultTZ()</script></head><body
>> >> >> >> > onload="_checkLoad()" onunload="_checkUnload(event)"><div
>> >> >> >> > id="tr_pprBlockingDiv" onclick="return
>> >> _pprConsumeClick(event);"
>> >> >> >> >
>> >> >>
>> style="position:absolute;left:0;top:0;width:0;height:0;cursor:wait;"
>> >> >> >> > onkeydown="return false;" onkeyup="return false;"
>> >> >> onmousedown="return
>> >> >> >> > false;" onmouseup="return false;" onkeypress="return
>> >> >> false;"></div><a
>> >> >> >> > name="top"></a><noscript>This page uses JavaScript and
>> requires
>> >> a
>> >> >> >> JavaScript
>> >> >> >> > enabled browser.Your browser is not JavaScript
>> >> >> >> enabled.</noscript><form
>> >> >> >> > id="_id1" name="_id1" style="margin:0px" method="POST"
>> >> >> >> onkeypress="return
>> >> >> >> > _submitOnEnter(event,'_id1');"
>> >> >> >> > action="/TPMS-TPMS-context-
>> >> >> root/faces/EmptyTrinidadTest.jsp"><input
>> >> >> >> > type="hidden" name="org.apache.myfaces.trinidad.faces.FORM"
>> >> >> >> > value="_id1"><input type="hidden" name="_noJavaScript"
>> >> >> >> value="false"><span
>> >> >> >> > id="tr__id1_Postscript"><input type="hidden"
>> >> >> >> > name="org.apache.myfaces.trinidad.faces.STATE" value="!-
>> >> >> >> wmqieph21"><script
>> >> >> >> > type="text/javascript">function __id1Validator(f,s){return
>> >> >> >> > _validateInline(f,s);}var _id1_SF={};</script></span><script
>> >> >> >> >
>> >> >>
>> type="text/javascript">_submitFormCheck();</script></form></body><!-
>> >> -
>> >> >> >> Created
>> >> >> >> > by Apache Trinidad (Apache MyFaces Trinidad API -
>> 1.0.11/Apache
>> >> >> >> MyFaces
>> >> >> >> > Trinidad Impl - 1.0.11), skin:minimal.desktop--></html>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Note that the "<p>Content goes here!</p>" content is outside
>> of
>> >> >> the
>> >> >> >> body
>> >> >> >> > elements.  I've looked at the Apache MyFaces installation
>> >> >> >> documentation and
>> >> >> >> > compared my web.xml and faces-config.xml file to that but am
>> >> not
>> >> >> >> seeing any
>> >> >> >> > discrepancies.
>> >> >> >> >
>> >> >> >> > Web.xml entries:
>> >> >> >> >
>> >> >> >> >    <!-- Apache Trinidad entry -->
>> >> >> >> >    <filter>
>> >> >> >> >        <filter-name>trinidad</filter-name>
>> >> >> >> >
>> >> >> >> > <filter-
>> >> >> >>
>> class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-
>> >> clas
>> >> >> >> > s>
>> >> >> >> >    </filter>
>> >> >> >> >
>> >> >> >> >    <!-- Apache Trinidad entry -->
>> >> >> >> >    <filter-mapping>
>> >> >> >> >        <filter-name>trinidad</filter-name>
>> >> >> >> >        <!-- This assumes that the FacesServlet has been
>> >> registered
>> >> >> --
>> >> >> >> >
>> >> >> >> >        <!-- under the name "faces" -->
>> >> >> >> >        <servlet-name>faces</servlet-name>
>> >> >> >> >    </filter-mapping>
>> >> >> >> >
>> >> >> >> >    <!-- Faces Servlet -->
>> >> >> >> >    <servlet>
>> >> >> >> >        <servlet-name>faces</servlet-name>
>> >> >> >> >        <servlet-
>> class>javax.faces.webapp.FacesServlet</servlet-
>> >> >> class>
>> >> >> >> >        <load-on-startup>1</load-on-startup>
>> >> >> >> >    </servlet>
>> >> >> >> >
>> >> >> >> >    <!-- Resource loader servlet (Apache Trinidad entry) -->
>> >> >> >> >    <servlet>
>> >> >> >> >        <servlet-name>resources</servlet-name>
>> >> >> >> >
>> >> >> >> > <servlet-
>> >> >> >>
>> >> class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-c
>> >> >> >> > lass>
>> >> >> >> >        <load-on-startup>1</load-on-startup>
>> >> >> >> >    </servlet>
>> >> >> >> >
>> >> >> >> >  <!-- Faces Servlet Mappings -->
>> >> >> >> >    <servlet-mapping>
>> >> >> >> >        <servlet-name>faces</servlet-name>
>> >> >> >> >        <url-pattern>/faces/*</url-pattern>
>> >> >> >> >    </servlet-mapping>
>> >> >> >> >
>> >> >> >> >    <servlet-mapping>
>> >> >> >> >        <servlet-name>faces</servlet-name>
>> >> >> >> >        <url-pattern>*.faces</url-pattern>
>> >> >> >> >    </servlet-mapping>
>> >> >> >> >
>> >> >> >> >    <!-- This cannot be configured currently (Apache Trinidad
>> >> >> entry) -
>> >> >> >> ->
>> >> >> >> >    <servlet-mapping>
>> >> >> >> >        <servlet-name>resources</servlet-name>
>> >> >> >> >        <url-pattern>/adf/*</url-pattern>
>> >> >> >> >    </servlet-mapping>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Faces-config.xml entries:
>> >> >> >> >
>> >> >> >> >  <application>
>> >> >> >> >
>> >> >> >> > <default-render-kit-
>> >> id>org.apache.myfaces.trinidad.core</default-
>> >> >> >> render-kit-
>> >> >> >> > id>
>> >> >> >> >  </application>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Does anything just leap out as being obviously (or not)
>> wrong?
>> >> >>  This
>> >> >> >> should
>> >> >> >> > be simple from reading the documentation but it's
>> frustrating
>> >> when
>> >> >> it
>> >> >> >> > doesn't work (properly). :-(
>> >> >> >> >
>> >> >> >> > Thanks in advance...
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >
>> >
>
>

Reply via email to