0

A lot of web applications must be used the specified REST service. This REST service uses currently the informations only from javax.servlet.http.HttpServletRequest. This HttpServletRequest may be contain the specific cookie and other parameters.

I'm try to use the (REST) client API form JERSEY to realize a client, that will build the REST requests. This client will be called within custom web filter, that will be registered by web.xml of each web application.

Currently i have the following problem: i'm don't know, howto transmitt the HttpServletRequest during call of the REST Service....

Thx for your help....

1 Answer 1

0

So if I understand correctly, you want receive a request in any of the web applications, and then you want to forward this request to the REST web service?

If so, you will need to serialize the request to make it transportable. You could also create a class that is able to hold the data that you need from the javax.servlet.http.HttpServletRequest and then serialize it into XML or JSON.

If you have the request in a more transportable format, you can pass it to your REST service via a @HeaderParam or as the request body (I would prefer the latter).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.