You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Massie <da...@jario.com> on 2003/08/06 10:34:38 UTC

uploadfile path

I am trying to upload a file using html:file which is received as a
FormFile, the problem is I need to find out this files absolute path. Hwo
can I retrieve this information?

Thanks
Daniel


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


Re: uploadfile path

Posted by Dan Tran <da...@hotmail.com>.
as I have said, you need to do extra work to save your upload data to your
designated server file.

Here is an example

   ImportForm theForm = (ImportForm) form;

   FormFile file = theForm.getTheFile();
   String fileName= file.getFileName();
   String encoding = theForm.getEncoding();
   String separator  = theForm.getSeparator();
   String memberType = theForm.getMemberType();

   InputStream inputStream = file.getInputStream();
   Charset charset = Charset.forName(encoding);
   BufferedReader reader = new BufferedReader( new
InputStreamReader(inputStream, charset) );

  // do your save here

-D

----- Original Message ----- 
From: "Daniel Massie" <da...@jario.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, August 06, 2003 8:57 AM
Subject: RE: uploadfile path


> thats exactly what has happened to me, and if i cant cast to DiskFile
there
> isn't much information i can retrieve
>
> -----Original Message-----
> From: Yansheng Lin [mailto:yansheng.lin@isogis.com]
> Sent: 06 August 2003 16:41
> To: 'Struts Users Mailing List'
> Subject: RE: uploadfile path
>
>
> I had a problem using DiskFile when upgrading to 1.1 though.  Somehow you
> cannot
> convert/cast a FormFile to DiskFile anymore...  I think there was a post
to
> dev
> list about this too.  It brings down your production code!!!
>
> -----Original Message-----
> From: Alok Tijoriwala [mailto:alok_31_1973@yahoo.com]
> Sent: August 6, 2003 9:33 AM
> To: Struts Users Mailing List
> Subject: Re: uploadfile path
>
>
> Hi Danielle,
>
> You will have to use the DiskFile class which
> implements the FormFile interface.
>  In the struts-config.xml , your controller
> configuration should be as under:
> <controller
> processorClass="com.abnamro.waf.struts.WAFRequestProcessor"
> tempDir="/upload" maxFileSize="10K"
> multipartClass="org.apache.struts.upload.DiskMultipartRequestHandler">
> <set-property property="inputForward" value="true"/>
> </controller>
>
> Regards
> Alok
> --- Dan Tran <da...@hotmail.com> wrote:
> > Folow the Struts upload example, you can trace thru
> > how Struts gets the
> > client file and upload to server where you have to
> > do extra work to copy
> > data from FormFile (its stream buffer)  to the your
> > choice of server
> > location.
> >
> > -Dan
> >
> > ----- Original Message -----
> > From: "Yansheng Lin" <ya...@isogis.com>
> > To: "'Struts Users Mailing List'"
> > <st...@jakarta.apache.org>
> > Sent: Wednesday, August 06, 2003 8:18 AM
> > Subject: RE: uploadfile path
> >
> >
> > >     <html:form method="POST"
> > enctype="multipart/form-data">
> > >         <html:file property="theFile" />
> > >     </html:form>
> > >
> > > theFile is type of FormFile.  You can go from
> > there.
> > >
> > > -----Original Message-----
> > > From: Daniel Massie
> > [mailto:daniel.massie@jario.com]
> > > Sent: August 6, 2003 2:35 AM
> > > To: Struts Users Mailing List
> > > Subject: uploadfile path
> > >
> > >
> > > I am trying to upload a file using html:file which
> > is received as a
> > > FormFile, the problem is I need to find out this
> > files absolute path. Hwo
> > > can I retrieve this information?
> > >
> > > Thanks
> > > Daniel
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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


RE: uploadfile path

