Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Reti di calcolatori > [comdig-prini]WebSever
Pages (10): « First ... « 5 6 7 8 [9] 10 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
supernova
Mad For It

User info:
Registered: May 2003
Posts: 403 (0.05 al dì)
Location: Milan, London
Corso: Digital Comunication
Anno: I Don't Know, Not Yet.
Time Online: 3 Days, 4:56:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Si così, come dice il pdf. 2 domanducce ho :

1) // Set up input stream filters.
//?

quel ? che ci devo mettere?

2) String requestLine = ?
io gli passo request, giusto o faccio una cazzata?

Aiutemi perchè domani si avvicina!

__________________
" So I Start The Revolution From My Bed ". Noel Gallagher

12-12-2005 14:14
Click Here to See the Profile for supernova Click here to Send supernova a Private Message Find more posts by supernova Add supernova to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pinauz
.grande:maestro.

User info:
Registered: Nov 2004
Posts: 734 (0.10 al dì)
Location: a casa mai
Corso: NO: la nostra risposta al vostro calcio
Anno: !!!!!!!
Time Online: 3 Days, 17:43:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

x la pima non lo so per la seconda c'è scritto sul testo...
ti dice che ilmetodo readLine() della calsee Bufferedreader di da la String requestLine

__________________
movimento ultras contro diffide e repressione

12-12-2005 14:16
Click Here to See the Profile for pinauz Click here to Send pinauz a Private Message Find more posts by pinauz Add pinauz to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
supernova
Mad For It

User info:
Registered: May 2003
Posts: 403 (0.05 al dì)
Location: Milan, London
Corso: Digital Comunication
Anno: I Don't Know, Not Yet.
Time Online: 3 Days, 4:56:55 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

br.readLine() quindi devo usare? Mi rimane solo quel maledetto errore di HttpRequest. Sempre che br.readLine() sia giusto da usare.
Oppure mi devo creare un readLine negli stream di input?

__________________
" So I Start The Revolution From My Bed ". Noel Gallagher

12-12-2005 14:22
Click Here to See the Profile for supernova Click here to Send supernova a Private Message Find more posts by supernova Add supernova to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pinauz
.grande:maestro.

User info:
Registered: Nov 2004
Posts: 734 (0.10 al dì)
Location: a casa mai
Corso: NO: la nostra risposta al vostro calcio
Anno: !!!!!!!
Time Online: 3 Days, 17:43:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

bravo!! io invece nn ho capito che vuole nella statusLine e nel contentTypeLine

12-12-2005 14:23
Click Here to See the Profile for pinauz Click here to Send pinauz a Private Message Find more posts by pinauz Add pinauz to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
[>>>>VK<<<<]
.arcimaestro.

