HI ALL,
Can somebody tell me why this code below dosen't seem to work??
I could be missing something here.
Its a simple attempt to grab a href value and store it as a session variable.
Then retrieve the session variable value on the target page's ON_BEFORE_DISPLAY_EVENT.
public int hrefOfferID_onWebEvent(CSpWebEvent event)
{
int command = PROCEED;
command = doAction(event);
CSpValue cspvOfferID = CSpider.getWebVar("doSPSelect.hrefOfferID");
CSpider.putUserSessionObject("ssOfferID", cspvOfferID);
CSpLog.send(this, CSpLog.CRITICAL,
CSpider.getWebVar("doSPSelect.hrefOfferID"));
return(command);
}
I tried to see what was being passed as the CGI name value pair and it seemed to be
okay
Here is the URL string
http://24.0.21.70:2080/cgi-bin/ndCGI.exe/MSOAdminDraft10/
pgSPSelection.hrefOfferID_onWebEvent(hrefOfferID)?hrefOfferID=1280%2e0&
/* this is what i am looking for - hrefOfferID = 1280 */
/* string contd..*/
SPIDERSESSION=%3f%3f%3f%3f%3f%5f%3f%3f%3f%40%5b%3f%3f%3f%3fBOs
%5cH%3f%3f%3f%3f%3f%3f%3f%3f%3fLaHv%3fhfnKz%7c%7b%5f%3f%3f%3fPC%3fIQLGGpobQ%
40a%7dXoDeQaxG%5bC%60k%3fUsWX%60loQqLGJRSbQFCWSFdGG%40PxTvobHOWiDqXLYPHyBQ%
7bL%5e%40KuOaxU%5c%3ftwXvtIND%5cp%5brpAYf%3fLPehLHotGGs%5fbECg%7dOFsJQFtgGs%5fbEC%
7blPfloJvLJRUXU%5cSg%7bRFXONotTPO%5cp%5csgdRTpkEuH%7bCvcbECGyPUoaQAKiGS%5fbECGlTvtpDcXgRbtk%
5e%60GkBVXmXf%40VR%40hSYu%5beSVdFASxpSuXCQt%5bmCa%60%3fJT%5cp%5b%40%60E%5cADGGp%
60LHqKW%5bPXEYAXGGqWQJ%3ftsOatV%5eS%3flREhOIT%5cISADR%5cEgkSDpmXf%40VUadE%5eE%
5beSVdFASxpSuXCQt%5bmCa%60%3fJT%5cp%5b%40%60E%5cCsfEAKdQAG&%5euniqueValue=930025844315
The above code bombs with an error as follows:
On the page where i try to get the user session value - which seems to be null
spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing: Unexpected
exception from an event (java.lang.NullPointerException). This is when
invoking method this_onBeforeDisplayEvent for event spider.event.CSpDisplayEvent
[ON_BEFORE_DISPLAY_EVENT] on pgPreview:
spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing: Unexpected
Exception (java.lang.NullPointerException) caught. Top of stack:
|java.lang.NullPointerException at spider.util.CSpLog._log(Compiled Code) at
|spider.util.CSpLog.send(Compiled Code) at
and that is explained below .. bcos the getWebVar returned a null value!!
spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing: Unexpected
exception from an event (java.lang.NullPointerException). This is when
invoking method hrefOfferID_onWebEvent for event
spider.event.CSpWebEvent[ON_BEFORE_WEB_EVENT,
Method=MSOAdminDraft10.pgSPSelection.hrefOfferID_onWebEvent (hrefOfferID)] on
spider.visual.CSpHref:
spider.event.adapters.CSpPageEventAdapter.relayGenericEventProcessing: Unexpected
Exception (java.lang.NullPointerException) caught. Top of stack:
|java.lang.NullPointerException at
|MSOAdminDraft10.pgSPSelection.hrefOfferID_onWebEvent(pgSPSelection.java:80) at
Thanx in advance for all who take time to review the code.
- Art
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]