Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo
Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo
Lenovo Legion Go 2 è la nuova handheld PC gaming con processore AMD Ryzen Z2 Extreme (8 core Zen 5/5c, GPU RDNA 3.5 16 CU) e schermo OLED 8,8" 1920x1200 144Hz. È dotata anche di controller rimovibili TrueStrike con joystick Hall effect e una batteria da 74Wh. Rispetto al dispositivo che l'ha preceduta, migliora ergonomia e prestazioni a basse risoluzioni, ma pesa 920g e costa 1.299€ nella configurazione con 32GB RAM/1TB SSD e Z2 Extreme
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti
A re:Invent 2025, AWS mostra un’evoluzione profonda della propria strategia: l’IA diventa una piattaforma di servizi sempre più pronta all’uso, con agenti e modelli preconfigurati che accelerano lo sviluppo, mentre il cloud resta la base imprescindibile per governare dati, complessità e lock-in in uno scenario sempre più orientato all’hybrid cloud
Cos'è la bolla dell'IA e perché se ne parla
Cos'è la bolla dell'IA e perché se ne parla
Si parla molto ultimamente di "bolla dell'intelligenza artificiale", ma non è sempre chiaro perché: l'IA è una tecnologia molto promettente e che ha già cambiato molte cose dentro e fuori le aziende, ma ci sono enormi aspettative che stanno gonfiando a dismisura i valori delle azioni e distorcendo il mercato. Il che, com'è facile intuire, può portare a una ripetizione della "bolla dotcom", e forse anche di quella dei mutui subprime. Vediamo perché
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 13-07-2005, 15:27   #1
Matrixbob
Senior Member
 
L'Avatar di Matrixbob
 
Iscritto dal: Jul 2001
Messaggi: 9947
[JSP] File upload: qualcuno lo sa fare?!

In PHP son riuscito a capire come farlo, ma dovrei implementarlo in JSP.
__________________
Aiuta la ricerca col tuo PC: >>Calcolo distribuito BOINC.Italy: unisciti anche tu<<
Più largo è il sorriso, più affilato è il coltello.
Matrixbob è offline   Rispondi citando il messaggio o parte di esso
Old 13-07-2005, 18:44   #2
DigitalKiller
Senior Member
 
L'Avatar di DigitalKiller
 
Iscritto dal: Aug 2004
Città: Salento
Messaggi: 1080
Ho fatto una rapida ricerca su google, prova questo

Ultima modifica di DigitalKiller : 09-07-2010 alle 17:43.
DigitalKiller è offline   Rispondi citando il messaggio o parte di esso
Old 14-07-2005, 10:09   #3
Angus
Senior Member
 
L'Avatar di Angus
 
Iscritto dal: Dec 2001
Città: Milano
Messaggi: 545
vedi anche Jakarta Commons FileUpload
__________________
Angus the Hunter @ Realm of magic | Angus Young @ Batracer
°SetiEmperor°| Ninja Technologies
{ qualunque cosa sia, è veloce e fa male (cit.) }
Angus è offline   Rispondi citando il messaggio o parte di esso
Old 14-07-2005, 10:29   #4
Matrixbob
Senior Member
 
L'Avatar di Matrixbob
 
Iscritto dal: Jul 2001
Messaggi: 9947
Quote:
Originariamente inviato da DigitalKiller
Ho fatto una rapida ricerca su google, prova questo
Questo lo avevo già trovato su google, insieme anche a questo:
Codice:
Hello Guys,

I have tried this example and successfully load the file on the server.

-----------------Form.html-------------------------------------------

<form action="upload.jsp" method="POST" enctype="multipart/form-data">
<!-- enctype="multipart/form-data" -->
<input type="file" name="theFile"><br>

<input type="submit">
</form>

------------------------------ upload.jsp --------------------------------------------
<!-- upload.jsp -->
<%@ page import="java.io.*" %>

<%
String contentType = request.getContentType();
System.out.println("Content type is :: " +contentType);
if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
DataInputStream in = new DataInputStream(request.getInputStream());
int formDataLength = request.getContentLength();

byte dataBytes[] = new byte[formDataLength];
int byteRead = 0;
int totalBytesRead = 0;
while (totalBytesRead < formDataLength) {
byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
totalBytesRead += byteRead;
}

