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 PROTECTED] 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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/zac%40m29.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to