tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chiang <alan.chi...@gmail.com>
Subject Re: .pst file type unknown in tomcat
Date Tue, 31 May 2005 20:44:55 GMT
If you want the Open or Save as dialogue box use

res.setHeader("Content-Disposition", "attachment; filename=" + filename);

Essentially, you will want to add the header "Content-Disposition:
attachment; filename=<SOME_FILE_NAME>" into the response.  This can be
achieved through your servlet using the above code (calling the
addHeader method of the response object), or if you are using Tomcat's
Default Servlet to serve the files (ie, putting them in some folder
and getting Tomcat to list the contents of the folder, etc) then you
can use a Filter to add this header before its sent back to the
client.

Hope this helps



On 5/31/05, Marot Laurent <laurent.marot@alliacom.com> wrote:
> 
> Many thanks to all.
> 
> But one thing i'd like to do is to alert user with "Open" or "Save file as 
> ...." prompt when he clicks on the link instead of opening it as ASCII/byte 
> stream in the pop-up ( just as it does with .zip files)
> 
> LM
> 
> 
> -----Message d'origine-----
> De : Phillip Qin [mailto:Phillip.Qin@shareowner.com]
> Envoyé : mardi 31 mai 2005 15:11
> À : 'Tomcat Users List'
> Objet : RE: .pst file type unknown in tomcat
> 
> PST from what I understand is Microsoft Personal Folder file. You shall 
> always be able to right click on the link and choose Save As in IE or Save 
> Target As in firefox.
> 
> -----Original Message-----
> From: Philippe Johan [mailto:Johan.Philippe@realsoftware.be]
> Sent: May 31, 2005 8:49 AM
> To: Marot Laurent; Tomcat Users List
> Subject: RE: .pst file type unknown in tomcat
> 
> 
> There's nothing that's available really:
> 
> http://filext.com/detaillist.php?extdetail=pst
> 
> Even Microsoft did not provide a type (it is even missing in the registry
> definition of .pst).
> 
> 
> Johan Philippe
> Real Software
> http://www.realsoftwaregroup.com/
> 
> 
> -----Original Message-----
> From: Marot Laurent [mailto:laurent.marot@alliacom.com]
> Sent: maandag 30 mei 2005 22:50
> To: Tomcat Users List
> Subject: RE: .pst file type unknown in tomcat
> 
> I don't know what to put in the mime-type attribute
> 
> <mime-mapping>
> <extension>pss</extension>
> <mime-type>?????????????????</mime-type>
> </mime-mapping>
> 
> -----Message d'origine-----
> De : George Sexton [mailto:gsexton@mhsoftware.com]
> Envoyé : lundi 30 mai 2005 22:44
> À : 'Tomcat Users List'
> Objet : RE: .pst file type unknown in tomcat
> 
> > .pst file mime type is not decalred by default in web.xml
> 
> So, why don't you declare it?
> 
> George Sexton
> MH Software, Inc.
> http://www.mhsoftware.com/
> Voice: 303 438 9585
> 
> 
> > -----Original Message-----
> > From: Marot Laurent [mailto:laurent.marot@alliacom.com]
> > Sent: Monday, May 30, 2005 2:33 PM
> > To: Tomcat Users List
> > Subject: .pst file type unknown in tomcat
> >
> >
> > Hi all,
> >
> > I'm trying to manage .pst files stored on my Tomcat server. But
> > unfortunately when i click on a pst file link it opens the file in a
> > pop-up (an of course content is not readable). How could i pevent
> > tomcat from serving the file this way but better propose do save it
> > on user's local disk ?
> >
> > .pst file mime type is not decalred by default in web.xml
> >
> >
> > Thanks a lot
> >
> > Laurent
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> !DSPAM:429c5d5d251411085324931!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message