cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Uithol" <ja...@datacodex.net>
Subject How to Obtain HttpRequest interface in 2.0.2 ?
Date Tue, 02 Jul 2002 01:28:23 GMT
We have upgraded from Cocoon 2.0.1 to Cocoon 2.0.2

One of our transformers can no longer handle internal requests.  The code
that fails is:

public void setup(SourceResolver resolver, Map objectModel, String src,
Parameters par)
  throws SAXException, ProcessingException, IOException
{
    Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);

    // This line here gets a ClassCastException.
    HttpRequest hreq = (HttpRequest)request;

    Session session = hreq.getSession();

    Context context = (Context)objectModel.get(Constants.CONTEXT_OBJECT);

    handler.setInputs(session, request, context);
}


The hreq variable is not used anywhere else.  It seems to be only for
getting the session.  What method do I use for getting the session for
internal requests ( in 2.0.2 ) ?


Thanks in advance,


Jason Uithol
Data Technologist
DatacodeX Pty Ltd
jason@datacodex.com
http://www.datacodex.com


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message