How to include html page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to include html page

dhilip kumar
Hi
   
       I would like to include "html" page in the main page(thru the controller), instead of  "ftl" page. But i am getting the folowing error,
   
  "org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed."
   
  Could anyone please help me?
   
  Thanks in advance
   
   
   

 
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out.
Reply | Threaded
Open this post in threaded view
|

RE: How to include html page

Amit Shinde
Dilip,
        This might be due to the handlers that need to be included in the
controller file. At the top of the controller.xml file, check whether you
are missing any of these handlers. You probably dont have the "http"
handler. After including them, restart the server again.


    <!-- event handlers -->
    <handler name="java" type="request"
class="org.ofbiz.webapp.event.JavaEventHandler"/>
    <handler name="soap" type="request"
class="org.ofbiz.webapp.event.SOAPEventHandler"/>
    <handler name="service" type="request"
class="org.ofbiz.webapp.event.ServiceEventHandler"/>
    <handler name="simple" type="request"
class="org.ofbiz.webapp.event.SimpleEventHandler"/>

    <!-- view handlers -->
    <handler name="ftl" type="view"
class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
    <handler name="jsp" type="view"
class="org.ofbiz.webapp.view.JspViewHandler"/>
    <handler name="screen" type="view"
class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
    <handler name="http" type="view"
class="org.ofbiz.webapp.view.HttpViewHandler"/>
    <handler name="datavision" type="view"
class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
    <handler name="jasperreportspdf" type="view"
class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
    <handler name="jasperreportsxml" type="view"
class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
    <handler name="screenfop" type="view"
class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>


    Hope this helps.

Amit Shinde


-----Original Message-----
From: dhilip kumar [mailto:[hidden email]]
Sent: Wednesday, August 23, 2006 3:44 PM
To: users
Subject: How to include html page


Hi

       I would like to include "html" page in the main page(thru the
controller), instead of  "ftl" page. But i am getting the folowing error,

  "org.xml.sax.SAXParseException: The markup in the document following the
root element must be well-formed."

  Could anyone please help me?

  Thanks in advance





---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out.

Reply | Threaded
Open this post in threaded view
|

RE: How to include html page

dhilip kumar
Thanks Amit. I have all the handlers in "controler.xml". Still i am getting the same error.
   
  Dhilip

Amit Shinde <[hidden email]> wrote:
  Dilip,
This might be due to the handlers that need to be included in the
controller file. At the top of the controller.xml file, check whether you
are missing any of these handlers. You probably dont have the "http"
handler. After including them, restart the server again.



class="org.ofbiz.webapp.event.JavaEventHandler"/>
class="org.ofbiz.webapp.event.SOAPEventHandler"/>
class="org.ofbiz.webapp.event.ServiceEventHandler"/>
class="org.ofbiz.webapp.event.SimpleEventHandler"/>


class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
class="org.ofbiz.webapp.view.JspViewHandler"/>
class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
class="org.ofbiz.webapp.view.HttpViewHandler"/>
class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>


Hope this helps.

Amit Shinde


-----Original Message-----
From: dhilip kumar [mailto:[hidden email]]
Sent: Wednesday, August 23, 2006 3:44 PM
To: users
Subject: How to include html page


Hi

I would like to include "html" page in the main page(thru the
controller), instead of "ftl" page. But i am getting the folowing error,

"org.xml.sax.SAXParseException: The markup in the document following the
root element must be well-formed."

Could anyone please help me?

Thanks in advance





---------------------------------
Stay in the know. Pulse on the new Yahoo.com. Check it out.



 
---------------------------------
Get your email and more, right on the  new Yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: How to include html page

Scott Gray
Could you show us how you are trying to load the page?

dhilip kumar wrote:

