• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems with login and multiple instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with login and multiple instances


  • Subject: Re: Problems with login and multiple instances
  • From: Mark Wardle <email@hidden>
  • Date: Mon, 11 Apr 2011 00:31:33 +0100

Writing to a mailing list is always therapeutic, even before anyone
has a chance to respond.

At present, I'm performing just-in-time login and looking at
context().request().uri().  (ie
setDestinationUrl(context().request().uri());

I'm storing that URI and then redirecting after successful login. I
think that's the problem.

Instead, I'm going to try this (as yet untested in deployment):

	public void setDestinationFromRequest(WORequest request) {
		StringBuilder sb = new StringBuilder();
		sb.append(request.adaptorPrefix());
		sb.append('/');
		sb.append(request.applicationName());
		sb.append(".woa/");
		if (request.applicationNumber() < 0) {
			sb.append(request.applicationNumber());
			sb.append('/');
		}
		if (ERXStringUtilities.stringIsNullOrEmpty(request.requestHandlerKey())
== false) {
			sb.append(request.requestHandlerKey());
			sb.append('/');
		}
		if (ERXStringUtilities.stringIsNullOrEmpty(request.requestHandlerPath())
== false) {
			sb.append(request.requestHandlerPath());
		}
		if (ERXStringUtilities.stringIsNullOrEmpty(request.queryString()) == false) {
			sb.append('?');
			sb.append(request.queryString());
		}
		log.debug("URI: " + request.uri());
		log.debug("prefix: " + request.adaptorPrefix());
		log.debug("appname: " + request.applicationName());
		log.debug("appnumber: " + request.applicationNumber());	// will be
-1 if can be handled by any
		log.debug("request handler key: " + request.requestHandlerKey());
		log.debug("request handler path: " + request.requestHandlerPath());
		log.debug("qs: " + request.queryString());
		log.debug("safely parsed destination URL: " + sb.toString());
		setDestinationUrl(sb.toString());
	}

Now whenever I start hacking URLs like this in WebObjects, I think I'm
clearly going about something the wrong way. Doesn't anyone else
perform DA and component JIT by redirecting to a login page and then
redirecting back to the original URL? With the above code, I'm hoping
to remove all record of the application instance (unless its a minus
one in which case one needs in when in direct connect/development).

Is this the solution?

Mark
 _______________________________________________
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

  • Follow-Ups:
    • Re: Problems with login and multiple instances
      • From: Chuck Hill <email@hidden>
References: 
 >Problems with login and multiple instances (From: Mark Wardle <email@hidden>)

  • Prev by Date: Problems with login and multiple instances
  • Next by Date: Re: Problems with login and multiple instances
  • Previous by thread: Problems with login and multiple instances
  • Next by thread: Re: Problems with login and multiple instances
  • Index(es):
    • Date
    • Thread