• 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: Application URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application URL


  • Subject: Re: Application URL
  • From: email@hidden
  • Date: Thu, 23 Mar 2006 13:30:41 +1200

Hello Zac;

Hey all, I'm wondering if there is a built in function that will give you the absolute URL of the web application. I've seen the applicationBaseURL () function but that isn't giving me enough information. I need the whole URL directly to the web app.

From something like a component you should be able to do this...

	String url = context().urlWithRequestHandlerKey(
		WOApplication.application().directActionRequestHandlerKey(),
		"default",
		null);

To make it a little clearer I'm vending an image from a DB with WebObjects, and I want to be able to refer to that image in the app itself. This way I can use a static image tag and point it's src attribute at the URL refering to a directAction that pulls the image from the DB and sends

There is a lot of discussion here from time to time about images in databases so I won't comment on that, but if you properly model your BLOB from the database then you can simply bind this from an EO to the "data" binding on WOImage and set the "mimeType" binding to something like "image/jpeg", it will render the image on the page. Sometimes this is not the right approach to use for various reasons, but it often is.


cheer.

___
Andrew Lindesay
www.lindesay.co.nz



_______________________________________________
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: Application URL
      • From: Zac Konopa <email@hidden>
  • Prev by Date: Application URL
  • Next by Date: Re: Static versus non-Static methods?
  • Previous by thread: Application URL
  • Next by thread: Re: Application URL
  • Index(es):
    • Date
    • Thread