Re: Intercepting (ERX/WO)DirectActionRequestHandler
Re: Intercepting (ERX/WO)DirectActionRequestHandler
- Subject: Re: Intercepting (ERX/WO)DirectActionRequestHandler
- From: Lon Varscsak <email@hidden>
- Date: Fri, 23 Oct 2009 14:20:26 -0700
Look at the "reason" variable, you can do something conditionally
based on that. I compare the reason to
WOActionRequestHandler.CLASS_NOT_FOUND and
WOActionRequestHandler.INVOCATION and then redirect to the default DA.
-Lon
On Fri, Oct 23, 2009 at 1:54 PM, Johnny Miller <email@hidden> wrote:
> I get these errors all day long and it drives me nuts.
>
> java.lang.IllegalStateException:
> <er.extensions.appserver.ERXDirectActionRequestHandler> Couldn't locate
> action class named 'google-analytics.com'.
> at
> com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:286)
> at
> com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
> at
> er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:124)
> at
> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
> at
> er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1802)
> at
> er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1767)
> at
> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
> at
> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
> at java.lang.Thread.run(Thread.java:613)
>
> Any suggestions on how to filter these out using an overridden
> handleActionRequestError? i.e. should I just regex the error message and if
> it contains 'google-analytics' throw it out?
>
> I have about a half dozen other Google bot errors that plague me on a daily
> basis.
>
> Thanks in advance,
>
> Johnny
>
>
>
> On Oct 22, 2009, at 3:24 PM, Jon Nolan wrote:
>
>> Chuck Hill wrote:
>>>
>>> On Oct 22, 2009, at 4:17 PM, Jon Nolan wrote:
>>>
>>>> Hi,
>>>>
>>>> Is there a preferred way to intercept request handling so as to avoid
>>>> messages such as the one below:
>>>>
>>>> Oct 22 17:00:59 MyApp[54589] (ERXApplication.java:1516) ERROR
>>>> er.extensions.appserver.ERXApplication - Exception caught:
>>>> <er.extensions.appserver.ERXDirectActionRequestHandler> Couldn't locate
>>>> action class named 'images'.
>>>>
>>>> I know why the request URL is bad and there's nothing I can do about
>>>> that. What I would like to do is return something like
>>>> MyDirectActionSubclass.handleMalformedActionRequestAction() with specialized
>>>> behavior.
>>>
>>>
>>> You would need to write your own request handler for that. The intended
>>> way is to implement this in your Application class:
>>>
>>> public WOResponse handleActionRequestError(WORequest aRequest, Exception
>>> exception, String reason, WORequestHandler aHandler, String actionClassName,
>>> String actionName, Class actionClass, WOAction actionInstance)
>>> and look for a "ClassNotFoundError" as the reason.
>>>
>>>
>>> Chuck
>>
>> Perfect. Thanks Chuck.
>>
>> _______________________________________________
>> 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
>
> Johnny Miller
> Kahalawai Media Corp
> w: www.kahalawai.com
> e: email@hidden
> p: 808.661.7962
>
> _______________________________________________
> 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
>
_______________________________________________
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