|
We are using Jetspeed as the framework for our
Intranet. Many of our users want to create content, but they only have enough
technical skills to use MS-Word to SaveAs HTML.
It occurred to me that to display their docs in a
portlet all I needed to do was strip the data between the <BODY> tags. I
wanted to understand the portlets better anyway, so I have created a variation
on the FileServer portlet to create a htmlBody portlet. Though it is simple, it
is not very class-oriented. (For example, I copied the FileServer portlet rather
than simply extending it.) But it is good enough that I can show my MSWord
pages. I have also used it to display MHonarc (A mail list archive browser)
pages within portlets! Perhaps this approach would let you display almost any
web page inside a portlet.
Besides making the code more up to java-standards,
it could use some cleanup:
- prepend html-server to internal links.(I want to
understand portlet parameters anyway)
- I am just doing string manipulation. It would
problably be better if I parsed the page to ensure valid HTML.
- check for code that might disrupt the
jetspeed page (such as frame definitions...)
- check for useful code outside the BODY tags
(applets/javascript, etc)
Anyway, I thought it might be marginally useful to
others. I will see if I can improve it myself, but as you can see, I am not of
the calliber of other developers on this list.
You can email me directly if you would like a copy
of the code. (I don't want to waste the bandwidth on this list for those who are
not interested).
Steve B.
|
- Re: Portlet to display HTML links Steve B.
- Re: Portlet to display HTML links burtonator
