• 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: pageWithName in a same session
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pageWithName in a same session


  • Subject: Re: pageWithName in a same session
  • From: Jean-François Veillette <email@hidden>
  • Date: Tue, 23 Nov 2004 11:47:51 -0500

do not invoke appendtoresponse yourself, use generateResponse() instead.

WOComponent thePage = component.pageWithName("MyXMLPage");
WOResponse theResponse = thePage.generateResponse();
NSData theData = theResponse.content();

- jfv

Le 04-11-23, à 10:44, Sébastien Gruhier a écrit :

Hi,

I have a page that generates an XML file. I would like to be able to generate this page and get the XML result in a file but in the same session ID.
I have done this, but it's executed in a new session:

WOComponent thePage = component.pageWithName("MyXMLPage");


WOResponse theResponse = new WOResponse();
WORequest theRequest = new WORequest("HEAD", "", "HTTP/1.1", null, null, null);
WOContext theContext = new WOContext(theRequest);
thePage.appendToResponse(theResponse,theContext);
NSData theData = theResponse.content();

I tried to change the new WOContext(theRequest) by session().context() it works but the session is messed with my XML page.
Any idea to do it properly?

Thank you
Sebastien _______________________________________________
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

References: 
 >pageWithName in a same session (From: Sébastien Gruhier <email@hidden>)

  • Prev by Date: RE: pageWithName in a same session
  • Next by Date: Re: pageWithName in a same session
  • Previous by thread: pageWithName in a same session
  • Next by thread: RE: pageWithName in a same session
  • Index(es):
    • Date
    • Thread