Thanks Raphael for your quick reply.
I understand your instructions about how to customize the $link behaviour.

The other option, as far as i understand, is setting the tomcat ServerHost
name (which is not addressable on the internet) to something that resolves
on the firewall machine so that these requests can be forwarded to the
tomcat server.
Is this right?

At this stage I'm not interested in running the stock code, I'm interested
in having Jetspeed links addressable on the internet if my tomcat server is
on a private IP behind a Firewall/Proxy.

> 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

Why you say that the request path is hardly predictable?
Is there any specific reason why absolute urls are preferable?

Thanks again for your advices

Carlo Pascoli



-----Original Message-----
From: Raphael Luta [mailto:[EMAIL PROTECTED]
Sent: 24 August 2004 10:58
To: Jetspeed Users List
Subject: Re: Running Jetspped behind a Firewall and Absolute URLs


Carlo Pascoli wrote:
> 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]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to