![]() |
Pages (10): « First ... « 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)
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
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
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
bravo!! io invece nn ho capito che vuole nella statusLine e nel contentTypeLine
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
penso sia giusto
ma nn voglio prendermi NESSUNA responsabilità
Originally posted by Mattex185
penso sia giusto
ma nn voglio prendermi NESSUNA responsabilità![]()
__________________
Jessica Alba Italian Fans Site
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 {
}
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 ....
Originally posted by EmoGuy
Lo sviluppo final static String CRFL va messo pria o dopo
public HttpRequest(Socket socket) throws Exception {
} [/B]
Ma è qualcosa del genere ?
final class HttpRequest implements Runnable {
final static String CFRL = .....
.......
.......
if ( fileExists)......
public HttpRequest(Socket socket) throws Exception {
}
public void run(){
}
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 {
}
__________________
Jessica Alba Italian Fans Site
allora... io nella status line ho messo uno stringa che dice se il file esiste oppure no, la contenttype invece è gia scritta
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
__________________
Jessica Alba Italian Fans Site
no no del tipo "file esistente"
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....
All times are GMT. The time now is 04:38. | Pages (10): « First ... « 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.