# Issues with WebClientUtils plugin on the application server.

**URL:** <https://forum.servoy.com/t/issues-with-webclientutils-plugin-on-the-application-server/18526>\
**Category:** Classic Servoy\
**Created:** [July 30, 2015, 12:19pm UTC](https://forum.servoy.com/t/issues-with-webclientutils-plugin-on-the-application-server/18526 "2015-07-30T12:19:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.e](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@david.e](https://forum.servoy.com/u/david.e)\
**Post date:** [July 30, 2015, 12:19pm UTC](https://forum.servoy.com/t/issues-with-webclientutils-plugin-on-the-application-server/18526/1 "2015-07-30T12:19:32Z")

</div>

Hi all,

I’m trying to use the WebClientUtils plugin to call a Servoy function from the web client side. It works fine in developer, but fails every time when deployed to the application server.

Here is the code I am using. As you can see it’s a very simple test. I create one servoy callback, then try to call it from the client side.

**Make servoy callback with WebClientUtils:**

```auto
var callback = plugins.WebClientUtils.generateCallbackScript(globals.client_to_servoy_TEST1, ['str'], true);
var script = 'function client_to_servoy_TEST1(str){' + callback + '}';
var markup = '<script type="text/javascript">' + script + '</script> \n';

```

**Servoy function called is in scope.globals:**

```auto
/**
 * @param {String} str
 * @public 
 * @properties={typeid:24,uuid:"614190C0-19FF-461A-B6D2-C3139FE6D445"}
 */
function client_to_servoy_TEST1(str) {
	var js = 'servoy_to_client_TEST1("TEST")';
	plugins.WebClientUtils.executeClientSideJS(js);
}

```

**The HTML running on client:**

```auto
<html><head> <script type="text/javascript">function client_to_servoy_TEST1(str){if (function(){return true;}.bind(this)()) { Wicket.showIncrementally('indicator');}var wcall=wicketAjaxPost('?x=d5IHZJsyQSmAnMIhXEGXgXxi*1VKIXkB','m=22392378'+'&p='+encodeURIComponent(str),function() { ;Wicket.hideIncrementally('indicator');}.bind(this),function() { ;Wicket.hideIncrementally('indicator');}.bind(this), function() {if (!function() {return true;}.bind(this)()) {Wicket.hideIncrementally('indicator');}return true;}.bind(this));}</script> 
<script type="text/javascript"></script> 
<script> 

document.addEventListener("DOMContentLoaded", clientInit, false); 

function clientInit() { console.log("-> clientInit()"); console.log("CALLING: client_to_servoy_TEST1");client_to_servoy_TEST1(JSON.stringify("TEST_STRING")); console.log("<- clientInit()"); }

function servoy_to_client_TEST1(str) { console.log("-> servoy_to_client_TEST1(str)"); console.log("str = " + str); console.log("<- servoy_to_client_TEST1(str)"); console.log("\n ***SUCCESS!!!***"); } 

</script> 
</head> <body> <H1>Client HTML</H1></body></html>

```

**Console output on client:**

```auto
Uncaught ReferenceError: jQuery is not defined
xxx.3.2:116 -> clientInit()
xxx.3.2:116 CALLING: client_to_servoy_TEST1
xxx.3.2:116 <- clientInit()
http://176.9.83.122:8080/servoy-webclient/application/s/resources/wicketevent/wicket-event.js?w:lm=1423574356 Failed to load resource: the server responded with a status of 404 (Not Found)

```

As you can see, when my client side function ‘clientInit()’ calls ‘client\_to\_servoy\_TEST1()’, and I get a wicket related error.

Any idea why this is failing?

PS: I am assured by our system administrator that this is not a firewall problem.

---

<div class="post-metadata">

**Author:** ![ptalbot](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/ptalbot/32/4952_2.png) [@ptalbot](https://forum.servoy.com/u/ptalbot)\
**Post date:** [July 30, 2015, 10:11pm UTC](https://forum.servoy.com/t/issues-with-webclientutils-plugin-on-the-application-server/18526/2 "2015-07-30T22:11:57Z")

</div>

Make sure servoy.webclient.nice.urls is set to false in servoy-admin. The plugin is not compatible with that.

---

<div class="post-metadata">

**Author:** ![david.e](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@david.e](https://forum.servoy.com/u/david.e)\
**Post date:** [July 31, 2015, 10:13am UTC](https://forum.servoy.com/t/issues-with-webclientutils-plugin-on-the-application-server/18526/3 "2015-07-31T10:13:15Z")

</div>

> ptalbot:  
> Make sure servoy.webclient.nice.urls is set to false in servoy-admin. The plugin is not compatible with that.

Thanks ptalbot, everything is now working! ![:)]( "Smile")
