Thanks Andy,
I am developing the application on Grails with Jetty server, which
automatically gives me the url of http://localhost:8080/mytrial, , but I got
your point, that is a very good workaround.

In apache, we can do that directly. Let me throw this open on grails forum
to see how Jetty can be tweaked to so that I can make "mytrial" as my main
website for real testing.

Thank you for the solution,I will get back with what I found for Jetty
Server on Grails


Andy Matthews-4 wrote:
> 
> 
> I use a Mac Mini as my development server. It runs Apache and my other
> servers needed to develop sites locally. When I set up a new site I do the
> following:
> 
> 1) Create a new virtual host for that site, with the URL of
> local.<mydomain>.com
> 2) On my workstation (PC) I create a host file entry pointing to my
> development server:
>       local.<mydomain>.com    192.138.0.5
> 
> What this allows me to do is to use absolute pathing:
> /images/someimage.gif
> 
> And have it be pointing to the correct location.
> 
> Just throwing it out. The same thing can obviously be accomplished if
> you're
> running Apache on your local machine.
> 
> 
> Andy matthews
> 
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of MarkAtHarvest
> Sent: Monday, January 05, 2009 8:53 AM
> To: jquery-en@googlegroups.com
> Subject: [jQuery] Re: Absolute Image location
> 
> 
> 
> awesome, /mytrail/images/down.gif  works, only problem now I need to solve
> is if I flatten this war file and install it on the domain itself(i.e at
> http://localhost instead of http://localhost/mytrial) , then I need to
> change the javascript to /images/down.gif
> 
> Thank you Richard, Brian, for solving my problem. 
> 
> 
> richard.aday wrote:
>> 
>> 
>> From what you wrote the way the link is being handled looks correct.
>> Why don't you try: /mytrail/images/down.gif .
>> 
>> On Jan 3, 6:54 pm, MarkAtHarvest <m...@harvestinfotech.com> wrote:
>>> Brian,
>>>
>>> Here is the html code on myhttp://localhost:8080/mytrial/admin.gsp, 
>>> on my grails application.
>>> Just added this to find the absolute location for the images if I use 
>>> <div class="images">
>>>            images/down.gif  image
>>>       </div>
>>>
>>> this goes to link,http://localhost:8080/mytrial/images/down.gif, and 
>>> it does not find it.
>>>
>>> and if I change this to
>>>
>>>         <div class="images">
>>>            /images/down.gif  image
>>>       </div>
>>> this goes to linkhttp://localhost:8080/images/down.gif, its going to 
>>> root intead of going tohttp://localhost:8080/mytrial/images/down.gif
>>>
>>> Thank you
>>>
>>>
>>>
>>> brian-263 wrote:
>>>
>>> > On Sat, Jan 3, 2009 at 8:57 PM, MarkAtHarvest
>>> <m...@harvestinfotech.com>
>>> > wrote:
>>>
>>> >> Brian,
>>>
>>> >> I am a newbie on CSS , let me try to change it and update you back 
>>> >> on
>>> how
>>> >> it
>>> >> goes, thanks it seems this should work.
>>> >> BTW, changing to /images/down.gif, does not work at all, my images
>>> folder
>>> >> is
>>> >> at the root itself. Under the webapps folder of my java application.
>>>
>>> >> Even if I try to create a href link to /images/down.gif, it goes
>>> directly
>>> >> to
>>> >>http://images/down.gifinstead of going to 
>>> >>http://localhost:8080/images/down.gif.
>>>
>>> > Then you've likely got something wrong with your application. 
>>> > Though it's obviously not a jQuery problem, how are you creating 
>>> > these img tags?
>>>
>>> --
>>> View this message in
>>>
> context:http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21272
> 4...
>>> Sent from the jQuery General Discussion mailing list archive at 
>>> Nabble.com.
>> 
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21292345.html
> Sent from the jQuery General Discussion mailing list archive at
> Nabble.com.
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21317518.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to