WebApplictions-Development-UrlCreation

Version 19.1 by Andrew Lindesay on 2008/07/05 01:10

h1 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.

h2 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.

h3 Development Mode

This is the case where the application is being developed in, for example, Eclipse;

MethodResult with SessionResult with No Session
context().completeURLWithRequestHandlerKey(
    WOApplication.application().directActionRequestHandlerKey(),
    "default",
    "a=b",
    context().request().isSecure(),
    0);
http://hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=bhttp://hebe.local:54791/cgi-bin/WebObjects/TestUrlCreation.woa/wa/default?a=b