As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
HttpClient client = new HttpClient(); client.getHostConfiguration().setHost("localhost", 8080); //Servlet.getContext("URL"); String strURL="http://localhost:8080/alfresco/command/script/execute?scriptPath=/Company%20Home/Data%20Dictionary/Scripts/assignworkflow.js&contextPath=/Company%20Home/admin_signup.txt"; System.out.println("strURL"+strURL); HostConfiguration h = new HostConfiguration(); h.setHost("localhost", 8080); GetMethod get = new GetMethod(strURL); try { int result = client.executeMethod(h,get); System.out.println("Servelt Call for Excute java script Result == " + result); } catch (HttpException e) { // TODO Auto-generated catch block e.printStackTrace(); }
NameValuePair[] kvps = new NameValuePair[]{new NameValuePair("ticket", ticket), new NameValuePair("scriptPath", "/Company Home/Data Dictionary/Scripts/assignworkflow.js"), new NameValuePair("contextPath", "/Company Home/admin_signup.txt")}; get.setQueryString(kvps);