# Using Hippo Component from JAX-RS

**URL:** <https://community.bloomreach.com/t/using-hippo-component-from-jax-rs/194>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [July 20, 2018, 3:05pm UTC](https://community.bloomreach.com/t/using-hippo-component-from-jax-rs/194 "2018-07-20T15:05:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivas\_Jasti](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@Srinivas\_Jasti](https://community.bloomreach.com/u/Srinivas_Jasti)\
**Post date:** [July 20, 2018, 3:05pm UTC](https://community.bloomreach.com/t/using-hippo-component-from-jax-rs/194/1 "2018-07-20T15:05:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![woonsanko](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@woonsanko](https://community.bloomreach.com/u/woonsanko)\
**Post date:** [July 20, 2018, 3:29pm UTC](https://community.bloomreach.com/t/using-hippo-component-from-jax-rs/194/2 "2018-07-20T15:29:51Z")

</div>

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
