WARequestContextNotFound - where to look for a context?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

WARequestContextNotFound - where to look for a context?

Schwab,Wilhelm K
I am trying to create anchors that will "dynamically" serve pdf documents.  The archive in question is way too big for a FileLibrary and a separate web server is probably overkill since I intend to do all of this locally and would rather not have to run Apache on the machines in question (security paranoia or laziness, take your pick<g>) .  So, I was hoping to create mime documents on the fly.

I found suggestions such as:

    component session requestContext respond:[ :response |
        response
            document:self getPdfBytes
            mimeType: 'application/pdf'
            fileName: 'seaside-test.pdf';
            doNotCache

I don't see #getPdfBytes, but suspect I can wing it given the file names in anchors.

The problem is that everything I ask for a requestContext feigns ignorance.  I can't even get #session because of the same error.  I am using Seaside 3 from the Pharo 1.3 image and Seaside downstream project.

Any suggestions?

Bill


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WARequestContextNotFound - where to look for a context?

mmimica
I don't understand what you have been doing wrong. "WACurrenrRequestContext value" will always be available if you are inside a callback or rendering - virtually anywhere in Seaside. Wherever you have a WAComponent you can also send #session to it.

On 15 March 2012 18:34, Schwab,Wilhelm K <[hidden email]> wrote:
I am trying to create anchors that will "dynamically" serve pdf documents.  The archive in question is way too big for a FileLibrary and a separate web server is probably overkill since I intend to do all of this locally and would rather not have to run Apache on the machines in question (security paranoia or laziness, take your pick<g>) .  So, I was hoping to create mime documents on the fly.

I found suggestions such as:

    component session requestContext respond:[ :response |
        response
            document:self getPdfBytes
            mimeType: 'application/pdf'
            fileName: 'seaside-test.pdf';
            doNotCache

I don't see #getPdfBytes, but suspect I can wing it given the file names in anchors.

The problem is that everything I ask for a requestContext feigns ignorance.  I can't even get #session because of the same error.  I am using Seaside 3 from the Pharo 1.3 image and Seaside downstream project.

Any suggestions?

Bill


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside




--
Milan Mimica
http://sparklet.sf.net

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WARequestContextNotFound - where to look for a context?

Paul DeBruicker
In reply to this post by Schwab,Wilhelm K
On 12-03-15 10:34 AM, Schwab,Wilhelm K wrote:
> .  The archive in question is way too big for a FileLibrary and a
> separate web server is probably overkill since I intend to do all of
> this locally and would rather not have to run Apache on the machines in
> question (security paranoia or laziness,


You can serve static files from disk with Comanche if you want.  See:

http://samadhiweb.com/blog/2011.07.10.seaside.comanche.staticfiles.html


for configuration ideas.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside