Hannes Wallnoefer | 5 Jun 11:03
Picon
Favicon
Gravatar

Re: file upload monitoring

I've added a hook for file upload monitoring to the helma servlet: If
there is a upload_id parameter in the query string, the upload status
is tracked in the user's session. You can get it via
session.getUploadStatus(uploadId). There's a demo page here:

http://dev.helma.org/wiki/Upload+Demo/

I think it doesn't work with Safari currently, maybe somebody can look
into this.

However, the really big news is that uploads are no longer passed in
memory. helma.util.MimePart can now wrap a DiskFileItem from
commons-fileupload, and you can read its content from an InputStream
instead of a byte array. I'm in the process of documenting all this at

http://dev.helma.org/wiki/HTTP+Parameter+and+File+Upload+Enhancements+in+Helma+1.6/

hannes

2007/5/31, kRAkEn/gORe <kunitoki <at> gmail.com>:
> already done
>
> On 5/31/07, Hannes Wallnoefer <hannes <at> helma.at> wrote:
> > 2007/5/31, kRAkEn/gORe <kunitoki <at> gmail.com>:
> > > cool,
> > > since i'm basically quite new to helma, where should i look for
> > > attaching this listener  to the common helma upload internal class,
> > > and maybe let it trigger a session.onFileUploadProgress() found in the
> > > application scripts ?
> >
(Continue reading)

kRAkEn/gORe | 5 Jun 11:14
Picon
Gravatar

Re: file upload monitoring

gr8 thanx ! you rocks... i'm looking the example you provided, seems
pretty cool !

any chance to get the callbacks onSessionStart / onSessionStop as the
others callbacks already present onStart / onStop ?

On 6/5/07, Hannes Wallnoefer <hannes <at> helma.at> wrote:
> I've added a hook for file upload monitoring to the helma servlet: If
> there is a upload_id parameter in the query string, the upload status
> is tracked in the user's session. You can get it via
> session.getUploadStatus(uploadId). There's a demo page here:
>
> http://dev.helma.org/wiki/Upload+Demo/
>
> I think it doesn't work with Safari currently, maybe somebody can look
> into this.
>
> However, the really big news is that uploads are no longer passed in
> memory. helma.util.MimePart can now wrap a DiskFileItem from
> commons-fileupload, and you can read its content from an InputStream
> instead of a byte array. I'm in the process of documenting all this at
>
> http://dev.helma.org/wiki/HTTP+Parameter+and+File+Upload+Enhancements+in+Helma+1.6/
>
> hannes
>
> 2007/5/31, kRAkEn/gORe <kunitoki <at> gmail.com>:
> > already done
> >
> > On 5/31/07, Hannes Wallnoefer <hannes <at> helma.at> wrote:
(Continue reading)

Jonathan Puckey | 5 Jun 13:48

Re: file upload monitoring

It works fine here in Safari 2.0.4
Nice addition!

> I've added a hook for file upload monitoring to the helma servlet: If
> there is a upload_id parameter in the query string, the upload status
> is tracked in the user's session. You can get it via
> session.getUploadStatus(uploadId). There's a demo page here:
>
> http://dev.helma.org/wiki/Upload+Demo/
>
> I think it doesn't work with Safari currently, maybe somebody can look
> into this.
>
> However, the really big news is that uploads are no longer passed in
> memory. helma.util.MimePart can now wrap a DiskFileItem from
> commons-fileupload, and you can read its content from an InputStream
> instead of a byte array. I'm in the process of documenting all this at
>
> http://dev.helma.org/wiki/HTTP+Parameter+and+File+Upload 
> +Enhancements+in+Helma+1.6/
>
> hannes
>
> 2007/5/31, kRAkEn/gORe <kunitoki <at> gmail.com>:
>> already done
>>
>> On 5/31/07, Hannes Wallnoefer <hannes <at> helma.at> wrote:
>>> 2007/5/31, kRAkEn/gORe <kunitoki <at> gmail.com>:
>>>> cool,
>>>> since i'm basically quite new to helma, where should i look for
(Continue reading)

Hannes Wallnoefer | 6 Jun 11:49
Picon
Favicon
Gravatar

Re: file upload monitoring

2007/6/5, Jonathan Puckey <me <at> jonathanpuckey.com>:
> It works fine here in Safari 2.0.4
> Nice addition!

I see it now working somewhat with my local Safari tester here (Mr.
Rinner), but the progress bar flickers and looses its border while
uploading. Anyway, I'm leaving the CSS subtleties for someone else to
fix.

hannes

