• 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: Zac Konopa <email@hidden>
  • Date: Thu, 23 Mar 2006 15:48:15 -0800

Hey Andrew,

I appreciate the response. Wanted to let you know that I did get things working. Your URL trick helped a lot. As for the image, I hear you on the images in the db thing. While that is a discussion entirely it's own it only kind of works in my case. Your right about pulling the BLOB from the db and the WOImage and mime type and all that, unfortunately I can't use the data directly because it's being referred to by a src tag in a static component (in my case an embed tag, the image is the movie poster that click to open the quicktime player). What I wound up doing was using the url string to refer to a directAction as the src attribute of the embed tag. This directAction then serves up the image by converting it from the blob in the DB.

Thx again,

Zac
On Mar 22, 2006, at 5:30 PM, email@hidden wrote:

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

_______________________________________________ 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: 
 >Re: Application URL (From: email@hidden)

  • Prev by Date: Re: Thanks and Comments
  • Next by Date: Re: Problem of Building project converted from Objective C
  • Previous by thread: Re: Application URL
  • Next by thread: New Web Components failing to compile?
  • Index(es):
    • Date
    • Thread