java.lang.IllegalArgumentException: Invalid uri '/Assignment/rest/words/{name}/protection': escaped absolute path not valid
<p>i have spring restful web service, which is working fine with the postman(plugin in chrome) with URL (<a href="http://localhost:8080/Assignment/rest/words/" rel="nofollow">http://localhost:8080/Assignment/rest/words/</a>{name}/protection) which requires 1 parameter named as "name"</p>

<p>and i have httpclient written in java too. with the following code.</p>

<pre><code>HttpClient client = new HttpClient();

PostMethod method = new PostMethod("http://localhost:8080/Assignment/rest/words/{name}/protection");
method.setParameter("name", "value");

    byte[] responseBody = null;
    int statusCode = 0;
    try {
        // Executing method.
        statusCode = client.executeMethod(method);
        }catch(Exception e){}
        // checking status code
        if (statusCode != HttpStatus.SC_OK) {
            System.err.println("Method failed: " + method.getStatusLine());
        }

        // Reading response body.
        responseBody = method.getResponseBody();
</code></pre>

<p>on  <code>statusCode = client.executeMethod(method);</code> its shows error as follows</p>

<pre><code>java.lang.IllegalArgumentException: Invalid uri 'http://localhost:8080/Assignment/rest/words/{name}/protection': escaped absolute path not valid    org.apache.commons.httpclient.HttpMethodBase.&lt;init&gt;(HttpMethodBase.java:222)    org.apache.commons.httpclient.methods.ExpectContinueMethod.&lt;init&gt;(ExpectContinueMethod.java:93)     org.apache.commons.httpclient.methods.EntityEnclosingMethod.&lt;init&gt;(EntityEnclosingMethod.java:119)  org.apache.commons.httpclient.methods.PostMethod.&lt;init&gt;(PostMethod.java:106)    com.aspose.talib.service.WordService.getDataFromURL(WordService.java:50)    com.aspose.talib.service.WordService.postRequestForProtectData(WordService.java:37)     com.aspose.talib.web.WordController.init(WordController.java:21)    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   java.lang.reflect.Method.invoke(Method.java:606)    javax.el.BeanELResolver.invoke(BeanELResolver.java:183)     javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161)   org.apache.el.parser.AstValue.getValue(AstValue.java:173)   org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)    com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)  javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)  javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)  javax.faces.component.UIOutput.getValue(UIOutput.java:174)  com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)     com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)    com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)  javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)   javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)  javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)  javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)  com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)     com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)   com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)   com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)   com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)    javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
</code></pre>

<p>Please help </p>