 |
JSP & Servlets |
 |
04.10.2004, 19:24
|
#1
|
Дошкольник
Join Date: 08 2004
Location: Oxford
Age: 46
Posts: 141
Rep Power: 0
|
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")?
|
|
|
04.10.2004, 21:00
|
#2
|
Магистр
Join Date: 11 2003
Location: heart of europe
Age: 46
Posts: 718
Rep Power: 5
|
tak naizust' ne pomynu u menya ebooki bili gdeto esli xochesh' poishu!
|
|
|
05.10.2004, 10:11
|
#3
|
Дошкольник
Join Date: 08 2004
Location: Oxford
Age: 46
Posts: 141
Rep Power: 0
|
Da, budu neskazanno blagodaren
|
|
|
05.10.2004, 11:16
|
#4
|
Магистр
Join Date: 11 2003
Location: heart of europe
Age: 46
Posts: 718
Rep Power: 5
|
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
|
|
|
 |
SmartUpload |
 |
06.10.2004, 07:30
|
#5
|
СволочЪ
Join Date: 08 2002
Location: Yerevan
Age: 44
Posts: 357
Rep Power: 0
|
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
|
|
|
08.11.2004, 14:20
|
#6
|
Магистр
Join Date: 11 2003
Location: heart of europe
Age: 46
Posts: 718
Rep Power: 5
|
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
|
|
|
11.11.2004, 16:38
|
#7
|
Дошкольник
Join Date: 08 2004
Location: Oxford
Age: 46
Posts: 141
Rep Power: 0
|
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?
|
|
|
11.11.2004, 17:23
|
#8
|
Магистр
Join Date: 11 2003
Location: heart of europe
Age: 46
Posts: 718
Rep Power: 5
|
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
|
|
|
13.11.2004, 12:45
|
#9
|
Дошкольник
Join Date: 08 2004
Location: Oxford
Age: 46
Posts: 141
Rep Power: 0
|
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.
|
|
|
13.11.2004, 12:52
|
#10
|
Магистр
Join Date: 11 2003
Location: heart of europe
Age: 46
Posts: 718
Rep Power: 5
|
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!
|
|
|
All times are GMT. The time now is 00:53. |
|
|