Lachlan,

Methinks you have read it backwards. :-) I think Greg is asking how to get the short URLs into the HTML his app generates. Overriding WOContext is one way of doing it. I've pondered this a few times but never did so. Another alternative is to use regex to replace them in Application.dispatchRequest(). So far, my solution has been to make a URL factory class and bind that to the href etc attribute instead of binding to action.

Chuck


On Oct 26, 2005, at 10:16 PM, Lachlan Deck wrote:

Hi there,

On 27/10/2005, at 2:01 PM, Greg Hulands wrote:


I am looking to generate short URL's that I have created for mod_rewrite


I thought that was the idea of mod-rewrite. i.e., it translates urls for you e.g., from external short urls to internal long ones. So if you've set up your rewrite rules correctly, you shouldn't need to do much else.


for direct actions. After reading the docs, it looks like I have to create a subclass of WOContext and over ride the directActionURLForActionNamed method and have a map from a direct action class / method to a shortened url. I just wanted to ask to see if this is the best way to achieve this.


If you want to customise the way that incoming requests are handled, then you'd be looking at overriding WORequestHandler so that they are directed correctly.

I've, for example, extended com.webobjects.appserver._private.WODirectActionRequestHandler so that I can call:
    http://.../wa/SomeClass/action

where my direct action classes are named, for easy reference in the project, like SomeClassDirectAction.java

with regards,
--

Lachlan Deck


_______________________________________________
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/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________
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