Dear Vincent, Tank you for your reply, I would try what you suggested in the afternoon, but regarding the "evolver=1 request param", I've set it equal to 1 together with POST command in order to make it always true ensuring that my component is started every time. My thoughts were wrong? Giordano. 2015-12-22 11:31 GMT+01:00 [email protected] <[email protected]>:
Hi Giordano,
On 21 Dec 2015 at 15:20:55, Giordano Ninonà ([email protected] (mailto:[email protected])) wrote:
Hi users,
My project in XWiki consists in a java component which offers some APIs through a script service called by a Velocity script in a wiki page.
I put my .jar in the directory C:\XWiki Enterprise 7.3\*webapps\xwiki\WEB-INF\lib *and this is the Velocity and HTML code that I've put in my XWiki page:
{{velocity}} #if("$!request.evolver" == 1) ## Request for creating a new instance $services.pars.parse() $services.evo.removeInstance("Take bike") $response.sendRedirect($xwiki.getURL('Main.WebHome')) ## Stop processing, since we already sent a redirect. #stop #end
[snip]
Let first say that nothing is happening when I click on the "Evolve" button and I don't know why...it looks like it should work, also because creating a Main_test class in Eclipse, I can run my software calling exactly the same methods and it works!
You could use GET instead of POST and see what you get in the URL (ie whether you get the evolver=1 request param).
Moreover my component must create some files to store some information, thus I am wondering where to save those files in order to make them accessible by the component.
You can use the XWiki’s permanent directory.
See http://extensions.xwiki.org/xwiki/bin/view/Extension/Environment+Module
Thanks -Vincent
Any suggestions?
Thanks in advance, Giordano.