Skip to Content
author's profile photo Former Member
Former Member

integrate html content - iView

Hi all, I would like some advise for integrating html content in an iView.

I've seen all topics regarding this topic, but still havent found what I'm looking for.

The solution of uploading a html document in a KM repository and after that creating a KM document iView seems pretty good. But it's not working for diplaying images or stylesheets in that html, though these are stored in the same KM folder.

In fact what I would like to do is to integrate HTML content as part of a developediView ( for example writing code to put the html content in a HTMLB group control). I dont want to use URL iView, or an iVIew that contains only the html document.

And of course the html content file to be stored in KM or irj/root, and not in the application iView.

Could this be possible? Thanks.

Best regards


Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Feb 21, 2005 at 10:35 AM

    You could do this by using a variety of methods

    1) you could store the html document in KM and then use the KM APIs to retrieve the resource and get the content via a stream. You could then store this in the iView as a String or StringBuffer and then simply output this in either the iViews jsp or from the AbstractPortalComponent using the response.write(myStringBuffer.toString())

    2) you could retrieve the content using a File object and retrieve the stream using the objects APIs and then do the same as number 1

    Perhaps this can help


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 11:49 AM

    Hi, thanks for replying.

    Your solution seems right to me,

    but I think in this case I could get a display of a simple text in the iView, but not with the stylesheets, images or formatting of the original html. Maybe using textView, but in this case formatting is also a problem.

    I tried also with <%@include file=""%> in jsp component but I couldnt get the path of the html file from CM or irj/root. Besides, in this case I am also in doubt about recognizing stylesheets.

    I am really confused about integrating html content in an iView.

    Best regards.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi

      By using this method you aren't limited to simple text. As long as the client can access the images, stylesheets, etc from their browser, then the html that you output should be fine. I personally wouldn't use a textView to display this html as it may not get interpretted by the browser. I would simply do something like <%=myBean.getHtmlOutput()%>. By doing this the html output is written to the page before the page is displayed to the browser.

      The path to any images would simply be the same as a document. To get the correct path simply go to the KM explorer iView and click on the resource that you need. You should be able to get the path from the browser address bar. When you have this path, make sure that the path in the html file points to the images and stylesheets using this same format of path.

      Why are you trying to have the html files and images in the CM repository instead of within the iView itself ?

      I hope some of this helps


  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 08:31 PM

    Hi Darrell,

    I will try your hints, thanks a lot for them.

    I wanted to use stored html files in CM, because in this way I think I can change the iView content by modifying the html file, or images.

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.