Hey Thierry,
thanks for your answer!
I tried to receive the text from the hello world example with ajax.
The js code (using jquery):
$.ajax({
type: "GET",
url: "myurl/hello",
data: "",
success: function(data){
$("#ajaxcontent").html(data);
}
});
But it seems to be a difference between an ajax get request and the browser get
request? My console shows this for the browser request:
9000 GET /hello - 200 12 - 2
And this for the ajax request:
9000 OPTIONS /hello - 405 402 - 0
How can I fix this? :)
> Hello Robert,
>
> >Is restlet appropriate for this needs?
> yes, as any other kind of server!
>
> >How would you realize the communication between Client (Javascript)
> and Server (Java) with the help of restlet?
> Ajax, surely. When the user click on the load button, the second frame
> is refreshed and the URL of the target page is sent to the server
> resource by the ajax client (which is better than sending the whole
> document). The targeted resource retrieves the HTML page (which can be
> tidied using *http://tidy.sourceforge.net
> <http://tidy.sourceforge.net/>). The server resource then returns data
> (rdf or xml, or json, etc) to the ajax client in order to refresh the
> main frame.
>
> *So, one server resource either accepting GET request (with a query
> parameter that contains the target URI), or accepting POST requests
> (with the target URI in the body). It returns either RDF, XML, etc
> according to the client preferences.
>
> Best regards,
> Thierry Boileau
> > Hey!
> >
> > I want to develop a webapplication with the following functionality:
> >
> > 0) overview: http://dl.dropbox.com/u/1266822/overview.jpg
> >
> > 1) The html,css,javascript content is delivered by the server.
> > 2) The page consists of 2 frames. the second one loads the webpages the
> > user wants to open.
> > 3) The server receives the DOM of the loaded page.
> > 4) The client receives data in the form of rdf or xml.
> >
> >
> > Is restlet appropriate for this needs? How would you realize the
> > communication between Client (Javascript) and Server (Java) with the help
> > of restlet?
> > Would be really nice if you could give me a short overview of what I have
> > to take care of.
> >
> > Thanks in advance,
> > Robert
> >
> > ------------------------------------------------------
> > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2430835
> >
> >
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2431535