Posted by Daniel Massie <da...@jario.com>.
thats exactly what has happened to me, and if i cant cast to DiskFile there
isn't much information i can retrieve

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@isogis.com]
Sent: 06 August 2003 16:41
To: 'Struts Users Mailing List'
Subject: RE: uploadfile path


I had a problem using DiskFile when upgrading to 1.1 though.  Somehow you
cannot
convert/cast a FormFile to DiskFile anymore...  I think there was a post to
dev
list about this too.  It brings down your production code!!!

-----Original Message-----
From: Alok Tijoriwala [mailto:alok_31_1973@yahoo.com]
Sent: August 6, 2003 9:33 AM
To: Struts Users Mailing List
Subject: Re: uploadfile path


Hi Danielle,

You will have to use the DiskFile class which
implements the FormFile interface.
 In the struts-config.xml , your controller
configuration should be as under:
<controller
processorClass="com.abnamro.waf.struts.WAFRequestProcessor"
tempDir="/upload" maxFileSize="10K"
multipartClass="org.apache.struts.upload.DiskMultipartRequestHandler">
		<set-property property="inputForward" value="true"/>
	</controller>

Regards
Alok
--- Dan Tran <da...@hotmail.com> wrote:
> Folow the Struts upload example, you can trace thru
> how Struts gets the
> client file and upload to server where you have to
> do extra work to copy
> data from FormFile (its stream buffer)  to the your
> choice of server
> location.
>
> -Dan
>
> ----- Original Message -----
> From: "Yansheng Lin" <ya...@isogis.com>
> To: "'Struts Users Mailing List'"
> <st...@jakarta.apache.org>
> Sent: Wednesday, August 06, 2003 8:18 AM
> Subject: RE: uploadfile path
>
>
> >     <html:form method="POST"
> enctype="multipart/form-data">
> >         <html:file property="theFile" />
> >     </html:form>
> >
> > theFile is type of FormFile.  You can go from
> there.
> >
> > -----Original Message-----
> > From: Daniel Massie
> [mailto:daniel.massie@jario.com]
> > Sent: August 6, 2003 2:35 AM
> > To: Struts Users Mailing List
> > Subject: uploadfile path
> >
> >
> > I am trying to upload a file using html:file which
> is received as a
> > FormFile, the problem is I need to find out this
> files absolute path. Hwo
> > can I retrieve this information?
> >
> > Thanks
> > Daniel
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


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



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


RE: uploadfile path

Posted by Yansheng Lin <ya...@isogis.com>.
The way it worked before was that you could specify a FormFile field in your
form and cast it to DiskFile right away in your Action class.  If you can get
hold of an old upload-example.war, you would see the example uses DiskFile,
which is totally different from current example.  Now you cannot do that
anymore.  Problem being casting CommonsMultipart to DiskMultipart doesn't work
anymore.

Now you need an extra step, which is what you posted(a beautiful solution btw, I
overlooked:)
	<controller 
		processorClass="com.abnamro.waf.struts.WAFRequestProcessor"
		tempDir="/upload" maxFileSize="10K"
	
multipartClass="org.apache.struts.upload.DiskMultipartRequestHandler">
	
		   <set-property property="inputForward" value="true"/>
	</controller>


-----Original Message-----
From: Alok Tijoriwala [mailto:alok_31_1973@yahoo.com] 
Sent: August 6, 2003 9:47 AM
To: Struts Users Mailing List
Subject: RE: uploadfile path


Hi Yan,

I have been using the DiskFile with struts1.1. Works
fine. I would be glad if you can give me more details
on the problem.

regards
Alok
--- Yansheng Lin <ya...@isogis.com> wrote:
> I had a problem using DiskFile when upgrading to 1.1
> though.  Somehow you cannot
> convert/cast a FormFile to DiskFile anymore...  I
> think there was a post to dev
> list about this too.  It brings down your production
> code!!!
> 
> -----Original Message-----
> From: Alok Tijoriwala
> [mailto:alok_31_1973@yahoo.com] 
> Sent: August 6, 2003 9:33 AM
> To: Struts Users Mailing List
> Subject: Re: uploadfile path
> 
> 
> Hi Danielle,
> 
> You will have to use the DiskFile class which
> implements the FormFile interface.
>  In the struts-config.xml , your controller
> configuration should be as under:
> <controller
>
processorClass="com.abnamro.waf.struts.WAFRequestProcessor"
> tempDir="/upload" maxFileSize="10K"
>
multipartClass="org.apache.struts.upload.DiskMultipartRequestHandler">
> 		<set-property property="inputForward"
> value="true"/>
> 	</controller>
> 
> Regards
> Alok
> --- Dan Tran <da...@hotmail.com> wrote:
> > Folow the Struts upload example, you can trace
> thru
> > how Struts gets the
> > client file and upload to server where you have to
> > do extra work to copy
> > data from FormFile (its stream buffer)  to the
> your
> > choice of server
> > location.
> > 
> > -Dan
> > 
> > ----- Original Message ----- 
> > From: "Yansheng Lin" <ya...@isogis.com>
> > To: "'Struts Users Mailing List'"
> > <st...@jakarta.apache.org>
> > Sent: Wednesday, August 06, 2003 8:18 AM
> > Subject: RE: uploadfile path
> > 
> > 
> > >     <html:form method="POST"
> > enctype="multipart/form-data">
> > >         <html:file property="theFile" />
> > >     </html:form>
> > >
> > > theFile is type of FormFile.  You can go from
> > there.
> > >
> > > -----Original Message-----
> > > From: Daniel Massie
> > [mailto:daniel.massie@jario.com]
> > > Sent: August 6, 2003 2:35 AM
> > > To: Struts Users Mailing List
> > > Subject: uploadfile path
> > >
> > >
> > > I am trying to upload a file using html:file
> which
> > is received as a
> > > FormFile, the problem is I need to find out this
> > files absolute path. Hwo
> > > can I retrieve this information?
> > >
> > > Thanks
> > > Daniel
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


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


RE: uploadfile path

Posted by Alok Tijoriwala <al...@yahoo.com>.
Hi Yan,

I have been using the DiskFile with struts1.1. Works
fine. I would be glad if you can give me more details
on the problem.

regards
Alok
--- Yansheng Lin <ya...@isogis.com> wrote:
> I had a problem using DiskFile when upgrading to 1.1
> though.  Somehow you cannot
> convert/cast a FormFile to DiskFile anymore...  I
> think there was a post to dev
> list about this too.  It brings down your production
> code!!!
> 
> -----Original Message-----
> From: Alok Tijoriwala
> [mailto:alok_31_1973@yahoo.com] 
> Sent: August 6, 2003 9:33 AM
> To: Struts Users Mailing List
> Subject: Re: uploadfile path
> 
> 
> Hi Danielle,
> 
> You will have to use the DiskFile class which
> implements the FormFile interface.
>  In the struts-config.xml , your controller
> configuration should be as under:
> <controller
>
processorClass="com.abnamro.waf.struts.WAFRequestProcessor"
> tempDir="/upload" maxFileSize="10K"
>
multipartClass="org.apache.struts.upload.DiskMultipartRequestHandler">
> 		<set-property property="inputForward"
> value="true"/>
> 	</controller>
> 
> Regards
> Alok
> --- Dan Tran <da...@hotmail.com> wrote:
> > Folow the Struts upload example, you can trace
> thru
> > how Struts gets the
> > client file and upload to server where you have to
> > do extra work to copy
> > data from FormFile (its stream buffer)  to the
> your
> > choice of server
> > location.
> > 
> > -Dan
> > 
> > ----- Original Message ----- 
> > From: "Yansheng Lin" <ya...@isogis.com>
> > To: "'Struts Users Mailing List'"
> > <st...@jakarta.apache.org>
> > Sent: Wednesday, August 06, 2003 8:18 AM
> > Subject: RE: uploadfile path
> > 
> > 
> > >     <html:form method="POST"
> > enctype="multipart/form-data">
> > >         <html:file property="theFile" />
> > >     </html:form>
> > >
> > > theFile is type of FormFile.  You can go from
> > there.
> > >
> > > -----Original Message-----
> > > From: Daniel Massie
> > [mailto:daniel.massie@jario.com]
> > > Sent: August 6, 2003 2:35 AM
> > > To: Struts Users Mailing List
> > > Subject: uploadfile path
> > >
> > >
> > > I am trying to upload a file using html:file
> which
> > is received as a
> > > FormFile, the problem is I need to find out this
> > files absolute path. Hwo
> > > can I retrieve this information?
> > >
> > > Thanks
> > > Daniel
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


RE: uploadfile path

Posted by Yansheng Lin <ya...@isogis.com>.
I had a problem using DiskFile when upgrading to 1.1 though.  Somehow you cannot
convert/cast a FormFile to DiskFile anymore...  I think there was a post to dev
list about this too.  It brings down your production code!!!

-----Original Message-----
From: Alok Tijoriwala [mailto:alok_31_1973@yahoo.com] 
Sent: August 6, 2003 9:33 AM
To: Struts Users Mailing List
Subject: Re: uploadfile path


Hi Danielle,

You will have to use the DiskFile class which
implements the FormFile interface.
 In the struts-config.xml , your controller
configuration should be as under:
<controller
processorClass="com.abnamro.waf.struts.WAFRequestProcessor"
tempDir="/upload" maxFileSize="10K"
multipartClass="org.apache.struts.upload.DiskMultipartRequestHandler">
		<set-property property="inputForward" value="true"/>
	</controller>

Regards
Alok
--- Dan Tran <da...@hotmail.com> wrote:
> Folow the Struts upload example, you can trace thru
> how Struts gets the
> client file and upload to server where you have to
> do extra work to copy
> data from FormFile (its stream buffer)  to the your
> choice of server
> location.
> 
> -Dan
> 
> ----- Original Message ----- 
> From: "Yansheng Lin" <ya...@isogis.com>
> To: "'Struts Users Mailing List'"
> <st...@jakarta.apache.org>
> Sent: Wednesday, August 06, 2003 8:18 AM
> Subject: RE: uploadfile path
> 
> 
> >     <html:form method="POST"
> enctype="multipart/form-data">
> >         <html:file property="theFile" />
> >     </html:form>
> >
> > theFile is type of FormFile.  You can go from
> there.
> >
> > -----Original Message-----
> > From: Daniel Massie
> [mailto:daniel.massie@jario.com]
> > Sent: August 6, 2003 2:35 AM
> > To: Struts Users Mailing List
> > Subject: uploadfile path
> >
> >
> > I am trying to upload a file using html:file which
> is received as a
> > FormFile, the problem is I need to find out this
> files absolute path. Hwo
> > can I retrieve this information?
> >
> > Thanks
> > Daniel
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


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


Re: uploadfile path

Posted by Alok Tijoriwala <al...@yahoo.com>.
Hi Danielle,

You will have to use the DiskFile class which
implements the FormFile interface.
 In the struts-config.xml , your controller
configuration should be as under:
<controller
processorClass="com.abnamro.waf.struts.WAFRequestProcessor"
tempDir="/upload" maxFileSize="10K"
multipartClass="org.apache.struts.upload.DiskMultipartRequestHandler">
		<set-property property="inputForward" value="true"/>
	</controller>

