Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 04.10.2004, 20:24   #1
Дошкольник
 
Join Date: 08 2004
Location: Oxford
Age: 38
Posts: 141
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default JSP & Servlets

Ya tolko nedavno nachal rabotat s JSP, i natolknulsa na problemu: kak mozhno na servere poluchit dostup k faylu, uploadnutomu s pomoshyu HTML (input, style="file")?
Reply With Quote
Old 04.10.2004, 22:00   #2
Магистр
 
svoy's Avatar
 
Join Date: 11 2003
Location: heart of europe
Age: 38
Posts: 718
Downloads: 41
Uploads: 0
Reputation: 11 | 3
Default

tak naizust' ne pomynu u menya ebooki bili gdeto esli xochesh' poishu!
Reply With Quote
Old 05.10.2004, 11:11   #3
Дошкольник
 
Join Date: 08 2004
Location: Oxford
Age: 38
Posts: 141
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Da, budu neskazanno blagodaren
Reply With Quote
Old 05.10.2004, 12:16   #4
Магистр
 
svoy's Avatar
 
Join Date: 11 2003
Location: heart of europe
Age: 38
Posts: 718
Downloads: 41
Uploads: 0
Reputation: 11 | 3
Default

Shas net vremeni zakachat'!
no poishi na google knigi s etimi nazvaniyami naydesh' tochno


Title Size ( Kb )
Java Servlet Programming.pdf 4,424.21
More Servlets and JavaServer Pages.pdf 7,973.09
Servlets v2.3 Spec.pdf 1,290.60
Building Java HTTP servlets.pdf 467.15
Building servlets with session tracking.pdf 479.44
Core Servlets and JavaServer Pages.pdf 11,404.60
Advanced JavaServer Pages.pdf 8,672.48
JavaServer Pages, 1Ed.pdf 2,594.01
JavaServer Pages, 2Ed.rar 5,319.33
__________________
http://imagegen.last.fm/Geldropdown-...ks/3/svoy1.gif
If you stop, you die! Doc Miles, Crank
Reply With Quote
Old 06.10.2004, 08:30   #5
СволочЪ
 
Вирус's Avatar
 
Join Date: 08 2002
Location: Yerevan
Age: 36
Posts: 357
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Lightbulb SmartUpload

Quote:
Originally Posted by Ablertus
Ya tolko nedavno nachal rabotat s JSP, i natolknulsa na problemu: kak mozhno na servere poluchit dostup k faylu, uploadnutomu s pomoshyu HTML (input, style="file")?
Есть такая хорошая и очень умная библиотечка - SmartUpload называется. Дополнительную информацию и ссылки на архивы можно найти здесь:

http://www.jguru.com/faq/view.jsp?EID=160
Reply With Quote
Old 08.11.2004, 14:20   #6
Магистр
 
svoy's Avatar
 
Join Date: 11 2003
Location: heart of europe
Age: 38
Posts: 718
Downloads: 41
Uploads: 0
Reputation: 11 | 3
Default

Does anyone know how to do copy file or files from on directory to another with servlet?

example. if I start sevlet it should copy a blabla.jar file from folder BLA1 to BLA2
And everything on FreeBSD Server with tomcat Apache Tomcat/5.0.24
Reply With Quote
Old 11.11.2004, 16:38   #7
Дошкольник
 
Join Date: 08 2004
Location: Oxford
Age: 38
Posts: 141
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

What is the problem? I would do it with java.io classes, or call the UNIX commands (Runtime.getRunTime().exec("mv ....")). Doesn't it work?
Reply With Quote
Old 11.11.2004, 17:23   #8
Магистр
 
svoy's Avatar
 
Join Date: 11 2003
Location: heart of europe
Age: 38
Posts: 718
Downloads: 41
Uploads: 0
Reputation: 11 | 3
Default

A mozhno aveli konkret??'

I need to delete folder which was created 30 minutes ago. I thing a threads are the best soolution... IMHO

But notice server is hosted so i have just 100% control to Tomcat Webserver and not Unix machine...Thnax in advance
Reply With Quote
Old 13.11.2004, 12:45   #9
Дошкольник
 
Join Date: 08 2004
Location: Oxford
Age: 38
Posts: 141
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Hey, Svoy. I found out that the UNIX machine is absolutely not necessary, the java.io.File has the methods mkdir, list, delete, corresponding to mkdir, ls, rm of UNIX. I have already used it yesterday in my jsp project under Linux, works perfectly. You can also try the renameTo method for moving files/folders, but I can't guarantee the result. As for measuring time, I guess threads are indeed a good idea, I just warn you, that up to my experience, the output in new threads doesn't work properly.
Reply With Quote
Old 13.11.2004, 12:52   #10
Магистр
 
svoy's Avatar
 
Join Date: 11 2003
Location: heart of europe
Age: 38
Posts: 718
Downloads: 41
Uploads: 0
Reputation: 11 | 3
Default

Danke Ablertus!

Yesterday i asked some collegs at Uni they sad that better to use CHRON JOBS I think it is correct writting, I have to look on internet....

So as far as i understood i have to programm Java class and ask my hoster if they can put it as CHRON JOB!
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 03:19.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.