Hi,

> I want to implement a webapplication where a user has to register. after that 
> he gets an own directory on the webserver.
>
> my problems:
> 1) I read the guard part of the tutorial ( 
> http://www.restlet.org/documentation/2.0/tutorial#part09 ). But I don't know 
> how I can login with a clientside http-request from the browser using ajax?
>    
this may help you : http://www.w3.org/TR/XMLHttpRequest/#the-open-method
Take care of the fact that the browser actually handles the call. If the 
credentials are not correct, you may be prompted with the austere 
browser's login window.

> 2) the restlet application is deployed with tomcat. after the user logged in 
> he has an own directory that should be accessible with an url. so the restlet 
> application has to create a directory in the webcontent folder. how can I get 
> the path to it?
>    
In this case, you should be able to get the servlet's context from the 
application's context attributes: 
getApplication().getContext().getAttributes().get("org.restlet.ext.servlet.ServletContext").

Best regards,
Thierry Boileau

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2440902

Reply via email to