> > I've added a hook for file upload monitoring to the helma servlet: If
> > there is a upload_id parameter in the query string, the upload status
> > is tracked in the user's session. You can get it via
> > session.getUploadStatus(uploadId). There's a demo page here:
> >
> > http://dev.helma.org/wiki/Upload+Demo/
> >
> > I think it doesn't work with Safari currently, maybe somebody can look
> > into this.
> >
> > However, the really big news is that uploads are no longer passed in
> > memory. helma.util.MimePart can now wrap a DiskFileItem from
> > commons-fileupload, and you can read its content from an InputStream
> > instead of a byte array. I'm in the process of documenting all this at
> >
> > http://dev.helma.org/wiki/HTTP+Parameter+and+File+Upload
> > +Enhancements+in+Helma+1.6/
> >
> > hannes
(Continue reading)

Hannes Wallnoefer | 6 Jun 11:56
Picon
Favicon
Gravatar

Re: onSessionStart / onSessionEnd

2007/5/31, kRAkEn/gORe <kunitoki <at> gmail.com>:
> just wondering, any possibility to have these added in the repository ?
> i need to know when a new session is started up and when it is
> released (freeing any associated maps generated by my map engine).

The problem I see with your patch is that the functions are not
invoked with the actual session. That's because
RequestEvaluator.invokeInternal() (and invokeDirectFunction(), which
would probably be a better choice in this case, because it runs the
function in the caller thread) only install a dummy session in the JS
scope (only invokeHttp() uses an actual HTTP user session).

The easiest way to fix this would be to simply pass the session as
argument to the function.

Apart from that, I'm still unsure about the additional overhead of
these two callbacks. Helma creates a new session for each request,
regardless of whether it is actually accessed. I'd really like to get
an idea about session fluctuation on some real site like antville.org.

What about other users? Does anybody else have a need for these callbacks?

hannes

> thanx
>
> _______________________________________________
> Helma-user mailing list
> Helma-user <at> helma.org
> http://helma.org/mailman/listinfo/helma-user
(Continue reading)

kRAkEn/gORe | 6 Jun 12:15
Picon
Gravatar

Re: onSessionStart / onSessionEnd

yeah i know, this is the update version.
it works on my side, and a new session ISN't created for every
request. i've tested widely (adding stuff to session.data in the
onSessionStart) and it works ok. i can see it calling on a new request
that don't have a session already allocated, and after the timeout, it
calls the cleanup onSessionEnd. you can't put complex things in that,
but i just needed a function to get told when a new session starts so
i can fill session things up (basically a map engine), and let the map
engine clean up when the session end, freeing up the remaining files
previously allocated by the user

lucio

On 6/6/07, Hannes Wallnoefer <hannes <at> helma.at> wrote:
> 2007/5/31, kRAkEn/gORe <kunitoki <at> gmail.com>:
> > just wondering, any possibility to have these added in the repository ?
> > i need to know when a new session is started up and when it is
> > released (freeing any associated maps generated by my map engine).
>
> The problem I see with your patch is that the functions are not
> invoked with the actual session. That's because
> RequestEvaluator.invokeInternal() (and invokeDirectFunction(), which
> would probably be a better choice in this case, because it runs the
> function in the caller thread) only install a dummy session in the JS
> scope (only invokeHttp() uses an actual HTTP user session).
>
> The easiest way to fix this would be to simply pass the session as
> argument to the function.
>
> Apart from that, I'm still unsure about the additional overhead of
(Continue reading)

Phil Hagelberg | 8 Jun 18:56

Moving objects to XML


So I was setting up my blog with Helma, and I kind of assumed that I
should connect it to a MySQL database because that's what I'd always
done with past web applications. But it seems helma's built-in XML
database is pretty good and easier to work with and back up. I've got
all my hopobjects currently in MySQL; is there a quick and easy way to
transfer all my hopobjects from MySQL into the embedded XML database?

-Phil
Aaron B. Iba | 10 Jun 01:03
Picon
Favicon

application-wide error action?

Newbie question: is there a way to set an application-wide error
action that will render all 404s, 500s, etc.?  I can't seem to find
anything in the documentation.

Aaron
kRAkEn/gORe | 11 Jun 11:53
Picon
Gravatar

Re: file upload monitoring

hi,
i've tried your code, but with multiple inputs file i don't know how
to save them separately.
cause if i got 2 input files named "key", i've tried do
req.data["key"][0] and req.data["key"][1] but helma tells me that

    Java class "helma.util.MimePart" has no public instance field or
method named "0".

how will i get data from req.data, when multiple defined keywords are
present in the post/get ?
kRAkEn/gORe | 11 Jun 11:57
Picon
Gravatar

Re: file upload monitoring

ah, sorry... stepping accurately through documentation, i found it :)

On 6/11/07, kRAkEn/gORe <kunitoki <at> gmail.com> wrote:
> hi,
> i've tried your code, but with multiple inputs file i don't know how
> to save them separately.
> cause if i got 2 input files named "key", i've tried do
> req.data["key"][0] and req.data["key"][1] but helma tells me that
>
>     Java class "helma.util.MimePart" has no public instance field or
> method named "0".
>
> how will i get data from req.data, when multiple defined keywords are
> present in the post/get ?
>

Gmane