> Thanks Amit. I have all the handlers in "controler.xml". Still i am getting the same error.
>    
>   Dhilip
>
> Amit Shinde <[hidden email]> wrote:
>   Dilip,
> This might be due to the handlers that need to be included in the
> controller file. At the top of the controller.xml file, check whether you
> are missing any of these handlers. You probably dont have the "http"
> handler. After including them, restart the server again.
>
>
>
> class="org.ofbiz.webapp.event.JavaEventHandler"/>
> class="org.ofbiz.webapp.event.SOAPEventHandler"/>
> class="org.ofbiz.webapp.event.ServiceEventHandler"/>
> class="org.ofbiz.webapp.event.SimpleEventHandler"/>
>
>
> class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
> class="org.ofbiz.webapp.view.JspViewHandler"/>
> class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
> class="org.ofbiz.webapp.view.HttpViewHandler"/>
> class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
> class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
> class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
> class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>
>
>
> Hope this helps.
>
> Amit Shinde
>
>
> -----Original Message-----
> From: dhilip kumar [mailto:[hidden email]]
> Sent: Wednesday, August 23, 2006 3:44 PM
> To: users
> Subject: How to include html page
>
>
> Hi
>
> I would like to include "html" page in the main page(thru the
> controller), instead of "ftl" page. But i am getting the folowing error,
>
> "org.xml.sax.SAXParseException: The markup in the document following the
> root element must be well-formed."
>
> Could anyone please help me?
>
> Thanks in advance
>
>
>
>
>
> ---------------------------------
> Stay in the know. Pulse on the new Yahoo.com. Check it out.
>
>
>
>  
> ---------------------------------
> Get your email and more, right on the  new Yahoo.com
>  

Reply | Threaded
Open this post in threaded view
|

RE: How to include html page

Amit Shinde
In reply to this post by dhilip kumar
Dhilip,
        One more thing to look at is to make sure you remove the type attribute
from the view-map.

<view-map name="hello" page="/hello.html"/>
<view-map name="main" type="jpublish" page="/main.ftl"/>
<view-map name="EditFixedAssetIdents" type="screen"
page="component://accounting/widget/FixedAssetScreens.xml#EditFixedAssetIden
ts"/>


Amit


-----Original Message-----
From: dhilip kumar [mailto:[hidden email]]
Sent: Wednesday, August 23, 2006 4:09 PM
To: [hidden email]
Subject: RE: How to include html page


Thanks Amit. I have all the handlers in "controler.xml". Still i am getting
the same error.

  Dhilip

Amit Shinde <[hidden email]> wrote:
  Dilip,
This might be due to the handlers that need to be included in the
controller file. At the top of the controller.xml file, check whether you
are missing any of these handlers. You probably dont have the "http"
handler. After including them, restart the server again.



class="org.ofbiz.webapp.event.JavaEventHandler"/>
class="org.ofbiz.webapp.event.SOAPEventHandler"/>
class="org.ofbiz.webapp.event.ServiceEventHandler"/>
class="org.ofbiz.webapp.event.SimpleEventHandler"/>


class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
class="org.ofbiz.webapp.view.JspViewHandler"/>
class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
class="org.ofbiz.webapp.view.HttpViewHandler"/>
class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>


Hope this helps.

Amit Shinde


-----Original Message-----
From: dhilip kumar [mailto:[hidden email]]
Sent: Wednesday, August 23, 2006 3:44 PM
To: users
Subject: How to include html page


Hi

I would like to include "html" page in the main page(thru the
controller), instead of "ftl" page. But i am getting the folowing error,

"org.xml.sax.SAXParseException: The markup in the document following the
root element must be well-formed."

Could anyone please help me?

Thanks in advance





---------------------------------
Stay in the know. Pulse on the new Yahoo.com. Check it out.




---------------------------------
Get your email and more, right on the  new Yahoo.com

Reply | Threaded
Open this post in threaded view
|

Re: How to include html page

