Re: Short URL Generation
Re: Short URL Generation
- Subject: Re: Short URL Generation
- From: Chuck Hill <email@hidden>
- Date: Wed, 26 Oct 2005 22:22:50 -0700
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@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden