# Xpage Components

**URL:** <https://community.bloomreach.com/t/xpage-components/3670>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [February 20, 2023, 9:31am UTC](https://community.bloomreach.com/t/xpage-components/3670 "2023-02-20T09:31:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mort365](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@Mort365](https://community.bloomreach.com/u/Mort365)\
**Post date:** [February 20, 2023, 9:31am UTC](https://community.bloomreach.com/t/xpage-components/3670/1 "2023-02-20T09:31:15Z")

</div>

Hi there, we have defined an Xpage, all good renders out components and the document data. However, what I would like is for it to render data from its actual component configured…

For Example this is the page component…

definitions:  
config:  
/hst:hst/hst:configurations/project/hst:pages/foundationIndex:  
jcr:primaryType: hst:component  
hst:referencecomponent: hst:abstractpages/base  
/main:  
jcr:primaryType: hst:component  
hst:componentclassname: project.components.FoundationIndexPageComponent  
hst:template: foundation-index-page

and in that bean it has the override…

```auto

public class FoundationIndexPageComponent extends BaseHstComponent {

	private static final Logger Log = LoggerFactory.getLogger(FoundationIndexPageComponent.class);
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {

super.doBeforeRender(request, response);
}
}

```

However if I write anything to the request to grab in the FTL it does not work. No error just not available in the FTL template

For example request.setAttribute(“parent”, parentBean);

in the FTL nothing…

I do not really want to create an actual component that inherits from CommonComponent

thoughts?

Thanks  
J

---

<div class="post-metadata">

**Author:** ![Lef\_Karamoulas](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/lef_karamoulas/32/82_2.png) [@Lef\_Karamoulas](https://community.bloomreach.com/u/Lef_Karamoulas)\
**Post date:** [February 21, 2023, 11:31am UTC](https://community.bloomreach.com/t/xpage-components/3670/2 "2023-02-21T11:31:55Z")

</div>

The class you are demonstrating should be sufficient for what you are trying to achieve.

Have you verified that parentBean is not null in your class? Try for example `request.setAttribute("parent","test");`  
Have you verified that your ftl template is reached by printing something eg. `<h1>Test</h1>`  
Was the template configured correctly in the repository?  
Are there any errors in the logs of the application?

As you understand there are many areas where something could go wrong.  
Could you troubleshoot a bit more based on the above points and get back to us? Maybe share your ftl template, your hst configuration etc.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Mort365](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@Mort365](https://community.bloomreach.com/u/Mort365)\
**Post date:** [February 22, 2023, 8:53am UTC](https://community.bloomreach.com/t/xpage-components/3670/3 "2023-02-22T08:53:46Z")

</div>

Hi ya, thats what I thought, I have even gone to the length of just sending back one variable, still nto working.  
No errors in the logs nothing.

If I throw an error, I get an error… but with the attributes, no worky…

In the end I have resorted to using a component.
