Look:
- I use this conversion on output HTML-Docs from database - storage (where many users Uploading any HTML-docs )
in jsp page, example "DocView.jsp" have a code:
<p>
<%if (doc != null) {%>
<%=HTML.addFullURL2LocalHrefs(doc.getContent())%>
<%}%>
</p>
there is a "doc" - it is torque mapper class for DB.table with BLOB field with documents, pict,... e.t.s
and I have (make) a utilits for search and replace (if need) in HTML-Documents HTML TAG.<A href....>
in HTML.addFullURL2LocalHrefs() method may use CNeko HTML-parser, for convert to w3c.DOM then convert to XML.DOM (dom4j libs) and search element <A> by XPath
(but not working this combination on old Tomcat (with xerces version 1))
or made self mini-parser, use a SWING API for presentation HTML-file to DOM model (but ... this method is bad, ... "cherez jopu autogenom" - russian folklor)
Carlo Pascoli wrote:
Thanks Vladimir for your reply, do you mean that your custom servlet filter filters outgoing html converting jetspeed absolute to relative urls and also filters incoming http requests converting relative to absolute urls?
Isn't there any easiest way of doing that like defining a property in TurbineResorce or JetspeedResource files? I've been looking for it without any luck...
In layout files like jetspeed-tab.vm navigation links are displayed calling $tab.Link which produce absolute urls. Is there any reason for that? How is it possible to change this behaviour? Thanks again
Carlo
-----Original Message----- From: Vladimir Figurov [mailto:[EMAIL PROTECTED] Sent: 23 August 2004 12:57 To: Jetspeed Users List Subject: Re: relative links in portlet controllers navigation.
Hi I make a additional servlet-filter for parsing outing html before response and converting relative url to absolute url Carlo Pascoli wrote:
Hi all, I would like to know how it's possible to get relative urls in jetspeed navigation instead of absolute urls that jetspeed builds. My server stands behind a proxy hence it's not directly accessible from the internet and the absolute urls that jetspeed builds for the navigation are not usable. Changing the html base ref doesn't help, is there a way to avoid jetspeed building absulute urls in the portlet controller navigation? I very urgently need to fix this isssue. Thanks in anvance for a reply.
Carlo
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
