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/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to