3 Replies Latest reply on Jun 14, 2008 1:26 PM by peterj

    static html

    daedalus_hammer

      Hi

      I want to display a static html page, the same way the default portal does (I want to put the html page inside my war and not load it with CMS).
      Is there a quick way to do it ?

        • 1. Re: static html
          peterj

          Rename the html file as a jsp, then in the doView method of your portlet redirect to the jsp.

          • 2. Re: static html
            daedalus_hammer

            Well, I could do that, but then the content would be displayed in a window.
            As I said, I want it to look like the Jboss Portal default (homepage), like when you go to http://localhost:8080/portal .
            I can load the Jboss index.html, but if I place a html file in the same directory (deploy\jboss-portal.sar\portal-cms.sar\portal\cms\conf\default-content\default), and try to use it instead of the index.html, I gent an "404 - Page Not Found
            Oops! We can't really find the resource you're looking for.".

            What I was asking: is there an easy way (not having to learn how to use CMS) to load a html file, just like the default portal does:


            <content-type>cms</content-type>
            <content-uri>/default/index.html</content-uri>


            (I know I can use filesystem instead of "cms", but I want that page inside my *.war not on the filesistem).

            Right now it seems like the NASA procedure for launching the space shuttle is easier (sorry, the frustration puts words in my mouth ) than just loading my custom page.

            • 3. Re: static html
              peterj

              If you do not want the window decorations, use the empty renderer. You can declare that in your *-object.xml file as follows:

              <window>
               <window-name>XXXX</window-name>
               <instance-ref>XXXX</instance-ref>
               <region>xxxx</region>
               <height>xxxx</height>
               <properties>
               <property>
               <name>theme.windowRendererId</name>
               <value>emptyRenderer</value>
               </property>
               <property>
               <name>theme.decorationRendererId</name>
               <value>emptyRenderer</value>
               </property>
               <property>
               <name>theme.portletRendererId</name>
               <value>emptyRenderer</value>
               </property>
               </properties>
               </window>