Sara' una fesseria per voi ma non ho dimestichezza con application web ne tantomeno con Eclipse
Se qualcuno mi puo' aiutare gliene sarei grato
Ho installato correttamente(credo) Apache Tomacat 6.0 su Eclipse EE.
Qualcuno mi puo' spiegare quali passi devo compiere per far funzionare il seguente semplice codice (che legge un file usando l'oggetto XMLHttpRequest e quindi ha bisogno di un server web) su Eclipse?
Questo e' il file HTML
Questo e' il file cd_catalog.txt da leggerecodice:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript"> function loadXMLDoc() { xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","cd_catalog.txt",true); xmlhttp.send(); } </script> </head> <body> <h2>Using the XMLHttpRequest object</h2> <div id="myDiv"></div> <button type="button" onclick="loadXMLDoc()">Change Content</button> </body> </html>
codice:Dolly Parton USA RCA 9.90 1982 Bonnie Tyler UK CBS Records 9.90 1988 Bob Dylan USA Columbia 10.90 1985 Gary Moore UK Virgin records 10.20 1990 Eros Ramazzotti EU BMG 9.90 1997 Bee Gees UK Polydor 10.90 1998 Dr.Hook UK CBS 8.10 1973 Rod Stewart UK Pickwick 8.50 1990 Andrea Bocelli EU Polydor 10.80 1996 Percy Sledge USA Atlantic 8.70 1987 Savage Rose EU Mega 10.90 1995 Many USA Grammy 10.20 1999 Kenny Rogers UK Mucik Master 8.70 1995 Will Smith USA Columbia 9.90 1997 Van Morrison UK Polydor 8.20 1971 Jorn Hoel Norway WEA 7.90 1996 Cat Stevens UK Island 8.90 1990 Sam Brown UK A and M 8.90 1988 T'Pau UK Siren 7.90 1987 Tina Turner UK Capitol 8.90 1983 Kim Larsen EU Medley 7.80 1983 Luciano Pavarotti UK DECCA 9.90 1991 Otis Redding USA Atlantic 7.90 1987 Simply Red EU Elektra 7.20 1985 The Communards UK London 7.80 1987 Joe Cocker USA EMI 8.20 1987
Grazie dell'attenzione

Rispondi quotando