AnsweredAssumed Answered

Decode in Java webscript

Question asked by ratik.singhal on Aug 6, 2018
Latest reply on Aug 7, 2018 by ratik.singhal

Hello All,


I am calling a java webscript from a ftl. 


var uri = Alfresco.constants.PROXY_URI+"/vs/insurancetype?" + encodeURIComponent("company="+companyValue+"&insurancetype="+insuranceValue);
this.register = function () {
       url: uri,
       successCallback: {
                fn: this.updateSubInsuranceType,
                scope: this
      failureCallback: {
                fn: function(){},
                scope: this


Passing Parameter:

var companyValue = "A&B Company";

var insuranceValue = "R&K insurance"


Request URL:

  1. Request URL:


When I get the request in Java Webscript. 


final String insuranceCompany = req.getParameter("company");   ///companyValueA
final String insurancetype = req.getParameter("insurancetype");   /// insuranceValue=R


Basically, I am not getting right parameter from the request object. 
Please suggest...