> "Steve B." wrote:
<snip>
> 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.
Yup.
> 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.
I would like to add this functionality to FileServerPortlet anyway.
> (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.
No. This almost impossible and not worth doing. Performance would be
worse and HTML is almost never valid anyway :)
> - check for code that might disrupt the jetspeed page (such as frame
> definitions...)
The problem is that it is a slippery slope. <frame> might be OK though.
> - check for useful code outside the BODY tags (applets/javascript,
> etc)
It would be a good option to also strip <object> tags so that you don't
get ActiveX controls to your users.
> 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).
Send me a copy... I would like to incorporate some changes back into
the main Jetspeed.
Kevin
--
Kevin A Burton ([EMAIL PROTECTED])
http://relativity.yi.org
Message to SUN: "Please Open Source Java!"
I just patented "one click e-mail", when you hit the "reply" button you
own me 50 cents.
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]