stateholder object in a filter - Websphere

This is a discussion on stateholder object in a filter - Websphere ; Hi, I am trying to keep a stack of the last x requests made in Websphere portal (v6.011) To do this, i created a filter in the wps application which listens on both /portal/* and /myportal/* when I am processing ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: stateholder object in a filter

  1. stateholder object in a filter

    Hi,

    I am trying to keep a stack of the last x requests made in Websphere portal (v6.011)
    To do this, i created a filter in the wps application which listens on both /portal/* and /myportal/*
    when I am processing the servletRequest, it gives an exception saying that the stateHolder object could not be found in the request.

    I tought that the stateHolder object would already be available at that time? or am I missing something?

    Thanks ,
    Manuel

  2. Re: stateholder object in a filter

    are you holding onto the requests objects? or the actual url string?

    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: stateholder object in a filter

    I am using following code:
    HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;
    HttpServletResponse httpServletResponse = (HttpServletResponse) servletResponse;

    //get the current state from the request.
    StateHolder stateHolder = null;
    try {
    stateHolder = StateHelper.getCurrentState(httpServletRequest);
    } catch (UnknownAccessorTypeException exception) {
    log.error("UnknownAccessorTypeException",exception);
    } catch (CannotInstantiateAccessorException exception) {
    log.error("CannotInstantiateAccessorException",exception);
    } catch (StateNotInRequestException exception) {
    log.error("StateNotInRequestException",exception);
    } catch (StateManagerException exception) {
    log.error("StateManagerException",exception);
    }

    and this is the error message I receive (in dutch)
    com.ibm.portal.state.accessors.exceptions.StateAtt ributeNotInRequestException:EJPEI0056E: Het kenmerk com.ibm.portal.state.accessors.StateAccessor is niet in aanvraag com.ibm.ws.webcontainer.srt.SRTServletRequest@4762 c78f aangetroffen.

    translated:
    The reference com.ibm.portal.state.accessors.StateAccessor was not found in request com.ibm.ws.webcontainer.srt.SRTServletRequest@4762 c78f

    Would keeping the actual url string be equally good?

  4. Re: stateholder object in a filter

    well, holding onto the request across more than one request is not going to work. the state can be rebuilt from the url

    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  5. Re: stateholder object in a filter

    Hi, is there something that describes how to decode the url?


  6. Re: stateholder object in a filter

    What are you looking for from the decode URLs?


    Ryan

    SCJP & SCWCD
    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

+ Reply to Thread