Child pages
  • Development-UrlCreation
Skip to end of metadata
Go to start of metadata

WOContext

The WOContext object is used to shepherd a request through the application and then back out to the user. It is also responsible for creation of URL's within the application server. So as the the response is being generated, the application will ask the context to generate URLs back into itself.

Example URLs

The WOContext has a number of methods on itself to generate URLs back into the application server. Here the author has tested the generation of those URLs so it can be seen what is created by each method under different usages. These examples have been produced with WebObjects 5.4.

A - completeURLWithRequestHandlerKey(..)

completeURLWithRequestHandlerKey(
  WOApplication.application().directActionRequestHandlerKey(),
  "default",
  "a=b",
  context().request().isSecure(),
  0);

B - completeURLWithRequestHandlerKey(..)

completeURLWithRequestHandlerKey(
  "123",
  WOApplication.application().directActionRequestHandlerKey(),
  "default",
  "a=b",
  context().request().isSecure(),
  0);

C - componentActionURL(..)

componentActionURL()

Session

Deployment

Secure

Generated URL

Y

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/wo/V4N99Ub2Zjavh6V3tvcEQM/0.15

N

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/wo/zBXy58rwSW6aU1mTXVk9uw/0.11

Y

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/wo/KMU4YqMibJ4p8XP0biSYDw/0.15

N

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/wo/TxKR0vkbs8Z0tGsUfrGlQ0/0.15

Y

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/wo/3bmlqBLMVGzjmuW1wTPTZw/0.15

N

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/wo/z3uRsfT27ZsKLvlcS4Bkx0/0.15

D - componentActionURL(..)

componentActionURL(WOApplication.application().ajaxRequestHandlerKey())

Session

Deployment

Secure

Generated URL

Y

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/ja/V4N99Ub2Zjavh6V3tvcEQM/0.11

N

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/ja/zBXy58rwSW6aU1mTXVk9uw/0.13

Y

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/ja/KMU4YqMibJ4p8XP0biSYDw/0.11

N

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/ja/TxKR0vkbs8Z0tGsUfrGlQ0/0.11

Y

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/ja/3bmlqBLMVGzjmuW1wTPTZw/0.11

N

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/ja/z3uRsfT27ZsKLvlcS4Bkx0/0.11

E - componentActionURL(..)

componentActionURL(
  WOApplication.application().ajaxRequestHandlerKey(),
  context().request().isSecure())

Session

Deployment

Secure

Generated URL

Y

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/ja/V4N99Ub2Zjavh6V3tvcEQM/0.13

N

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/ja/zBXy58rwSW6aU1mTXVk9uw/0.15

Y

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/ja/KMU4YqMibJ4p8XP0biSYDw/0.13

N

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/ja/TxKR0vkbs8Z0tGsUfrGlQ0/0.13

Y

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/ja/3bmlqBLMVGzjmuW1wTPTZw/0.13

N

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/ja/z3uRsfT27ZsKLvlcS4Bkx0/0.13

F - directActionURLForActionNamed(..)

directActionURLForActionNamed(
  "default",
  new NSDictionary<String,Object>(new Object[] {"b"}, new String[] {"a"}),
  context().request().isSecure(),
  true);

Session

Deployment

Secure

Generated URL

Y

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b&wosid=V4N99Ub2Zjavh6V3tvcEQM

N

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b

Y

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/wa/default?a=b&wosid=KMU4YqMibJ4p8XP0biSYDw

N

wotaskd

N

/cgi-bin/WebObjects/UT.woa/wa/default?a=b

Y

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/wa/default?a=b&wosid=3bmlqBLMVGzjmuW1wTPTZw

N

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/wa/default?a=b

G - directActionURLForActionNamed(..)

directActionURLForActionNamed(
  "default",
  new NSDictionary<String,Object>(new Object[] {"b"}, new String[] {"a"}))

Session

Deployment

Secure

Generated URL

Y

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b&wosid=V4N99Ub2Zjavh6V3tvcEQM

N

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b

Y

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/wa/default?a=b&wosid=KMU4YqMibJ4p8XP0biSYDw

N

wotaskd

N

/cgi-bin/WebObjects/UT.woa/wa/default?a=b

Y

wotaskd

Y

{{

http://server/cgi-bin/WebObjects/UT.woa/1/wa/default?a=b&wosid=3bmlqBLMVGzjmuW1wTPTZw

}}

N

wotaskd

Y

{{

http://server/cgi-bin/WebObjects/UT.woa/wa/default?a=b

}}

H - urlWithRequestHandlerKey(..)

urlWithRequestHandlerKey(
  WOApplication.application().ajaxRequestHandlerKey(),
  "default",
  "a=b")

Session

Deployment

Secure

Generated URL

Y

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/ja/default?a=b

N

Dev

N

/cgi-bin/WebObjects/TestUrlCreation.woa/ja/default?a=b

Y

wotaskd

N

/cgi-bin/WebObjects/UT.woa/1/ja/default?a=b

N

wotaskd

N

/cgi-bin/WebObjects/UT.woa/ja/default?a=b

Y

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/1/ja/default?a=b

N

wotaskd

Y

/cgi-bin/WebObjects/UT.woa/ja/default?a=b

  • No labels