struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "elyes sallem" <elyes.sal...@gmail.com>
Subject Re: get file path from FormFile
Date Tue, 16 Dec 2008 15:24:59 GMT
ok, for the upload, i saved the file on the server
so i create a tmp file in this directory
"servlet.getServletContext().getRealPath("/")"
is it ok for the place , or i must create temporary file in an other
location? if not OK, where do i have to create them?

Thanks
Regards
Elyes






2008/12/16 Nils-Helge Garli Hegvik <nilsga@gmail.com>

> So... are you:
>
> 1) Trying to upload a file to the server?
> 2) Trying to send a file the browser?
> 3) Both?
>
> If 1) See if http://wiki.apache.org/struts/StrutsFileUpload can help.
> If your API only accepts a file path, save the file as a temp file
> locally on the server.
> If 2) The solution has been provided to you in your previous thread:
> Stream the file content to the browser.
> If 3) See 1) and 2)
>
> Nils-H
>
> On Tue, Dec 16, 2008 at 2:09 PM, elyes sallem <elyes.sallem@gmail.com>
> wrote:
> > to avoid any confusion,
> > all i want to do is that :
> > 1- i have data in a file, so through the formfile, i get the file path
> (now
> > i make the test locally, but after it will be deployed on a server) and i
> > load this data in a database, depending on the file's meta data, and its
> > content
> > 2- i allow the user to make some select , with some condition
> > after setting his condition, through the interface (in the final it is a
> > select with conditions ...)
> > i allow the user to exports this data in an excel file
> > that's all
> > the trt of parsing the file metadata, and content , is done
> > the trt of export data in an excel file based on a select is done
> > now i have to make some choices of loading the  file , and saving the
> excel
> > file
> > i wish that it was clear
> > furthermore,
> > yes Dave , this is my proposition
> > have you a better idea?
> > as for the proposition to use servlet link, it was not clear
> >
> > Regards
> > Elyes
> >
> >
> > 2008/12/16 Dave Newton <newton.dave@yahoo.com>
> >
> >> --- On Tue, 12/16/08, elyes sallem wrote:
> >> > this library, take as input a file and depending on this
> >> > file's metadata generates tables in a database and make trt
> >> > after this (so as a constraint, i can't modify the class in
> >> > this jar)
> >>
> >> So... you're *uploading* a file to the server (from the user of the
> browser
> >> to the web application)??? Then you need to save the FormFile locally
> and
> >> use *that* path when you call your library methods.
> >>
> >> Dave
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > Elyes.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Elyes.

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