• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Resource Manager returns wrong URL for files in sub-folder of WebServerResources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resource Manager returns wrong URL for files in sub-folder of WebServerResources


  • Subject: Re: Resource Manager returns wrong URL for files in sub-folder of WebServerResources
  • From: "Yung-Luen Lan" <email@hidden>
  • Date: Sat, 19 Jul 2008 18:11:47 +0800

I find my files under build/MyApp.woa/Contents/WebServerResources
(built using eclipse -> Run) was flattened,
but dist/MyApp.woa/Contents/WebServerResources (built using build.xml
-> Run As Ant Build) are not.

Why are these results different? How do I make them consistent?

Regards,
yllan

On Thu, Jul 17, 2008 at 8:00 PM, Yung-Luen Lan <email@hidden> wrote:
> Yes, but urlForResourceNamed("/css/main.css", null, null, null) also returns
> "/ERROR/NOT_FOUND/app=MyAppfilename=/css/main.css".
>
> Regards,
> yllan
>
> On Thu, Jul 17, 2008 at 7:20 PM, Lachlan Deck <email@hidden> wrote:
>> On 17/07/2008, at 7:14 PM, Yung-Luen Lan wrote:
>>
>>> I put my css/javascript/images into these folder:
>>>
>>> WebServerResouces/css/
>>> WebServerResouces/js/
>>> WebServerResouces/imgs/
>>>
>>> in my eclipse wo project. I checked the compiled
>>> MyApp.woa/Contents/WebServerResources, these sub-folders were not
>>> flattened.
>>>
>>> However, when I call
>>> application().resourceManager().urlForResourceNamed("main.css", null,
>>> null, null), it returns
>>> "/WebObjects/MyApp.woa/Contents/WebServerResources/main.css". <--
>>> should be .../WSR/css/main.css
>>>
>>> And
>>> application().resourceManager().urlForResourceNamed("css/main.css",
>>> null, null, null) returns
>>> "/ERROR/NOT_FOUND/app=HypoServer/filename=css/main.css".
>>>
>>> How could I get the correct url for files inside sub-folders of WSR?
>>> Thanks.
>>
>> Have you tried urlForResourceNamed("/css/main.css", null, null, null)?
>>
>> with regards,
>> --
>>
>> Lachlan Deck
>>
>>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Resource Manager returns wrong URL for files in sub-folder of WebServerResources (From: "Yung-Luen Lan" <email@hidden>)
 >Re: Resource Manager returns wrong URL for files in sub-folder of WebServerResources (From: Lachlan Deck <email@hidden>)
 >Re: Resource Manager returns wrong URL for files in sub-folder of WebServerResources (From: "Yung-Luen Lan" <email@hidden>)

  • Prev by Date: Re: WO5.4 WOPopupButton wanting formatter
  • Next by Date: Re: WO5.4 WOPopupButton wanting formatter
  • Previous by thread: Re: Resource Manager returns wrong URL for files in sub-folder of WebServerResources
  • Next by thread: Re: [Annoucement] New WOLips Java Client / Direct To Java Client Tutorial
  • Index(es):
    • Date
    • Thread