You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Bruce Altner <ba...@hq.nasa.gov> on 2002/05/09 19:37:18 UTC

Re: #2 .getOutputStream() missing, it's driving me crazy ! another problem!!!!!!!

I have a different but related problem with download, potentially more 
serious. My application spawns several windows after the user logs in and 
one of these is a list of files that the user may download from the NT 
server via smb (jcifs). Unfortunately, if the user logs out in a different 
window this doesn't close the fileList window (we can't use 
Javascript...it's a requirement) so it stays open and even after logging 
out the user (or anyone) can still download files. So I put a conditional 
in my download class which tests for User.hasLoggedIn() and if not, throws 
the user to the login page. HOWEVER, this fails when the user right clicks 
on the file. Apparently this bypasses my if test but I can't figure out 
where else to check for logged in status.

Any ideas?

Thanks,
Bruce


At 10:23 AM 4/19/2002 +0100, you wrote:
>Oh... I was right clicking and then doing saveas from the context menu... that
>always does Download.vm as a filename.
>If I just click on it (well it is a JPG in my case) it just displays it, so I
>suppose I wouldn't see that behaviour.
>
>
>
>"HOLMES, Eric" wrote:
>
> > Yeah, sorry that's right.  In the first dialog box ("Do you want to save or
> > open") the end of the
> > URL is shown.  If you then click 'save' or 'open' the proper file name is
> > displayed in the following dialog.
> >
> > eric
> >
> > -----Original Message-----
> > From: Peter Goode [mailto:peter.goode@mrexcessive.net]
> > Sent: Friday, April 19, 2002 10:50 AM
> > To: Turbine Users List
> > Subject: Re: #2 .getOutputStream() missing, it's driving me crazy !
> > another problem!!!!!!!
> >
> > That doesn't seem to work for me... wasn't expecting it too actually -sry
> > :-)
> >
> > I still get file save dialog (in IE6) come up with filename of 'Download'.
> > Surely the only way to change it is change the link to the download file,
> > because the dialog box
> > is displayed before any data is fetched for the actual download... so the
> > headers arrive too late.
> >
> > P
> >
> > "HOLMES, Eric" wrote:
> >
> > > I do almost the exact same thing (get a file from a database and use 
> a raw
> > > screen to
> > > output it to the browser).  This seems to work for me:
> > >
> > > resp.setHeader("Content-Disposition","attachment; filename=" +
> > doc.getName()
> > > + doc.getExtension());
> > >
> > > the only problem we've run into is when there are '/' in the document
> > name.
> > >
> > > eric
> > >
> > > -----Original Message-----
> > > From: Fabio Daprile [mailto:fabio.daprile@wuerth.it]
> > > Sent: Friday, April 19, 2002 8:51 AM
> > > To: Turbine Users List
> > > Subject: Re: #2 .getOutputStream() missing, it's driving me crazy !
> > > another problem!!!!!!!
> > >
> > > hello Mark,
> > >
> > > i've tried but the problem remains the same.
> > >
> > > thank's anyway.
> > >
> > > bye
> > >
> > > Mark Nutter wrote:
> > >
> > > >Try this:  instead of setting a "filename" header, set your
> > > >Content-Dispostion header as follows:
> > > >
> > > >  resp.setHeader("Content-Disposition", "inline; filename=\"" +
> > > >_attach.getFilename() + "\"");
> > > >
> > > >Mark Nutter
> > > >javadev@linklore.org
> > > >My horoscope says today is a bad day to be superstitious.
> > > >
> > > >On Thu, 2002-04-18 at 06:40, Fabio Daprile wrote:
> > > >
> > > >>Hello,
> > > >>
> > > >>I've another little problem regarding download.
> > > >>I use a RawScreen (Download.vm) and my files are stored in a MySql DB,
> > > >>in a BLOB field.
> > > >>It does work when you only display the file, the problem raises 
> when you
> > > >>try to save this file.
> > > >>
> > > >>hereafter how i call that page:
> > > >>            <a
> > > >>href="$link.setPage("Download.vm").addQueryData("attachid",
> > > >>"$Attachment.getId()")">$Attachment.getFilename()</A>
> > > >>
> > > >>and here how is et the headers:
> > > >>
> > > >>            resp.setContentType(_attach.getContenttype());
> > > >>            resp.setContentLength(_attach.getContent().length);
> > > >>            resp.setHeader("Content-Disposition", "attachment");
> > > >>            resp.setHeader("filename", _attach.getFilename());
> > > >>
> > > >>The name of the file becomes "Download", the realname is lost.
> > > >>
> > > >>How is it possible to keep the name of the file.
> > > >>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >--
> > > >To unsubscribe, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >For additional commands, e-mail:
> > > <ma...@jakarta.apache.org>
> > > >
> > > >
> > > >
> > >
> > > --
> > >
> > > --
> > > Fabio Daprile
> > >
> > > Würth-Phoenix Srl
> > > Via Kravogl 4, I-39100 Bolzano
> > > Tel: +39 0471/564111 - (direct 564070)
> > > Fax: +39 0471/564122
> > >
> > > mailto:fabio.daprile@wuerth-phoenix.com
> > > http://www.wuerth-phoenix.com
> > > http://www.wuerth.com
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: #2 .getOutputStream() missing, it's driving me crazy ! another problem!!!!!!!

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Bruce Altner <ba...@hq.nasa.gov> writes:

