Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8942407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:30:27+00:00 2026-06-15T11:30:27+00:00

My RESTEasy service does have a method using cookie parameters: public interface SimpleService {

  • 0

My RESTEasy service does have a method using cookie parameters:

public interface SimpleService
{
  public String test(@CookieParam("param") String param);
}

Now I am trying to use my SimpleService with RESTEasy client framework and it’s proxy factory from within my Servlet. However, how can I “forward” the cookie parameters correctly? Right now, I need to manually loop through the request’s cookies array and provide the cookie’s value manually to the test(..) function call. Reading RESTEasy client framework documentation on http://docs.jboss.org/resteasy/docs/2.3.0.GA/userguide/html/RESTEasy_Client_Framework.html reads:

@CookieParam works the mirror opposite of its server-side counterpart and creates a cookie header to send to the server. You do not need to use @CookieParam if you allocate your own javax.ws.rs.core.Cookie object and pass it as a parameter to a client proxy method. The client framework understands that you are passing a cookie to the server so no extra metadata is needed.

So I am curious what this means for my case? How to properly use RESTEasy client framework & cookie parameters in my servlet?

thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:30:28+00:00Added an answer on June 15, 2026 at 11:30 am

    It’s been a while since you asked, and you have probably solved the issue by now, but here’s something for future reference:

    If you are looking to access cookies sent from the server using the client framework, I think you are stuck with traversing headers (from the ClientResponse as you do today?).

    However, if you are looking to understand how the @CookieParam works, using your current interface to make the client, it would be something like this:

    SimpleService service = ProxyFactory.create(SimpleService.class, "the://url:to/your/service");
    service.test("this text becomes a cookie called 'param' in the request");
    

    That cookie will be available as a String input parameter to the server side implementation.

    @Get
    @Path("/test")
    public String test(@CookieParam("param") cookie) {
        log(cookie); // would print: this text becomes a cookie called 'param' in the request
        return "seems legit";
    }
    

    Hope this helps either you, future readers or both!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My service side code is implemented using Resteasy @GET @Path(/ad-details/{query}) @Produces(application/json) public String getAdDetails(@PathParam(query)
I have this service with RESTeasy: @GET @Path(/{name}) @Produces(image/jpeg) public BufferedImage get(@PathParam(name) String name)
Consider the following simple RESTEasy (JAX-RS) service: @Path(/example-service) public interface ExampleService { @Path(/ping) @GET
I want to test my REST-Service using the RestEasy Client Framework. In my application
I have three layers in my application: REST interface (JBOSS RestEasy) Service layer (Spring
I have written a resteasy-spring service : @Controller @RequestMapping(/abr/asd) @Path(/ab/ac) public class JobSchedulerService {
I am having trouble with this simple RestEasy service: @Path(/) public interface UserService {
I have a similar case as the one described here: Dynamically change RESTEasy service
At present I have a TestNG project that calls a JBoss RESTEasy web service.
I'm developing a REST-ful web service using RESTEasy deployed on Tomcat. I've configured an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.