dhilip kumar
In reply to this post by Scott Gray
 
  Hi Scott
   
  Actually i want to load the html page, say, "policies.htm" to be displayed in main page thru "controller.xml".
   
  For that, in the controller.xml, request-map uri is given like this,
   
  <request-map uri="policy">
  <security https="false" auth="false"/>
  <response name="success" type="view" value="policy"/>
  </request-map>
   
  For the view map, the following is given,
   
  <view-map name="privacypolicy" type="screen" page="component://ecommerce/widget/CommonScreens.xml#privacypolicy"/>
   
  In the CommonScreens.xml, the following given
   
  <screen name="policy">
  <section>
  <actions>
  <set field="leftbarScreenName" value="leftbar"/>
  <set field="rightbarScreenName" value="rightbar"/>
  <set field="MainColumnStyle" value="center"/>
  <set field="title-property" value="PageTitleMain"/>
  <set field="headerItem" value="main"/>
  <set field="randomSurveyGroup" value="testSurveyGroup"/>
 
   
 
  </actions>
  <widgets>
  <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
  <decorator-section name="body">
  <platform-specific>
  <html><html-template location="component://ecommerce/webapp/ecommerce/policies.htm"/></html>
  </platform-specific>
  </decorator-section>
  </decorator-screen>
  </widgets>
  </section>
  </screen>
   
   
  The "policy " link is in the header. So in the header.ftl, i have given like this "
  <td width="5%" class="headerButtonRight"><a href="<@ofbizUrl>privacypolicy</@ofbizUrl>" class="headerbuttontext">Policy</a> ".
   
  I have tried with keeping the "policy.htm" file in the "/images/" folder. It also gives the same error.
   
  Thanks and regards
   
  Dhilip
   
   
   
Scott Gray <[hidden email]> wrote:
  Could you show us how you are trying to load the page?

dhilip kumar wrote:

> Thanks Amit. I have all the handlers in "controler.xml". Still i am getting the same error.
>
> Dhilip
>
> Amit Shinde wrote:
> Dilip,
> This might be due to the handlers that need to be included in the
> controller file. At the top of the controller.xml file, check whether you
> are missing any of these handlers. You probably dont have the "http"
> handler. After including them, restart the server again.
>
>
>
> class="org.ofbiz.webapp.event.JavaEventHandler"/>
> class="org.ofbiz.webapp.event.SOAPEventHandler"/>
> class="org.ofbiz.webapp.event.ServiceEventHandler"/>
> class="org.ofbiz.webapp.event.SimpleEventHandler"/>
>
>
> class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
> class="org.ofbiz.webapp.view.JspViewHandler"/>
> class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
> class="org.ofbiz.webapp.view.HttpViewHandler"/>
> class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
> class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
> class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
> class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>
>
>
> Hope this helps.
>
> Amit Shinde
>
>
> -----Original Message-----
> From: dhilip kumar [mailto:[hidden email]]
> Sent: Wednesday, August 23, 2006 3:44 PM
> To: users
> Subject: How to include html page
>
>
> Hi
>
> I would like to include "html" page in the main page(thru the
> controller), instead of "ftl" page. But i am getting the folowing error,
>
> "org.xml.sax.SAXParseException: The markup in the document following the
> root element must be well-formed."
>
> Could anyone please help me?
>
> Thanks in advance
>
>
>
>
>
> ---------------------------------
> Stay in the know. Pulse on the new Yahoo.com. Check it out.
>
>
>
>
> ---------------------------------
> Get your email and more, right on the new Yahoo.com
>



 
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
Reply | Threaded
Open this post in threaded view
|

RE: How to include html page

Vinay Agarwal
Dhilip,

FTL files are superset of HTML. To include a pure HTML page, you would need
to create a screen widget (like all other screens) where you include your
html page with the following tags
<platform-specific><html><html-template
location="component://xyz/somedir/somedir/somefile.html"/></html></platform-
specific>

You can find many examples if you search for "<platform-specific>" in the
project's xml files.

Regards,
Vinay Agarwal


-----Original Message-----
From: dhilip kumar [mailto:[hidden email]]
Sent: Wednesday, August 23, 2006 3:59 AM
To: [hidden email]
Subject: Re: How to include html page

 
  Hi Scott
   
  Actually i want to load the html page, say, "policies.htm" to be displayed
in main page thru "controller.xml".
   
  For that, in the controller.xml, request-map uri is given like this,
   
  <request-map uri="policy">
  <security https="false" auth="false"/>
  <response name="success" type="view" value="policy"/>
  </request-map>
   
  For the view map, the following is given,
   
  <view-map name="privacypolicy" type="screen"
