Hi!

  WO does that for you. Just call:

String url = context().completeURLWithRequestHandlerKey("wa", directActionName, args, false, 0);

(check the documentation, I don't remember what are all the arguments used for)

The url var will contain a full URL for your application, including the current instance number. Also, note that when you open a direct action URL without any session argument (wosid), the instance number is just a tip for the Apadptor/Load Balancer. The Adaptor may not follow that suggestion (specially if the requested instance does not exist any more!).

  Yours

Miguel Arroz

On 2006/07/25, at 10:29, Robert Campbell wrote:

Hi All,

Does anyone know how I can get the application instance number? - I need to programmatically construct URLs that contain the application instance number for load balancing e.g. for the URL http://www.mydomain.com/cgi-bin/WebObjects/ myapp.woa/1/wa/nextPage? I need to insert the application instance number between "http:// www.mydomain.com/cgi-bin/WebObjects/myapp.woa/" and "/wa/nextPage?" I've gone through all the documentation and can obtain just about every other application property but can't get the instance ID. Any gurus out there know how it can be done?

Rob.
_______________________________________________
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/arroz% 40guiamac.com

This email sent to [EMAIL PROTECTED]


      "GUERRA E' PAZ
       LIBERDADE E' ESCRAVIDAO
       IGNORANCIA E' FORCA"       -- 1984

Miguel Arroz
http://www.ipragma.com



_______________________________________________
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