• 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: Exceptions originting from non-existing DirectActions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exceptions originting from non-existing DirectActions


  • Subject: Re: Exceptions originting from non-existing DirectActions
  • From: Klaus Berkling <email@hidden>
  • Date: Wed, 9 Feb 2011 08:05:55 -0800


On Feb 8, 2011, at 1:49 AM, ute Hoffmann wrote:

Hallo,
I get sometimes Error Messages containing DirectActions which do not exist.

Some of them happen when a page is not yet fully loaded and a _javascript_ is executed
containing a image, then the image appears in a DirectAction call like this:

FusszeielundImpressumaendern_b-poster.jpgAction()

The image is in the page, but the Action not.

Has someone an explanation for this and perhaps a solution to avoid this?

Can one catch a java.lang.reflect.InvocationTargetException and if yes, where should I do this?
In DirectAction.java? In Application?
I would like to catch all Exceptions originating from non-existing DirectAction Calls if possible.


Does this help (in the application class)? From some ancient code I wrote:

    public WOResponse dispatchRequest(WORequest aRequest) {

    try {
    String uri = aRequest.uri();
    String appURLPrefix = aRequest.applicationURLPrefix();
    String reqHandlerKey = aRequest.requestHandlerKey();

    if ( uri.startsWith(appURLPrefix+"/"+reqHandlerKey+"/") &&
    (uri.endsWith(".gif") || uri.endsWith(".jpg") || uri.endsWith(".png")) ) {
    WOResponse imageReplacement = new WOResponse();
    imageReplacement.setStatus(WOResponse.HTTP_STATUS_NOT_FOUND);
    imageReplacement.disableClientCaching();
     return imageReplacement;
    }
    } catch (Exception e) {
    NSLog.err.appendln("Error while checking request for images we don't handle. User likely lost the session.");
    }
return super.dispatchRequest(aRequest);
    }



kib

"Live as if you were to die tomorrow. Learn as if you were to live forever."
Mahatma Gandhi

Klaus Berkling
Web Application Dev. & Systems Administrator
DynEd International, Inc.
www.dyned.com | blog



 _______________________________________________
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

References: 
 >Exceptions originting from non-existing DirectActions (From: ute Hoffmann <email@hidden>)

  • Prev by Date: Re: Exceptions originting from non-existing DirectActions
  • Next by Date: [MEETING] February WO-NoVA NEXT TUESDAY (2/15/2011) at 6:30
  • Previous by thread: Re: Exceptions originting from non-existing DirectActions
  • Next by thread: Re: Exceptions originting from non-existing DirectActions
  • Index(es):
    • Date
    • Thread