Regards
Alok
--- Dan Tran <da...@hotmail.com> wrote:
> Folow the Struts upload example, you can trace thru
> how Struts gets the
> client file and upload to server where you have to
> do extra work to copy
> data from FormFile (its stream buffer)  to the your
> choice of server
> location.
> 
> -Dan
> 
> ----- Original Message ----- 
> From: "Yansheng Lin" <ya...@isogis.com>
> To: "'Struts Users Mailing List'"
> <st...@jakarta.apache.org>
> Sent: Wednesday, August 06, 2003 8:18 AM
> Subject: RE: uploadfile path
> 
> 
> >     <html:form method="POST"
> enctype="multipart/form-data">
> >         <html:file property="theFile" />
> >     </html:form>
> >
> > theFile is type of FormFile.  You can go from
> there.
> >
> > -----Original Message-----
> > From: Daniel Massie
> [mailto:daniel.massie@jario.com]
> > Sent: August 6, 2003 2:35 AM
> > To: Struts Users Mailing List
> > Subject: uploadfile path
> >
> >
> > I am trying to upload a file using html:file which
> is received as a
> > FormFile, the problem is I need to find out this
> files absolute path. Hwo
> > can I retrieve this information?
> >
> > Thanks
> > Daniel
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


RE: uploadfile path

Posted by Daniel Massie <da...@jario.com>.
its only the original file's location that i require, i can't find any
mention of how to aquire this in any online articles.

-----Original Message-----
From: Dan Tran [mailto:danttran@hotmail.com]
Sent: 06 August 2003 16:24
To: Struts Users Mailing List
Subject: Re: uploadfile path


Folow the Struts upload example, you can trace thru how Struts gets the
client file and upload to server where you have to do extra work to copy
data from FormFile (its stream buffer)  to the your choice of server
location.

-Dan

----- Original Message -----
From: "Yansheng Lin" <ya...@isogis.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Wednesday, August 06, 2003 8:18 AM
Subject: RE: uploadfile path


>     <html:form method="POST" enctype="multipart/form-data">
>         <html:file property="theFile" />
>     </html:form>
>
> theFile is type of FormFile.  You can go from there.
>
> -----Original Message-----
> From: Daniel Massie [mailto:daniel.massie@jario.com]
> Sent: August 6, 2003 2:35 AM
> To: Struts Users Mailing List
> Subject: uploadfile path
>
>
> I am trying to upload a file using html:file which is received as a
> FormFile, the problem is I need to find out this files absolute path. Hwo
> can I retrieve this information?
>
> Thanks
> Daniel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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



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


Re: uploadfile path

Posted by Dan Tran <da...@hotmail.com>.
Folow the Struts upload example, you can trace thru how Struts gets the
client file and upload to server where you have to do extra work to copy
data from FormFile (its stream buffer)  to the your choice of server
location.

-Dan

----- Original Message ----- 
From: "Yansheng Lin" <ya...@isogis.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Wednesday, August 06, 2003 8:18 AM
Subject: RE: uploadfile path


>     <html:form method="POST" enctype="multipart/form-data">
>         <html:file property="theFile" />
>     </html:form>
>
> theFile is type of FormFile.  You can go from there.
>
> -----Original Message-----
> From: Daniel Massie [mailto:daniel.massie@jario.com]
> Sent: August 6, 2003 2:35 AM
> To: Struts Users Mailing List
> Subject: uploadfile path
>
>
> I am trying to upload a file using html:file which is received as a
> FormFile, the problem is I need to find out this files absolute path. Hwo
> can I retrieve this information?
>
> Thanks
> Daniel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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


RE: uploadfile path

Posted by Yansheng Lin <ya...@isogis.com>.
    <html:form method="POST" enctype="multipart/form-data">
        <html:file property="theFile" />
    </html:form>

theFile is type of FormFile.  You can go from there.

-----Original Message-----
From: Daniel Massie [mailto:daniel.massie@jario.com] 
Sent: August 6, 2003 2:35 AM
To: Struts Users Mailing List
Subject: uploadfile path


I am trying to upload a file using html:file which is received as a
FormFile, the problem is I need to find out this files absolute path. Hwo
can I retrieve this information?

Thanks
Daniel


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


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