String file = new String(dataBytes);
String saveFile = file.substring(file.indexOf("filename=\"") + 10);
//out.print("FileName:" + saveFile.toString());
saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
//out.print("FileName:" + saveFile.toString());
saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
//out.print("FileName:" + saveFile.toString());

//out.print(dataBytes);

int lastIndex = contentType.lastIndexOf("=");
String boundary = contentType.substring(lastIndex + 1,contentType.length());
//out.println(boundary);
int pos;
pos = file.indexOf("filename=\"");

pos = file.indexOf("\n", pos) + 1;

pos = file.indexOf("\n", pos) + 1;

pos = file.indexOf("\n", pos) + 1;


int boundaryLocation = file.indexOf(boundary, pos) - 4;
int startPos = ((file.substring(0, pos)).getBytes()).length;
int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
saveFile = "C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\ROOT\\Extrusions\\" + saveFile;
FileOutputStream fileOut = new FileOutputStream(saveFile);


//fileOut.write(dataBytes);
fileOut.write(dataBytes, startPos, (endPos - startPos));
fileOut.flush();
fileOut.close();

out.println("File saved as " +saveFile);

}
%>

As you can see the path in Extrusions this is the path where I can save the files.
It will work, I am sure please try as it is.

Raheel Rehman
__________________
Aiuta la ricerca col tuo PC: >>Calcolo distribuito BOINC.Italy: unisciti anche tu<<
Più largo è il sorriso, più affilato è il coltello.
Matrixbob è offline   Rispondi citando il messaggio o parte di esso
Old 14-07-2005, 10:30   #5
Matrixbob
Senior Member
 
L'Avatar di Matrixbob
 
Iscritto dal: Jul 2001
Messaggi: 9947
Grazie, + avanti ritornonerò su questo argmento, ora devo portare avanti un'altra faccenda
__________________
Aiuta la ricerca col tuo PC: >>Calcolo distribuito BOINC.Italy: unisciti anche tu<<
Più largo è il sorriso, più affilato è il coltello.
Matrixbob è offline   Rispondi citando il messaggio o parte di esso
Old 14-07-2005, 10:33   #6
Matrixbob
Senior Member
 
L'Avatar di Matrixbob
 
Iscritto dal: Jul 2001
Messaggi: 9947
Oppure questo bean:
Codice:
//ÎļþÄÚÈÝ

i = in.readLine(line, 0, 1280);
setContentType(new String(line, 0, i-2));
i = in.readLine(line, 0, 1280);

//¿ÕÐÐ
i = in.readLine(line, 0, 1280);
newLine = new String(line, 0, i,"ISO8859_1");
FileOutputStream pw=new FileOutputStream((savePath==null? "" : savePath) + filename);
//PrintWriter pw = new PrintWriter(new BufferedWriter(new
//FileWriter((savePath==null? "" : savePath) + filename)));
while (i != -1 && !newLine.startsWith(boundary)) {
// ÎļþÄÚÈݵÄ×îºóÒ»Ðаüº¬»»ÐÐ×Ö·û
// Òò´ËÎÒÃDZØÐë¼ì²éµ±Ç°ÐÐÊÇ·ñÊÇ×î
// ºóÒ»ÐÐ
i = in.readLine(line, 0, 1280);
if ((i==boundaryLength+2 || i==boundaryLength+4) && (new String(line, 0, i).startsWith(boundary)))
pw.write(newLine.substring(0, newLine.length()-2).getBytes("ISO8859_1"));
else
pw.write(newLine.getBytes("ISO8859_1"));
newLine = new String(line, 0, i,"ISO8859_1");
}
pw.close();
}
else {
// ÆÕͨ±íµ¥ÊäÈëÔªËØ
// »ñÈ¡ÊäÈëÔªËØÃû×Ö
int pos = newLine.indexOf("name=\"");
String fieldName = newLine.substring(pos+6, newLine.length()-3);
i = in.readLine(line, 0, 1280);
i = in.readLine(line, 0, 1280);
newLine = new String(line, 0, i);
StringBuffer fieldValue = new StringBuffer(1280);
while (i != -1 && !newLine.startsWith(boundary)) {
// ×îºóÒ»Ðаüº¬»»ÐÐ×Ö·û
// Òò´ËÎÒÃDZØÐë¼ì²éµ±Ç°ÐÐÊÇ·ñÊÇ×îºóÒ»ÐÐ
i = in.readLine(line, 0, 1280);
if ((i==boundaryLength+2 || i==boundaryLength+4) && (new String(line, 0, i).startsWith(boundary)))
fieldValue.append(newLine.substring(0, newLine.length()-2));
else
fieldValue.append(newLine);
newLine = new String(line, 0, i);
}
fields.put(fieldName, fieldValue.toString());
}
}
i = in.readLine(line, 0, 1280);
}

}

}


