You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Matthew Pomar <ma...@hotmail.com> on 2003/09/06 18:00:11 UTC

localhost, even from another machine.

When Turbine creates the image URLs using $ui.image($ui.spacer) it includes
the full path including the "localhost" server. It does this even when the
site is accessed from another machine, which causes the images to be broken.

Is there a way around this?

Thanks,
 - Matt

Re: localhost, even from another machine.

Posted by Eric Emminger <er...@ericemminger.com>.
Matthew

Matthew Pomar wrote:
> I'm I connecting directly to Tomcat? I think the answer is yes, but I'm not
> sure I understand the question... but here's some more informaiton:
> 
> My development box is running on a local network at . I'm using
> Turbine 2.2 and the Tomcat version that is packaged with that.

If you're using the TDK and haven't changed Tomcat, then yes, you're 
connecting directly to Tomcat. Your URL has a port number 
(http://localhost:8080), right?

> 
> When I go to another machine on my network, the images on my project are
> broken. Looking at the source reveals the "localhost" in the URL.

Add this to a Velocity page and check on another machine.
<br>server data server name=$data.getServerData().getServerName()

If it says "localhost" even though you went to the IP address, then I 
think you need to change a Tomcat config.

Eric


Re: localhost, even from another machine.

Posted by Brian Lawler <br...@tribenetwork.com>.
On my project, we extended the pull tool (we were using $content 
instead of $ui) to render the correct link which is, in our case 
"/images/image.jpg".  This way we are able to keep the control to do 
things like point all image requests to a different server if we like 
without needing to change the code.

-B

On Tuesday, September 9, 2003, at 01:15  PM, Runako Godfrey wrote:

> I have seen this in both Turbine 2.2 and Turbine 2.3, running against
> Tomcat 4.1.x (I think 4.1.27).  I couldn't get it working easily,
> probably due to a configuration error on my part.  Nonetheless, I found
> it easier to just point directly at the images (e.g. by putting the
> images in /images and using img src="/images/image.jpg") and not use 
> the
> UI tool.
>
> Runako
>
>> -----Original Message-----
>> From: Eric Emminger [mailto:eric@ericemminger.com]
>> Sent: Tuesday, September 09, 2003 1:51 PM
>> To: Turbine Users List; matthewpomar@hotmail.com
>> Subject: Re: localhost, even from another machine.
>>
>>
>> Matthew
>>
>> Matthew Pomar wrote:
>>> When Turbine creates the image URLs using $ui.image($ui.spacer) it
>>> includes the full path including the "localhost" server. It
>> does this
>>> even when the site is accessed from another machine, which
>> causes the
>>> images to be broken.
>>>
>>> Is there a way around this?
>>
>> Are you connecting directly to Tomcat? Which Turbine and
>> Tomcat releases?
>>
>> Eric
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


RE: localhost, even from another machine.

Posted by Runako Godfrey <rg...@onepercentsoftware.com>.
I have seen this in both Turbine 2.2 and Turbine 2.3, running against
Tomcat 4.1.x (I think 4.1.27).  I couldn't get it working easily,
probably due to a configuration error on my part.  Nonetheless, I found
it easier to just point directly at the images (e.g. by putting the
images in /images and using img src="/images/image.jpg") and not use the
UI tool.

Runako

> -----Original Message-----
> From: Eric Emminger [mailto:eric@ericemminger.com] 
> Sent: Tuesday, September 09, 2003 1:51 PM
> To: Turbine Users List; matthewpomar@hotmail.com
> Subject: Re: localhost, even from another machine.
> 
> 
> Matthew
> 
> Matthew Pomar wrote:
> > When Turbine creates the image URLs using $ui.image($ui.spacer) it 
> > includes the full path including the "localhost" server. It 
> does this 
> > even when the site is accessed from another machine, which 
> causes the 
> > images to be broken.
> > 
> > Is there a way around this?
> 
> Are you connecting directly to Tomcat? Which Turbine and 
> Tomcat releases?
> 
> Eric
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> 
> 


Re: localhost, even from another machine.

Posted by Eric Emminger <er...@ericemminger.com>.
Matthew

Matthew Pomar wrote:
> When Turbine creates the image URLs using $ui.image($ui.spacer) it includes
> the full path including the "localhost" server. It does this even when the
> site is accessed from another machine, which causes the images to be broken.
> 
> Is there a way around this?

Are you connecting directly to Tomcat? Which Turbine and Tomcat releases?

Eric