RE: DownloadAction Application

2005-03-08 Thread Rajaneesh
So the struts upload uses octet stream and the user does not need to worry if the file being uploaded is a binary or ascii! -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 11:44 AM To: Struts Users Mailing List Subject: Re: DownloadAction

Re: DownloadAction Application

2005-03-07 Thread Erik Weber
It depends on what you are using to do the uploading. For example, an FTP system cares. But an application that simply copies bytes from an octet stream doesn't have to care. Erik Rajaneesh wrote: Hi, A basic question! Should a file type(BINARY or ASCII) matter during the upload process? Regard

Re: [OT] Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
I've got file types identified to death (1020 of them and counting). I just need a mapping to the mime types for these file types. I thought this would be easy. Nothing is easy, it seems. I must be missing a piece of something here. Jack On Mon, 07 Mar 2005 20:45:16 -0500, Frank W. Zammetti

Re: DownloadAction Application

2005-03-07 Thread Dakota Jack
-Original Message- > From: Dakota Jack [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 08, 2005 1:22 AM > To: Struts Users Mailing List > Subject: Re: DownloadAction Application > > Yes, this is possible and an interface for doing that is given my my > presentat

RE: DownloadAction Application

2005-03-07 Thread Rajaneesh
Hi, A basic question! Should a file type(BINARY or ASCII) matter during the upload process? Regards Rajaneesh -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 1:22 AM To: Struts Users Mailing List Subject: Re: DownloadAction Application

Re: [OT] Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
Ouch, just a couple, huh?!? No, I don't have anything specific. However... http://www.wotsit.org/ At least that can help you identify the file type, maybe it'll be of some help. Dakota Jack wrote: As an aside, in the download application I am building, I need a map from the extensions fo a file

[OT] Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
As an aside, in the download application I am building, I need a map from the extensions fo a file to the mime type. I have 1020 extensions and have not been able to find such a list. Got any ideas? Jack On Mon, 07 Mar 2005 19:59:50 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Ah, ok.

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
Ah, ok. That makes all the difference then. There still may be problems due to the timing of the session replication, but I would think that would cause all sorts of problems aside from what your doing, so I doubt it's a problem. I think your golden with it this way :) -- Frank W. Zammetti F

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
On Mon, 07 Mar 2005 19:40:27 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Am I correct in my understanding that the monitor that you pull out of > session during the subsequent status check requests use the reference to > the stream object that it holds to check on the status? No that

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
Fair enough. To be perfectly honest, I only begun working in such an environment last year. Most of the time things went off without a hitch, transparent to the app, but every now and again you really get burnt. Case in point: I just migrated an app that was on a single server to the clustere

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
This is not my area, Frank, so I am running a bit on the "what things must be like" gas here. A cluster that does not allow you to have objects that can be updated in session would not be of much use. That is why, after all, you put objects in session. And, the fact that this is a file upload sh

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
Sounds about right :) And like I said before, probably some of my debate comes from not fully understanding what your doing. But, here's where I have some concern... The upload begins and an UploadOutputStream starts it's thing. A Monitor is created, and holds a reference to the stream? (or i

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
The bottom line, Frank, is that the monitor is monitoring another class that is running and reading the upload, viz. UploadOutputStream. I don't know what your setup is, but presumably however you persist the data, this link between the monitor, which is referenced in the output stream wrapper its

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
On Mon, March 7, 2005 3:55 pm, Dakota Jack said: > The point is unavoidable, however, that whatever is persisted is > persisted on a file system somewhere. No argument. But, when you do an an update to a database, there is a layer of abstraction (at least!) between your code and the file system,

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
The point is unavoidable, however, that whatever is persisted is persisted on a file system somewhere. The only difference between modern databases and the old ones is that they have multiple files which are related through some cool logic. Writing to a database is writing to a file system, right

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
far far far off topic... >> >> Regards >> Leon >> >> > -Ursprüngliche Nachricht- >> > Von: Frank W. Zammetti [mailto:[EMAIL PROTECTED] >> > Gesendet: Montag, 7. März 2005 21:14 >> > An: Struts Users Mailing List >> > Betreff: Re: AW

Re: AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
> Actually, Leon, I think it is really relevant and important > to struts uploading. The point I was trying to make, > however, and I think you will agree, is that there has to be > somewhere you put the files if you allow uploading and there > has to be some output stream doing it. That m

Re: AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
> Actually, Leon, I think it is really relevant and important > to struts uploading. The point I was trying to make, > however, and I think you will agree, is that there has to be > somewhere you put the files if you allow uploading and there > has to be some output stream doing it. That m

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
nk W. Zammetti [mailto:[EMAIL PROTECTED] > > Gesendet: Montag, 7. März 2005 21:14 > > An: Struts Users Mailing List > > Betreff: Re: AW: DownloadAction Application > > > > Is that the way it works in your environment Leon? Its not > > the way it works here :) Or an

Re: AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
. Regards Leon > -Ursprüngliche Nachricht- > Von: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 7. März 2005 21:14 > An: Struts Users Mailing List > Betreff: Re: AW: DownloadAction Application > > Is that the way it works in your environment Leon? Its not >

Re: AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
. Regards Leon > -Ursprüngliche Nachricht- > Von: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 7. März 2005 21:14 > An: Struts Users Mailing List > Betreff: Re: AW: DownloadAction Application > > Is that the way it works in your environment Leon? Its not >

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
Yes. I am talking about uploading NOW, but the ORIGINAL question was about downloading. Right? What is OP? Then Leon raised the interesting upload issue. I am finished with the upload application, however and am in the download part now. You are not missing the point. We have switched back a

Re: DownloadAction Application

2005-03-07 Thread Dakota Jack
See within: On Mon, 7 Mar 2005 15:06:08 -0500 (EST), Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > That's kinda cool, but I have a question... How would such a thing work in > a clustered environment? See within: > I presume a browser starts an upload and you simultaneously open a new > win

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
Is that the way it works in your environment Leon? Its not the way it works here :) Or any other clustered environment I've ever worked in. I mean, the express purpose of a clustered environment is to distribute load. If a user hits one server for one request, but then upon making the second re

AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
> Assuming so... in a clustered environment, first of all, > writing to the file system is generally discouraged practice > (although it can be done safely, so let's ignore what might > be best practice for the moment)... but if you do so, since > the upload may start on one server and then the

AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
> Assuming so... in a clustered environment, first of all, > writing to the file system is generally discouraged practice > (although it can be done safely, so let's ignore what might > be best practice for the moment)... but if you do so, since > the upload may start on one server and then the

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
I'm confused... Maybe I misread the OP, but he's talking about uploading, right? That's the part I don't see how you could do. I would agree that this is possible when downloading a file (although still a bit tricky I would think, but possible none the less). I'm probably just all messed up here

Re: AW: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
Just as an additional note, the threshold in the commons fileupload determines when things are written to file, etc. rather than to memory and can be used for various efficiencies. Jack On Mon, 7 Mar 2005 12:05:49 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > Yes, it does, sort of. Check Thre

Re: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
onitor, which can inform the client >> about >> current progress, >> like in a javascript application. >> >> I'm not sure whether the first is possible with the current jsp/servlet >> spec, but the second feature >> should be possible, and is very useful

Re: AW: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
Yes, it does, sort of. Check ThresholdingOutputStream and DeferredFileOutputStream. My UploadOutputStream overrides the write(byte data[], int i, int j) method to monitor the upload. Once you have the hook of the monitor variable in the upload process, you can do whatever you like during the re

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
Don't know about the input stream part too much, Frank, but as you are writing to an output stream, which is the upload application part, you can certainly monitor percentages. I do it as indicated in posts on this thread. Jack On Mon, 7 Mar 2005 14:03:23 -0500 (EST), Frank W. Zammetti <[EMAIL

Re: AW: DownloadAction Application

2005-03-07 Thread Dakota Jack
pt you are akamai-ed, but this > is quite expensive), but you shouldn't make it too easy for them too, right? > > Regards > Leon > > > -Ursprüngliche Nachricht- > > Von: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > > Gesendet: Montag, 7. März 2005 20:0

Re: DownloadAction Application

2005-03-07 Thread Dakota Jack
sp/servlet > spec, but the second feature > should be possible, and is very useful. > > > Regards > Leon > > > -Ursprüngliche Nachricht- > > Von: Dakota Jack [mailto:[EMAIL PROTECTED] > > Gesendet: Montag, 7. März 2005 17:47 > > An: Struts Users

Re: DownloadAction Application

2005-03-07 Thread Dakota Jack
This is true with a proviso. While the stream has to be sent before it can be assessed generally, which is not great, you can do a lot on the server side to manage resources efficiently. You can monitor the upload taking place, and, if you don't like the size, reject it whenever you like. You

Re: AW: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
gt; >> -Ursprüngliche Nachricht- >> Von: Frank W. Zammetti [mailto:[EMAIL PROTECTED] >> Gesendet: Montag, 7. März 2005 20:05 >> An: Struts Users Mailing List >> Betreff: Re: AW: DownloadAction Application >> >> FYI, Commons Fileupload DOES have a m

AW: AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
t; An: Struts Users Mailing List > Betreff: Re: AW: DownloadAction Application > > FYI, Commons Fileupload DOES have a max feature. Not sure > what happens when the max is reached, but its there. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnyt

AW: AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
t; An: Struts Users Mailing List > Betreff: Re: AW: DownloadAction Application > > FYI, Commons Fileupload DOES have a max feature. Not sure > what happens when the max is reached, but its there. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnyt

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
FYI, Commons Fileupload DOES have a max feature. Not sure what happens when the max is reached, but its there. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon, March 7, 2005 1:50 pm, Leon Rosenberg said: >> >> HTML/HTTP doesn't suppor

Re: AW: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
Yep, just not possible to know the size before-hand, as Tim already said (and you knew :)). Even the status monitor you were talking about wouldn't really be possible. Well, not if the intention is to give a REAL status (i.e., percentage complete), for obvious reasons: if you don't know the total

AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
> > HTML/HTTP doesn't support that, IMHO. The type="file"...> tag just grabs the file and starts sending > it. The server has no clue how large the file is until the > entire thing arrives. That is what I know too. And this is ugly. IMHO it's a fat security hole, since it's really easy for a

AW: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
> > HTML/HTTP doesn't support that, IMHO. The type="file"...> tag just grabs the file and starts sending > it. The server has no clue how large the file is until the > entire thing arrives. That is what I know too. And this is ugly. IMHO it's a fat security hole, since it's really easy for a

RE: DownloadAction Application

2005-03-07 Thread Slattery, Tim - BLS
> <2cents> > I would highly appreciate if an "upload" could determine the > size of the file before actually uploading it and reject the > file if it's larger then the given limit, to reduce traffic. HTML/HTTP doesn't support that, IMHO. The tag just grabs the file and starts sending it. The se

Re: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
esendet: Montag, 7. März 2005 17:47 > An: Struts Users Mailing List > Betreff: DownloadAction Application > > I am presently beginning to code a download application to go > with my upload application > (http://wiki.apache.org/struts/StrutsUpload) in Struts, > although I am

Re: DownloadAction Application

2005-03-07 Thread Leon Rosenberg
esendet: Montag, 7. März 2005 17:47 > An: Struts Users Mailing List > Betreff: DownloadAction Application > > I am presently beginning to code a download application to go > with my upload application > (http://wiki.apache.org/struts/StrutsUpload) in Struts, > although I am

Re: DownloadAction Application

2005-03-07 Thread Dakota Jack
Thanks, Frank. Works for your application for sure, because I downloaded the file and I assume you are using your application! ///;-) On Mon, 7 Mar 2005 12:49:23 -0500 (EST), Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > I'm not 100% sure it's applicable to what your doing, but... > > http://

Re: DownloadAction Application

2005-03-07 Thread Frank W. Zammetti
I'm not 100% sure it's applicable to what your doing, but... http://www.zammetti.com/downloadapp.zip This was a sample webapp I wrote when Martin added the DownloadAction some time ago. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Mon

DownloadAction Application

2005-03-07 Thread Dakota Jack
I am presently beginning to code a download application to go with my upload application (http://wiki.apache.org/struts/StrutsUpload) in Struts, although I am not initially trying to combine them. That will be a part of refactoring. Does anyone have any code or ideas out there they would suggest