Dec 10

To add a single Protocol you can set the client property of the Component to the required Protocol. For example to wire up a Component and add the file:// protocol you would use the following.

   <bean id="component" class="org.restlet.ext.spring.SpringComponent">
      <property name="server">
         <bean class="org.restlet.ext.spring.SpringServer">
            <constructor-arg value="http" />
            <constructor-arg value="8080" />
      <property name="client">
         <util:constant static-field=""/>
      <property name="defaultTarget" ref="router" />

written by objects \\ tags: , ,

Array ( ) 4 Responses to “How to add a protocol to my Restlet application using Spring?”

  1. Albert Says:

    I am trying to make a client request through the proxy server for Restlets. I need to specify the host and port to make that request. Any idea on how this could be done?

  2. Albert Says:

    Also, I should not be passing these values through a constructor as shown above, but rather need to pass it as probably a property value or similar.

  3. objects Says:


    Not sure I follow.
    What exactly is the request being sent?
    And how is the proxy involved?

  4. Albert Says:

    I am using JMeter to record http proxy requests through junits. For this reason, I need to find a hook( for Restlet applications) to be able to redirect my junits to go through the proxy server ( host will be local host and port will be some port, for eg port 8080). I was able to find this hook for testing cxf services by using the http:conduit element that is available. I am trying to find a similar way to be able to do the same for Restlet services. The above code (for how to add a protocol to my Restlet application using Spring) looks close to what I might need, but not sure how to tweak it to make it work for my case. Or maybe I might need some way to add the host and the port as a property?

Leave a Reply

You must be logged in to post a comment.