page="component://ecommerce/widget/CommonScreens.xml#privacypolicy"/>
   
  In the CommonScreens.xml, the following given
   
  <screen name="policy">
  <section>
  <actions>
  <set field="leftbarScreenName" value="leftbar"/>
  <set field="rightbarScreenName" value="rightbar"/>
  <set field="MainColumnStyle" value="center"/>
  <set field="title-property" value="PageTitleMain"/>
  <set field="headerItem" value="main"/>
  <set field="randomSurveyGroup" value="testSurveyGroup"/>
 
   
 
  </actions>
  <widgets>
  <decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
  <decorator-section name="body">
  <platform-specific>
  <html><html-template
location="component://ecommerce/webapp/ecommerce/policies.htm"/></html>
  </platform-specific>
  </decorator-section>
  </decorator-screen>
  </widgets>
  </section>
  </screen>
   
   
  The "policy " link is in the header. So in the header.ftl, i have given
like this "
  <td width="5%" class="headerButtonRight"><a
href="<@ofbizUrl>privacypolicy</@ofbizUrl>"
class="headerbuttontext">Policy</a> ".
   
  I have tried with keeping the "policy.htm" file in the "/images/" folder.
It also gives the same error.
   
  Thanks and regards
   
  Dhilip
   
   
   
Scott Gray <[hidden email]> wrote:
  Could you show us how you are trying to load the page?

dhilip kumar wrote:
> Thanks Amit. I have all the handlers in "controler.xml". Still i am
getting the same error.

>
> Dhilip
>
> Amit Shinde wrote:
> Dilip,
> This might be due to the handlers that need to be included in the
> controller file. At the top of the controller.xml file, check whether
> you are missing any of these handlers. You probably dont have the "http"
> handler. After including them, restart the server again.
>
>
>
> class="org.ofbiz.webapp.event.JavaEventHandler"/>
> class="org.ofbiz.webapp.event.SOAPEventHandler"/>
> class="org.ofbiz.webapp.event.ServiceEventHandler"/>
> class="org.ofbiz.webapp.event.SimpleEventHandler"/>
>
>
> class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
> class="org.ofbiz.webapp.view.JspViewHandler"/>
> class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
> class="org.ofbiz.webapp.view.HttpViewHandler"/>
> class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
> class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
> class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
> class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>
>
>
> Hope this helps.
>
> Amit Shinde
>
>
> -----Original Message-----
> From: dhilip kumar [mailto:[hidden email]]
> Sent: Wednesday, August 23, 2006 3:44 PM
> To: users
> Subject: How to include html page
>
>
> Hi
>
> I would like to include "html" page in the main page(thru the
> controller), instead of "ftl" page. But i am getting the folowing
> error,
>
> "org.xml.sax.SAXParseException: The markup in the document following
> the root element must be well-formed."
>
> Could anyone please help me?
>
> Thanks in advance
>
>
>
>
>
> ---------------------------------
> Stay in the know. Pulse on the new Yahoo.com. Check it out.
>
>
>
>
> ---------------------------------
> Get your email and more, right on the new Yahoo.com
>



 
---------------------------------
How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone call
rates.

Reply | Threaded
Open this post in threaded view
|

Re: How to include html page

oceatoon
In reply to this post by dhilip kumar
Hi Dhilip
It seems all you have to do is to put an .ftl file type on your
policie.htmshould be
policie.ftl even though you have html in it.

Sometimes I found it usefull to use the freemarker <#include
"header_navhaut.ftl">    which includes this peice of html code inside an
ftl page.

hope this helps
Regards
Tibor


On 8/23/06, Vinay Agarwal <[hidden email]> wrote:

