Re: Dealing with URLs length
Re: Dealing with URLs length
- Subject: Re: Dealing with URLs length
- From: Chuck Hill <email@hidden>
- Date: Tue, 10 Oct 2006 13:07:31 -0700
On Oct 9, 2006, at 9:06 AM, Cantin Benoit wrote:
Dear WO users,
I am dealing with my applications URL length. For different
reasons, it can't be longer than 100 characters. So I am wondering
how to shorten my URLs but :
- without using Apache rewrite_mod ;
- and without modifying my Direct Actions names.
Those are some severe restrictions.
Is there a way to remove /cgi-bin/WebObjects/my_app_name.woa from
WebObjects applications default URL with these constraints ?
You can't remove all of it. You can shorten /cgi-bin/ and /
my_app_name.woa to something like
/w/WebObjects/a.woa
I have read that you can change cgi-bin in /System/Library/
WebObjects/Adaptors/Apache/apache.conf, but that you can't remove /
WebObjects/. Is that true ? Are there any other ways to do it ?
You can do it, but you need to edit the adaptor source to do so.
That might be more effort than it is worth to get rid of 9 characters.
/w/o/a.woa
You would also need to create a WOContext subclass or use some
other method to generate the URLs.
Some other ideas:
1. Make aliases for direct actions:
public WOActionResults mrlnAction() {
return myRatherLongNameAction();
}
So you can use a.woa/wa/mrln instead of a.woa/wa/myRatherLongName but
both will still work
2. Use cookies to store the session ID and instance number if you are
not doing this already.
Chuck
--
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