/* this belongs to the WebRaveler package */ package webraveler.samr; import java.io.*; import java.util.Hashtable; import webraveler.http.HTTPRequest; import webraveler.http.HTTPResponse; import webraveler.ravel.Raveler; /** * Sam's attempt to understand VURLs. * * @author Samuel A. Rebelsky * @version 1.0 */ public class SampleVURL implements webraveler.vurl.VURL { /** * Returns the HTTP response associated with the given virtual * URL. * * @param username a string containing the current user's name * @param query a string containing any available query on the VURL * @param request an HTTPRequest containing the HTTP request for the virtual url * @param ravel a Raveler instance * @return an HTTPResponse containing the content to return to the client */ public HTTPResponse resolveVURL(String username, String query, HTTPRequest request, Raveler ravel) { String responseString = "
\n" + Raveler.ravelerCSS + "uriString: " + request.uriString() + "" ; System.out.println("REQUEST: "); request.write(System.out); System.out.println("DONE WITH REQUEST: "); return new HTTPResponse("HTTP/1.0",200,"OK",responseString.getBytes(),new Hashtable()); } // resolveVURL } // SampleVURL