You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Paulo Manabe <pm...@gmail.com> on 2008/01/16 22:21:49 UTC

Fileupload like tomcat

I'm trying to upload a file from the server side like tomcat deployment. How
is it? I can create a simple FileInputStream() object declaring the full
path? One doubt is if is posible to tomcat see another computer in the LAN
network and access there files and upload them...

Thanks in advance.

Re: Fileupload like tomcat

Posted by Paulo Manabe <pm...@gmail.com>.
let me try... if you see in the tomcat manager page, you are able to do 2
kind of deployments. The first if you will deploy th war file located on
server and the second if you will deploy a war file from the client side
(You will click the button browse... and them choose the war file...). What
I need to do is like the first. I know where the file is on server and I
would like to read it and them save in the database..... I couldn't
understand
this sintaxe file://C:\some dir\some folder, and how can I read this file
using this path......

Best Regards


> 2008/1/17, Anas Mughal <an...@gmail.com>:
> >
> > Honestly, you are not clear.  Let me try to help.
> >
> > If you are trying to do a file upload to a Tomcat application, consider
> > using commons FileUpload:
> >
> > http://commons.apache.org/fileupload/
> >
> >
> > After the file gets uploaded, your application can save it anywhere that
> > the
> > Tomcat application has write access to.
> >
> >
> > Hope this helps...
> >
> > --
> > Anas Mughal
> >
> >
> >
> >
> >
> > On Jan 16, 2008 4:21 PM, Paulo Manabe <pm...@gmail.com> wrote:
> >
> > > I'm trying to upload a file from the server side like tomcat
> > deployment.
> > > How
> > > is it? I can create a simple FileInputStream() object declaring the
> > full
> > > path? One doubt is if is posible to tomcat see another computer in the
> > LAN
> > > network and access there files and upload them...
> > >
> > > Thanks in advance.
> > >
> >
> >
> >
> > --
> > Anas Mughal
> >
>
>

Re: Fileupload like tomcat

Posted by Anas Mughal <an...@gmail.com>.
What you mean by the client side is the Tomcat Admin Console. Yes, that
would work as well.





On Jan 17, 2008 8:00 AM, Paulo Manabe <pm...@gmail.com> wrote:

> let me try... if you see in the tomcat manager page, you are able to do 2
> kind of deployments. The first if you will deploy th war file located on
> server and the second if you will deploy a war file from the client side
> (You will click the button browse... and them choose the war file...).
> What
> I need to do is like the first. I know where the file is on server and I
> would like to read it and them save in the database..... I could
> understand
> this sintaxe file://C:\some dir\some folder, and how can I read this file
> using this path......
>
> Best Regards
>
> 2008/1/17, Anas Mughal <an...@gmail.com>:
> >
> > Honestly, you are not clear.  Let me try to help.
> >
> > If you are trying to do a file upload to a Tomcat application, consider
> > using commons FileUpload:
> >
> > http://commons.apache.org/fileupload/
> >
> >
> > After the file gets uploaded, your application can save it anywhere that
> > the
> > Tomcat application has write access to.
> >
> >
> > Hope this helps...
> >
> > --
> > Anas Mughal
> >
> >
> >
> >
> >
> > On Jan 16, 2008 4:21 PM, Paulo Manabe <pm...@gmail.com> wrote:
> >
> > > I'm trying to upload a file from the server side like tomcat
> deployment.
> > > How
> > > is it? I can create a simple FileInputStream() object declaring the
> full
> > > path? One doubt is if is posible to tomcat see another computer in the
> > LAN
> > > network and access there files and upload them...
> > >
> > > Thanks in advance.
> > >
> >
> >
> >
> > --
> > Anas Mughal
> >
>



-- 
Anas Mughal

Re: Fileupload like tomcat

Posted by Paulo Manabe <pm...@gmail.com>.
let me try... if you see in the tomcat manager page, you are able to do 2
kind of deployments. The first if you will deploy th war file located on
server and the second if you will deploy a war file from the client side
(You will click the button browse... and them choose the war file...). What
I need to do is like the first. I know where the file is on server and I
would like to read it and them save in the database..... I could understand
this sintaxe file://C:\some dir\some folder, and how can I read this file
using this path......

Best Regards

2008/1/17, Anas Mughal <an...@gmail.com>:
>
> Honestly, you are not clear.  Let me try to help.
>
> If you are trying to do a file upload to a Tomcat application, consider
> using commons FileUpload:
>
> http://commons.apache.org/fileupload/
>
>
> After the file gets uploaded, your application can save it anywhere that
> the
> Tomcat application has write access to.
>
>
> Hope this helps...
>
> --
> Anas Mughal
>
>
>
>
>
> On Jan 16, 2008 4:21 PM, Paulo Manabe <pm...@gmail.com> wrote:
>
> > I'm trying to upload a file from the server side like tomcat deployment.
> > How
> > is it? I can create a simple FileInputStream() object declaring the full
> > path? One doubt is if is posible to tomcat see another computer in the
> LAN
> > network and access there files and upload them...
> >
> > Thanks in advance.
> >
>
>
>
> --
> Anas Mughal
>

Re: Fileupload like tomcat

Posted by Anas Mughal <an...@gmail.com>.
Honestly, you are not clear.  Let me try to help.

If you are trying to do a file upload to a Tomcat application, consider
using commons FileUpload:

http://commons.apache.org/fileupload/


After the file gets uploaded, your application can save it anywhere that the
Tomcat application has write access to.


Hope this helps...

--
Anas Mughal





On Jan 16, 2008 4:21 PM, Paulo Manabe <pm...@gmail.com> wrote:

> I'm trying to upload a file from the server side like tomcat deployment.
> How
> is it? I can create a simple FileInputStream() object declaring the full
> path? One doubt is if is posible to tomcat see another computer in the LAN
> network and access there files and upload them...
>
> Thanks in advance.
>



-- 
Anas Mughal

Re: Fileupload like tomcat

Posted by 栗磊 <th...@gmail.com>.
from the server sie like tomcat to where?


2008/1/17, Paulo Manabe <pm...@gmail.com>:
>
> I'm trying to upload a file from the server side like tomcat deployment.
> How
> is it? I can create a simple FileInputStream() object declaring the full
> path? One doubt is if is posible to tomcat see another computer in the LAN
> network and access there files and upload them...
>
> Thanks in advance.
>



-- 
Lilei
Software Development Group, Computer Center
BYD Company Limited
No.3001, Hengping Road, Pingshan, Longgang, Shenzhen, 518118, P.R.China
Tel: +86-755-89888888
Fax: +86-755-84202222