Hi Ganesh, In theory it should work. Did you try with other CLAP authorities such as "system" instead of "class"?
Otherwise, could you send us a small reproducible sample application that we could attempt to debug? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Ganesh [mailto:[email protected]] Envoye : mardi 6 janvier 2009 10:55 A : [email protected] Objet : executing a HTML page directly. 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 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1022150

