Updated web.js
updated web.js to read from index.html
fixed compilation exception
specify utf-8 when reading from file
fixed runtime exception