Using Hippo Component from JAX-RS

Hi,

I have JAX-RS class(extends the AbstractResource) where the operation involves utilizing the existing Hippo component that extends Common Component , I could access only the RequestContext from this class but calling a existing Component requires HstRequest and HstResponse and Instantiating the Component.
How to go about and Reuse Component from the Jax-Rs class .

Many Thanks
Srinivas Jasti

Hi Srinivas,

It’s not possible to instantiate and access HstComponents from JAX-RS services.
If you want to share some code, separate those common functionality into a separate (utility) class and use it in both. As both HstComponent and JAX-RS service can use at least HstRequestContext, it’s reasonable to make your (utility) common class to depend only on HstRequestContext.

Regards,

Woonsan