• 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: URI for static html/image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URI for static html/image


  • Subject: Re: URI for static html/image
  • From: Mark Morris <email@hidden>
  • Date: Sun, 26 Feb 2006 14:19:33 -0600

Hello Vincent,

You use WOResourceManager. For example, to get the complete URL to your server.html file, try:

String serverHtmlUrl = WOApplication.application().resourceManager ().urlForResourceNamed( "server.html", null, null, context().request () );

Regards,
Mark

On Feb 26, 2006, at 2:05 PM, Vincent Coetzee wrote:

Dear List,

I have added some images and static html files to my WebObjects project, specifically to my WebServerResources group, my project is called DATest, and hence my woa is DATest.woa. I am referring to them in my html as

	"/WebObjects/DATest.woa/WebServerResources/server.html"

however at runtime I receive the following error

<com.webobjects.appserver._private.WOStaticResourceRequestHandler> Unable to get contents of file for uri. file: /Library/WebServer/ Documents/WebObjects/DATest.woa/WebServerResources/server.html; uri: /WebObjects/DATest.woa/WebServerResources/server.html

I have checked in my woa package and the files are there. How should I be referencing these files ?

TIA

Vincent
_______________________________________________
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


  • Follow-Ups:
    • Re: URI for static html/image
      • From: Vincent Coetzee <email@hidden>
References: 
 >URI for static html/image (From: Vincent Coetzee <email@hidden>)

  • Prev by Date: Re: How to return Response in same context from another thread?
  • Next by Date: Re: URI for static html/image
  • Previous by thread: URI for static html/image
  • Next by thread: Re: URI for static html/image
  • Index(es):
    • Date
    • Thread