/* * This script is called when the client tries to access the "/" URL. * It simply redirects to a URL that causes the main application page * to be displayed. */ // default index is to activate the main controller: library.httpserver.sendRedirect(library.httpserver.makeUrl("/main/show")); /* for example, you can directly execute some server side JavaScript and render the result in the page via the response global object: response.setStatus(200); response.setContentType("text/html"); writer = response.getWriter(); writer.println( "<html><head><title>Hello</title></head><body>" + "Today is "+ java.util.Date() + "</body></html>"); writer.flush(); */
You need to create an account or log in to post comments to this site.