You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by davargas123 <da...@gmail.com> on 2009/12/23 16:56:10 UTC

Struts 1.2.x and File I/O

Is it necessary to upload a file to the server to process it in Struts, or
does it have access to the local file system? I was getting errors in my
code when it was attempting to use the file from my local machine, but if I
upload it to the server first and use the file from the server, it works
okay. That led me to wonder if it was just me messing up the code, or Struts
only seeing the directories on the server on which it is installed, and
that's what I want to know.

Thanks,
Dan
-- 
View this message in context: http://old.nabble.com/Struts-1.2.x-and-File-I-O-tp26903855p26903855.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 1.2.x and File I/O

Posted by vineith kaul <vi...@gmail.com>.
Related to this file upload thing , I am using the struts2 file upload.I
know struts2 file-upload deletes the uploaded temp file.From a security
stand point, do we still need to validate the input file (for bad input) or
the fact that it got deleted should take of everything?

Thanks!
Kaul

On Wed, Dec 23, 2009 at 11:09 AM, Dan Vargas <da...@gmail.com> wrote:

> Ok, that's what I had figured, thanks.
>
> 2009/12/23 Paweł Wielgus <po...@gmail.com>
>
> > Hi Dan,
> > struts see only files on server,
> > so if You want to do something with a local file You have to upload it
> > to the server.
> > Also it's not struts related, all HTTP based solutions behave that way.
> >
> > Best greetings,
> > Pawel Wielgus
> >
> > 2009/12/23, davargas123 <da...@gmail.com>:
> > >
> > > Is it necessary to upload a file to the server to process it in Struts,
> > or
> > > does it have access to the local file system? I was getting errors in
> my
> > > code when it was attempting to use the file from my local machine, but
> if
> > I
> > > upload it to the server first and use the file from the server, it
> works
> > > okay. That led me to wonder if it was just me messing up the code, or
> > Struts
> > > only seeing the directories on the server on which it is installed, and
> > > that's what I want to know.
> > >
> > > Thanks,
> > > Dan
> > > --
> > > View this message in context:
> > >
> http://old.nabble.com/Struts-1.2.x-and-File-I-O-tp26903855p26903855.html
> > > Sent from the Struts - User mailing list archive at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: Struts 1.2.x and File I/O

Posted by Dan Vargas <da...@gmail.com>.
Ok, that's what I had figured, thanks.

2009/12/23 Paweł Wielgus <po...@gmail.com>

> Hi Dan,
> struts see only files on server,
> so if You want to do something with a local file You have to upload it
> to the server.
> Also it's not struts related, all HTTP based solutions behave that way.
>
> Best greetings,
> Pawel Wielgus
>
> 2009/12/23, davargas123 <da...@gmail.com>:
> >
> > Is it necessary to upload a file to the server to process it in Struts,
> or
> > does it have access to the local file system? I was getting errors in my
> > code when it was attempting to use the file from my local machine, but if
> I
> > upload it to the server first and use the file from the server, it works
> > okay. That led me to wonder if it was just me messing up the code, or
> Struts
> > only seeing the directories on the server on which it is installed, and
> > that's what I want to know.
> >
> > Thanks,
> > Dan
> > --
> > View this message in context:
> > http://old.nabble.com/Struts-1.2.x-and-File-I-O-tp26903855p26903855.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Struts 1.2.x and File I/O

Posted by Paweł Wielgus <po...@gmail.com>.
Hi Dan,
struts see only files on server,
so if You want to do something with a local file You have to upload it
to the server.
Also it's not struts related, all HTTP based solutions behave that way.

Best greetings,
Pawel Wielgus

2009/12/23, davargas123 <da...@gmail.com>:
>
> Is it necessary to upload a file to the server to process it in Struts, or
> does it have access to the local file system? I was getting errors in my
> code when it was attempting to use the file from my local machine, but if I
> upload it to the server first and use the file from the server, it works
> okay. That led me to wonder if it was just me messing up the code, or Struts
> only seeing the directories on the server on which it is installed, and
> that's what I want to know.
>
> Thanks,
> Dan
> --
> View this message in context:
> http://old.nabble.com/Struts-1.2.x-and-File-I-O-tp26903855p26903855.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org