--jsp1.jsp

<%@ page contentType="text/html;charset=gb2312"%>
<jsp:useBean id="TheBean" scope="page" class="FileUploadBean.FileUploadBean" />
<%
TheBean.setSavePath("d:\\"); 
TheBean.doUpload(request);
out.println("Filename:" + TheBean.getFilename());
out.println("<BR>ContentType:" + TheBean.getContentType());
out.println("<BR>Author:" + TheBean.getFieldValue("author"));
out.println("<BR>Company:" + TheBean.getFieldValue("company"));
out.println("<BR>Comment:" + TheBean.getFieldValue("comment"));
%>

-- jload.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>File Upload Demo </title>
</head> 
<body>
<form action=jsp1.jsp enctype="MULTIPART/FORM-DATA" method=post>
Author: <input type=text name=author>
<br>
Company: <input type=text name=company>
<br>
Comment : <textarea name=comment></textarea>
<br>
Choose the upload file <input type=file name=filename>
<br>
File description : <input type=text name=description>
<br>
<input type=submit value="Upload">
</form>
</body>
</html>
__________________
Aiuta la ricerca col tuo PC: >>Calcolo distribuito BOINC.Italy: unisciti anche tu<<
Più largo è il sorriso, più affilato è il coltello.
Matrixbob è offline   Rispondi citando il messaggio o parte di esso
Old 19-07-2005, 18:31   #7
Matrixbob
Senior Member
 
L'Avatar di Matrixbob
 
Iscritto dal: Jul 2001
Messaggi: 9947
Non li ho ancora provati, forse non li uso, ma se li provo cerco di ricordare d'aggiornare questo 3D per i posteri.

3D inerenti:
[JSP/SERVLET] Upload di file su WEB
__________________
Aiuta la ricerca col tuo PC: >>Calcolo distribuito BOINC.Italy: unisciti anche tu<<
Più largo è il sorriso, più affilato è il coltello.

Ultima modifica di Matrixbob : 03-09-2005 alle 15:01.
Matrixbob è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'' per spingere gli handheld gaming PC al massimo Lenovo Legion Go 2: Ryzen Z2 Extreme e OLED 8,8'...
AWS re:Invent 2025: inizia l'era dell'AI-as-a-Service con al centro gli agenti AWS re:Invent 2025: inizia l'era dell'AI-as-a-Se...
Cos'è la bolla dell'IA e perché se ne parla Cos'è la bolla dell'IA e perché se...
BOOX Palma 2 Pro in prova: l'e-reader diventa a colori, e davvero tascabile BOOX Palma 2 Pro in prova: l'e-reader diventa a ...
FRITZ!Repeater 1700 estende la rete super-veloce Wi-Fi 7 FRITZ!Repeater 1700 estende la rete super-veloce...
Scoperto un nuovo esopianeta che orbita ...
Blue Origin NS-37: successo per la missi...
Potrebbe essere stata rilevata una super...
La cometa interstellare 3I/ATLAS è...
Xiaomi 17 Ultra: l'autonomia non sarà un...
Il processo produttivo a 2 nm di TSMC è ...
L'atteso aggiornamento dei driver della ...
The Elder Scrolls VI nel 2029 e Fallout ...
Il Ryzen 7 9850X3D appare nel catalogo d...
Weekend pre natalizio Amazon, ecco tutte...
Prezzi giù su Oral-B iO: spazzolini elet...
19.000 Pa a un prezzo senza precedenti: ...
Narwal in super offerta su Amazon: robot...
SK hynix e NVIDIA lavorano a un SSD spec...
Roborock in super offerta su Amazon: pre...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 22:57.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Served by www3v