.dsy:it. Pages (10): « First ... « 4 5 6 7 [8] 9 10 »
Show 150 posts per page

.dsy:it. (http://www.dsy.it/forum/)
- Reti di calcolatori (http://www.dsy.it/forum/forumdisplay.php?forumid=68)
-- [comdig-prini]WebSever (http://www.dsy.it/forum/showthread.php?threadid=23043)


Posted by Mattex185 on 12-12-2005 13:14:

Originally posted by EmoGuy
Errori in comprensibili ....
Parte B dove dice //Construct the response message :
String statusLine = null; dice " identifier expected "
L' if subito sotto :
if ( fileExists) " illegal start of type "

os.writeBytes(statusLine); "identifier expected "

Inizio a dare segni di squilibrio ....
.
anche a me lo dava.quando ho finito la parte B nn me lo ha dato +
anche x un altro(ma nn ricordo quale) mi dava lo stesso errore e anche quello è andao a posto a programma finito


Posted by pinauz on 12-12-2005 13:15:

scusa mettx ma nella classe inputstream devi fare riferimento alla connection di socket della classe webserver...come hai fatto?


Posted by pinauz on 12-12-2005 13:26:

a volte mi accorgo di dire una cifra di c****te! cmq la prima parte sembra funzionare ancora nn ci credo!

mi ridà questa stringa...
GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
java.io.IOException: Stream closed
perchè mi chiude la connessione?


Posted by Mattex185 on 12-12-2005 13:28:

nn so se ho capito il punto ma cmq ho fatto "semplicemente"
socket.getInputStream()

x la risposta del prompt nn so dirti


Posted by EmoGuy on 12-12-2005 13:29:

Io no, ma forse ho sbagliato a completare, l' ho scritta semplice semplice come si è visto a laboratorio; alla stessa maniera DataOutputStream e bufferedReader;
A me da errore su tokens.nextToken(); dicendo che " identifier expected " e su fileName = "." + fileName; il motivo è sempre " identifier expected "


Posted by pinauz on 12-12-2005 13:30:

scusa...ma inputstream is= ?
come lo inizializzi?
ioho fatto new inputstream bla bla bla ma mi dice che è un aclasse astratta e nn lo posso fare


Posted by Mattex185 on 12-12-2005 13:32:

nell'inputstream nn ho fatto new io
solo
InputStream is = socket.getInputStream();


Posted by pinauz on 12-12-2005 13:36:

mattex quasi ti amo!!!
cmq continua a darmi sta roba
GET /prova.htm HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
java.io.IOException: Stream closed
Finished executing


Posted by Mattex185 on 12-12-2005 13:55:

nn mi ricordo davvero se sia la risposta giusta...tu vai avanti e poi vedi ;) intanto provo a rivedere se mi da quello ma nn so se ci riesco


Posted by supernova on 12-12-2005 14:01:

public final class WebServer {

public static void main(String argv[]) throws Exception
{
// Set the port number.
int port = 6789;

// Establish the listen socket.
ServerSocket s = new ServerSocket(port);
// Process HTTP service requests in an infinite loop.
while (true) {
// Listen for a TCP connection request.
Socket w = s.accept();
// Construct an object to process the HTTP request message.
HttpRequest request = new HttpRequest(w);
// Create a new thread to process the request.
Thread thread = new Thread(request);
// Start the thread.
thread.start();

}
}

Ora mi dite per piacere perchè mi da errore di compilazione nel metodo HttpRequest? A me sembra tutto ok!

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


Posted by pinauz on 12-12-2005 14:03:

guarda che non puoi scrivere codice o parte di codice di un elaborato....! cmq posta l'errore che ti da!

domanda: la parte b implementa l meodo run di httprequest?


Posted by supernova on 12-12-2005 14:06:

Pinauz questa parte mi sembra che si stata implementata da tutti quindi non vedo problemi a postarla. Cmq scusate ma è da venerdi che sto sclerando con sto errore: WebServer.java:20: non-static variable this cannot be referenced from a static context
HttpRequest request = new HttpRequest(w);

Di grazia cos'è che non va?

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


Posted by pinauz on 12-12-2005 14:08:

la classe http request come l'hai dichiarata? final static public....


Posted by supernova on 12-12-2005 14:09:

come da pdf.

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


Posted by pinauz on 12-12-2005 14:12:

final class HttpRequest implements Runnable? boh...a me nn da errore

__________________
movimento ultras contro diffide e repressione


All times are GMT. The time now is 01:27. Pages (10): « First ... « 4 5 6 7 [8] 9 10 »
Show all 148 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.