User info:
Registered: Jan 2005
Posts: 347 (0.05 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 22:11:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Mattex185 puoi dirmi se lo strutturato in modo giusto? allora:

mport java.io.* ;
import java.net.* ;
import java.util.* ;

public final class WebServer{

public static void main(String argv[]) throws Exception{
......
}

}

final class HttpRequest implements Runnable {

public HttpRequest(Socket socket) throws Exception {
}
public void run(){
}
private void processRequest() throws Exception {
E' IN QUESTA CLASSE CHE VA TUTTO IL PROCESSO PER VERIFICARE SE IL FILE VIENE TROVATO E ANALIZZATO ???
}
private static void sendBytes(FileInputStream fis, OutputStream os)throws Exception {
PER INVIARE I FILE AL CLIENT
}
private static String contentType(String fileName){
IDENTIFICAZIONE DEL TIPO DI FILE.
}
}

__________________
Jessica Alba Italian Fans Site

12-12-2005 14:24
Click Here to See the Profile for [>>>>VK<<<<] Click here to Send [>>>>VK<<<<] a Private Message Find more posts by [>>>>VK<<<<] Add [>>>>VK<<<<] to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Mattex185
.grande:maestro.

User info:
Registered: Sep 2004
Posts: 520 (0.07 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Laureato
Time Online: 11 Days, 3:18:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

penso sia giusto
ma nn voglio prendermi NESSUNA responsabilità :)

12-12-2005 14:31
Click Here to See the Profile for Mattex185 Click here to Send Mattex185 a Private Message Find more posts by Mattex185 Add Mattex185 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
[>>>>VK<<<<]
.arcimaestro.

User info:
Registered: Jan 2005
Posts: 347 (0.05 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 22:11:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Mattex185
penso sia giusto
ma nn voglio prendermi NESSUNA responsabilità :)


thx

__________________
Jessica Alba Italian Fans Site

12-12-2005 14:34
Click Here to See the Profile for [>>>>VK<<<<] Click here to Send [>>>>VK<<<<] a Private Message Find more posts by [>>>>VK<<<<] Add [>>>>VK<<<<] to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
EmoGuy
.simpatizzante.

User info:
Registered: Oct 2005
Posts: 11 (0.00 al dì)
Location: Garbagnate Milanese
Corso: Comunicazione digitale
Anno: Terzo
Time Online: 5:47:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Quindi nella final class ..... implements runnable vanno messe tutte le altre? Non riesco a capire a che livello si inseriscono le varie parti ....
Lo sviluppo final static String CRFL va messo pria o dopo
public HttpRequest(Socket socket) throws Exception {
}

12-12-2005 14:40
Click Here to See the Profile for EmoGuy Click here to Send EmoGuy a Private Message Find more posts by EmoGuy Add EmoGuy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Mattex185
.grande:maestro.

User info:
Registered: Sep 2004
Posts: 520 (0.07 al dì)
Location: Milano
Corso: Comunicazione Digitale
Anno: Laureato
Time Online: 11 Days, 3:18:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by EmoGuy
Quindi nella final class ..... implements runnable vanno messe tutte le altre? Non riesco a capire a che livello si inseriscono le varie parti ....

si va tutto dentro quella classe
le parti inseriscile una dopo l'altra e dovresti farcela
Originally posted by EmoGuy
Lo sviluppo final static String CRFL va messo pria o dopo
public HttpRequest(Socket socket) throws Exception {
} [/B]

essendo la creazione di una variabile, va creata dentro la classe,ovvero dopo public HttpRequest(Socket socket) throws Exception {
}

ora vi saluto che devo uscire.
buon lavoro ^^

12-12-2005 14:48
Click Here to See the Profile for Mattex185 Click here to Send Mattex185 a Private Message Find more posts by Mattex185 Add Mattex185 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
EmoGuy
.simpatizzante.

User info:
Registered: Oct 2005
Posts: 11 (0.00 al dì)
Location: Garbagnate Milanese
Corso: Comunicazione digitale
Anno: Terzo
Time Online: 5:47:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma è qualcosa del genere ?


final class HttpRequest implements Runnable {

final static String CFRL = .....
.......
.......
if ( fileExists)......

public HttpRequest(Socket socket) throws Exception {
}

public void run(){
}

12-12-2005 14:59
Click Here to See the Profile for EmoGuy Click here to Send EmoGuy a Private Message Find more posts by EmoGuy Add EmoGuy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
[>>>>VK<<<<]
.arcimaestro.

User info:
Registered: Jan 2005
Posts: 347 (0.05 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 22:11:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by EmoGuy
Quindi nella final class ..... implements runnable vanno messe tutte le altre? Non riesco a capire a che livello si inseriscono le varie parti ....
Lo sviluppo final static String CRFL va messo pria o dopo
public HttpRequest(Socket socket) throws Exception {
}


abbiamo lo stesso problema anche io nn capisco che devo fare qui:

There are three parts to the response message: the status line, the response headers, and the entity body.
The status line and response headers are terminated by the character sequence CRLF. We are going to
respond with a status line, which we store in the variable statusLine, and a single response header, which
we store in the variable contentTypeLine. In the case of a request for a nonexistent file, we return 404 Not
Found in the status line of the response message, and include an error message in the form of an HTML
document in the entity body.


// Construct the response message.
String statusLine = null;
String contentTypeLine = null;
String entityBody = null;
if (fileExists) {
statusLine = ?;
contentTypeLine = "Content-type: " +
contentType( fileName ) + CRLF;
} else {
statusLine = ?;
contentTypeLine = ?;
entityBody = "<HTML>" +
"<HEAD><TITLE>Not Found</TITLE></HEAD>" +
"<BODY>Not Found</BODY></HTML>";
}

__________________
Jessica Alba Italian Fans Site

12-12-2005 15:10
Click Here to See the Profile for [>>>>VK<<<<] Click here to Send [>>>>VK<<<<] a Private Message Find more posts by [>>>>VK<<<<] Add [>>>>VK<<<<] to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pinauz
.grande:maestro.

User info:
Registered: Nov 2004
Posts: 734 (0.10 al dì)
Location: a casa mai
Corso: NO: la nostra risposta al vostro calcio
Anno: !!!!!!!
Time Online: 3 Days, 17:43:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

allora... io nella status line ho messo uno stringa che dice se il file esiste oppure no, la contenttype invece è gia scritta

12-12-2005 15:11
Click Here to See the Profile for pinauz Click here to Send pinauz a Private Message Find more posts by pinauz Add pinauz to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
[>>>>VK<<<<]
.arcimaestro.

User info:
Registered: Jan 2005
Posts: 347 (0.05 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 22:11:49 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by pinauz
allora... io nella status line ho messo uno stringa che dice se il file esiste oppure no, la contenttype invece è gia scritta



in che senso cosi: statusLine = fis.toString()

__________________
Jessica Alba Italian Fans Site

12-12-2005 15:15
Click Here to See the Profile for [>>>>VK<<<<] Click here to Send [>>>>VK<<<<] a Private Message Find more posts by [>>>>VK<<<<] Add [>>>>VK<<<<] to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
pinauz
.grande:maestro.

User info:
Registered: Nov 2004
Posts: 734 (0.10 al dì)
Location: a casa mai
Corso: NO: la nostra risposta al vostro calcio
Anno: !!!!!!!
Time Online: 3 Days, 17:43:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

no no del tipo "file esistente"

12-12-2005 15:16
Click Here to See the Profile for pinauz Click here to Send pinauz a Private Message Find more posts by pinauz Add pinauz to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
EmoGuy
.simpatizzante.

User info:
Registered: Oct 2005
Posts: 11 (0.00 al dì)
Location: Garbagnate Milanese
Corso: Comunicazione digitale
Anno: Terzo
Time Online: 5:47:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

L' ordine è quello che hai messo tu prima:

Main
HttpRequest implements runnable che contiene tutto il resto

quello che io continuo a non capire a parte qualche errore sparso qui e li è dove va tutto il malloppazzo di roba che inizia con


Final static String CRFL ....
....
...
...
If(fileExists).... [il pezzo dove c'è la tag html fino all'ì if dell ' entity body ]


Ma a te

String statusLine = null;
if (fileExists)

non danno errore ?




Sto per diventare pessimista....

12-12-2005 15:18
Click Here to See the Profile for EmoGuy Click here to Send EmoGuy a Private Message Find more posts by EmoGuy Add EmoGuy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 20:24.    Post New Thread    Post A Reply
Pages (10): « First ... « 5 6 7 8 [9] 10 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.077 seconds (61.42% PHP - 38.58% MySQL) con 23 query.