I need Jetspeed to produce relative urls because my server stands behind a firewall/proxy and it's not directly accessable from the internet hence absolute urls are unusable.
To let jetspeed produce relative URLs I had to implement an hack into the turbine DynamicURI source code changing the behaviour of the metoth toString so that it doens't include protocol, server name and port. Is tehre any better way to do this ?
Any of you managed to run Jetspped behind a firewall/proxy?
If you want to run the stock code behind a firewall, simply make sure the ServerHost name is correctly defined in Tomcat and/or Apache so that the generated absolute links will use the server name rather than IP address.
You can then easily use it through a proxy by using different name resolutions inside and outside your proxy.
If you simply want to change all links to relative instead of absolute, do the following:
- copy JetspeedLink source to <mypackage>.MyRelativeJetspeedLink
- make MyRelativeJetspeedLink extends RelativeDynamicURI instead of DynamicURI
- ccomplie and put this class in /WEB-INF/classes
- update the TurbineResource.properties or my.properties and change the line
tools.global.jslink = org.apache.jetspeed.util.template.BaseJetspeedLink to tools.global.jslink = mypackage.MyRelativeJetspeedLink
- start Tomcat
All templates will now use your MyRelativeJetspeedLink when they use $jslink so you can have them behave ejust like you wish.
Be prepared to thoroughly check your webapp as Turbine and relative links don't work necessarily very well since the request path is hardly predictable
-- Raphael Luta - [EMAIL PROTECTED] Apache Jetspeed - Enterprise Portal in Java http://portals.apache.org/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
