Hi Anca,
I've modified the script under AnnotationCode.Macros page so that the
URL takes into consideration the Web Application Context path instead
of an hard-coded "xwiki". The xar file is available at
 as an attachment.
This seems to solve the issue for a simple XWiki installation where
the webapp is named something other than "xwiki". However, this might
not work in a multi-wiki XEM setup since URL in a multi-wiki
environment can be setup in one of two ways. Any suggestions..
Also, looks like there is another anomaly when we use the Annotations
application with XWiki Syntax 1.0. Sometimes, the text on the Page
that was "highlighted" for adding an annotation, is surrounded by the
XWiki Syntax 2.0 HTML macro as follows:
 {{html clean="false" wiki="true"}}highlighted text{{/html}}
This is found to be the case for text which has been rendered through
velocity in the Page source. eg. In the Page, I used
$xwiki.getWebAppPath(). This renders molecule/ which is the name of my
webapp. However, when I annotate this rendered text molecule/ it turns
into {{html clean="false" wiki="true"}}molecule/{{/html}}
automatically.
 Message: 5
 Date: Sat, 27 Mar 2010 02:03:24 +0200
 From: Anca Luca <ancapaula.luca(a)xwiki.com>
 Subject: Re: [xwiki-users] Annotations feature not working
 To: users(a)xwiki.org
 Message-ID: <4BAD4B4C.5050409(a)xwiki.com>
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Hi Dilipkumar,
 I'm pretty sure I know where the issue is coming from (because your wiki is
 running at localhost:8080/molecule/ and the annotations code is trying to
 connect to localhost:8080/xwiki/) and I'll fix it asap.
 Can you please report this issue on
 
http://jira.xwiki.org/jira/browse/XAANNOTATIONS ? Thanks a lot.
 Happy xwiki-ing,
 Anca
 On 03/26/2010 06:59 PM, Dilipkumar Jadhav wrote:
> Hello folks,
> I've installed the latest XWiki Enterprise2.3  ML1 and this is a fresh
> install. However, ran into difficulties with the annotation feature.
> When I save an annotation using the "Add Annotation" feature, the
> annotations do not get saved. There is no symbol that is generated
> next to the text that I was trying to annotate. Also, I get an error
> at the bottom of the Page which states: No Host matches server name
> localhost
>
> I used the firebug plugin to find out what events were getting fired.
> Following is the stack trace:
>
> POST:
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome/anno…
> Code: 400
> No Host matches server name localhost
> localhost:8080
>
> Server                        Apache-Coyote/1.1
> Transfer-Encoding     chunked
> Date                          Fri, 26 Mar 2010 06:09:39 GMT
> Connection    close
> Request Headersview source
> Host  localhost:8080
> User-Agent    Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.8)
> Gecko/20100202 Firefox/3.5.8
> Accept        text/javascript, text/html, application/xml, text/xml, */*
> Accept-Language       en-us,en;q=0.5
> Accept-Encoding       gzip,deflate
> Accept-Charset        ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive    300
> Connection    keep-alive
> X-Requested-With      XMLHttpRequest
> X-Prototype-Version   1.6.1
> Content-Type  application/x-www-form-urlencoded; charset=UTF-8
> Referer       
http://localhost:8080/molecule/bin/view/Main/
> Content-Length        275
> Cookie        username=obD1aIklU0E_; password=FS1YvSKKiX8_; rememberme=false;
> validation=12faf980e85d2f5a1216a4c7e320a4bd
> Pragma        no-cache
> Cache-Control no-cache
>
> Parameters              application/x-www-form-urlencoded
> annotation            help
> author                        XWiki.Admin
> date                          Fri Mar 26 01:32:31 EDT 2010
> selection                     WebHome
> selectionContext      WebHome
> selectionOffset               0
> Source
>
selectionOffset=0&selectionContext=WebHome&selection=WebHome&date=Fri%20Mar%2026%2001%3A32%3A31%20EDT%202010&author=XWiki.Admin&annotation=help
>
> XML Parsing Error: no element found Location:
> moz-nullprincipal:{833f3ffa-8712-4980-aff7-a4aabf47426e} Line Number
> 1, Column 1:
> _______________________________________________
> users mailing list
> users(a)xwiki.org
> 
http://lists.xwiki.org/mailman/listinfo/users