> I have a different but related problem with download, potentially more
> serious. My application spawns several windows after the user logs in
> and one of these is a list of files that the user may download from
> the NT server via smb (jcifs). Unfortunately, if the user logs out in
> a different window this doesn't close the fileList window (we can't
> use Javascript...it's a requirement) so it stays open and even after
> logging out the user (or anyone) can still download files. So I put a
> conditional in my download class which tests for User.hasLoggedIn()
> and if not, throws the user to the login page. HOWEVER, this fails
> when the user right clicks on the file. Apparently this bypasses my if
> test but I can't figure out where else to check for logged in status.

I don't understand how a right click would avoid server-side
security...is the link in question to a servlet/CGI?

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: How do I do a correlated subquery in T2.1's Torque?

Posted by Eric Pugh <ep...@upstate.com>.
Thanks,

I ended up using that, and then realized that my need for this weird query
was becase of bad DB design, and fixed that instead!

Eric

-----Original Message-----
From: Eric Dobbs [mailto:eric@dobbse.net]
Sent: Monday, May 13, 2002 3:17 PM
To: Turbine Users List
Subject: Re: How do I do a correlated subquery in T2.1's Torque?


On Thursday, May 9, 2002, at 12:27  PM, Eric Pugh wrote:

> I wanted to be able to do this:
> select * from reaction where reaction_id not in(select reaction_id from
> well)
>
> How do you do a not in() with a select statement vesus just a bunch of
> values?
>
> I'm guessing the Criteria.CUSTOM would work, but is there a better way?

I think Criteria.CUSTOM is your only option in this case.

-Eric

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How do I do a correlated subquery in T2.1's Torque?

Posted by Eric Dobbs <er...@dobbse.net>.
On Thursday, May 9, 2002, at 12:27  PM, Eric Pugh wrote:

> I wanted to be able to do this:
> select * from reaction where reaction_id not in(select reaction_id from
> well)
>
> How do you do a not in() with a select statement vesus just a bunch of
> values?
>
> I'm guessing the Criteria.CUSTOM would work, but is there a better way?

I think Criteria.CUSTOM is your only option in this case.

-Eric

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


How do I do a correlated subquery in T2.1's Torque?

Posted by Eric Pugh <ep...@upstate.com>.
Hi all,

I wanted to be able to do this:
select * from reaction where reaction_id not in(select reaction_id from
well)

How do you do a not in() with a select statement vesus just a bunch of
values?

I'm guessing the Criteria.CUSTOM would work, but is there a better way?

Eric


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>