Andrea, andbin.dev – Senior Java developer – SCJP 5 (91%) • SCWCD 5 (94%)
java.util.function Interfaces Cheat Sheet — Java Versions Cheat Sheet
credevo di sì..ma mi sta venendo il dubbio!?
Io ho creato il mio server che gestisce richieste http,
prepare una pg html
os = new PrintWriter(s.getOutputStream(), true);
os.println("HTTP/1.0 200");
os.println("Content-type: text/html");
os.println("Server-name: myserver");
String response = "<html><head>" +
etc
controllando se la richiesta è di tipo post
if (httpMethod.equals("POST")) { ...
e leggendone i parametri.
Il mio dubbio più grosso è lato html:
come richiamare il mio Server.java?
ho provato così
<FORM action="http://localhost:8080/Server" method="post">
il Server è in ascolto sulla porta 8080, ma apro la pg html con il form, premo submit, la pg resta come in eterno caricamento...
Dici che arrivo alla befana che non ho ancora capito?!![]()