>
> Dhilip,
>
> FTL files are superset of HTML. To include a pure HTML page, you would
> need
> to create a screen widget (like all other screens) where you include your
> html page with the following tags
> <platform-specific><html><html-template
>
> location="component://xyz/somedir/somedir/somefile.html"/></html></platform-
> specific>
>
> You can find many examples if you search for "<platform-specific>" in the
> project's xml files.
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: dhilip kumar [mailto:[hidden email]]
> Sent: Wednesday, August 23, 2006 3:59 AM
> To: [hidden email]
> Subject: Re: How to include html page
>
>
>   Hi Scott
>
>   Actually i want to load the html page, say, "policies.htm" to be
> displayed
> in main page thru "controller.xml".
>
>   For that, in the controller.xml, request-map uri is given like this,
>
>   <request-map uri="policy">
>   <security https="false" auth="false"/>
>   <response name="success" type="view" value="policy"/>
>   </request-map>
>
>   For the view map, the following is given,
>
>   <view-map name="privacypolicy" type="screen"
> page="component://ecommerce/widget/CommonScreens.xml#privacypolicy"/>
>
>   In the CommonScreens.xml, the following given
>
>   <screen name="policy">
>   <section>
>   <actions>
>   <set field="leftbarScreenName" value="leftbar"/>
>   <set field="rightbarScreenName" value="rightbar"/>
>   <set field="MainColumnStyle" value="center"/>
>   <set field="title-property" value="PageTitleMain"/>
>   <set field="headerItem" value="main"/>
>   <set field="randomSurveyGroup" value="testSurveyGroup"/>
>
>
>
>   </actions>
>   <widgets>
>   <decorator-screen name="main-decorator"
> location="${parameters.mainDecoratorLocation}">
>   <decorator-section name="body">
>   <platform-specific>
>   <html><html-template
> location="component://ecommerce/webapp/ecommerce/policies.htm"/></html>
>   </platform-specific>
>   </decorator-section>
>   </decorator-screen>
>   </widgets>
>   </section>
>   </screen>
>
>
>   The "policy " link is in the header. So in the header.ftl, i have given
> like this "
>   <td width="5%" class="headerButtonRight"><a
> href="<@ofbizUrl>privacypolicy</@ofbizUrl>"
> class="headerbuttontext">Policy</a> ".
>
>   I have tried with keeping the "policy.htm" file in the "/images/"
> folder.
> It also gives the same error.
>
>   Thanks and regards
>
>   Dhilip
>
>
>
> Scott Gray <[hidden email]> wrote:
>   Could you show us how you are trying to load the page?
>
> dhilip kumar wrote:
> > Thanks Amit. I have all the handlers in "controler.xml". Still i am
> getting the same error.
> >
> > Dhilip
> >
> > Amit Shinde wrote:
> > Dilip,
> > This might be due to the handlers that need to be included in the
> > controller file. At the top of the controller.xml file, check whether
> > you are missing any of these handlers. You probably dont have the "http"
> > handler. After including them, restart the server again.
> >
> >
> >
> > class="org.ofbiz.webapp.event.JavaEventHandler"/>
> > class="org.ofbiz.webapp.event.SOAPEventHandler"/>
> > class="org.ofbiz.webapp.event.ServiceEventHandler"/>
> > class="org.ofbiz.webapp.event.SimpleEventHandler"/>
> >
> >
> > class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
> > class="org.ofbiz.webapp.view.JspViewHandler"/>
> > class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
> > class="org.ofbiz.webapp.view.HttpViewHandler"/>
> > class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
> > class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
> > class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
> > class="org.ofbiz.widget.screen.ScreenFopPdfViewHandler"/>
> >
> >
> > Hope this helps.
> >
> > Amit Shinde
> >
> >
> > -----Original Message-----
> > From: dhilip kumar [mailto:[hidden email]]
> > Sent: Wednesday, August 23, 2006 3:44 PM
> > To: users
> > Subject: How to include html page
> >
> >
> > Hi
> >
> > I would like to include "html" page in the main page(thru the
> > controller), instead of "ftl" page. But i am getting the folowing
> > error,
> >
> > "org.xml.sax.SAXParseException: The markup in the document following
> > the root element must be well-formed."
> >
> > Could anyone please help me?
> >
> > Thanks in advance
> >
> >
> >
> >
> >
> > ---------------------------------
> > Stay in the know. Pulse on the new Yahoo.com. Check it out.
> >
> >
> >
> >
> > ---------------------------------
> > Get your email and more, right on the new Yahoo.com
> >
>
>
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone call
> rates.
>
>