Hi, I need to execute a HTML file from the classpath using CLAP. for that i have written the following code, which is not working. can any one please help me... when a request come for a HTML page, i need to execute that directly in a restlet, that is the requirement.
in Application class createRoot() router.attach("/",new StaticPageService(getContext())); The StaticPageService is a sub class of restlet. public void handle(final Request request, final Response response) { Directory directory = new Directory(getContext(),"clap://class/HTML"); try { Response resp = directory.get(request.getResourceRef().getPath()); if (resp.getStatus().isSuccess()) { response.setEntity(resp.getEntity()); } --- --- my assumption here is that response.setEntity will execute that requested page from HTML folder in class path and sends that as response. -- if it is not correct process can any one tell me what is the better way of executing html with restlet? -- View this message in context: http://n2.nabble.com/executing-a-HTML-page-directly.-tp2116849p2116849.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1007232