# Configure custom control by registering action page in java

**URL:** <https://forums.pega.com/t/configure-custom-control-by-registering-action-page-in-java/7082>\
**Category:** General\
**Tags:** java-and-activities, pega-platform\
**Created:** [May 24, 2024, 5:43am UTC](https://forums.pega.com/t/configure-custom-control-by-registering-action-page-in-java/7082 "2024-05-24T05:43:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shipeng\_Tian](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/shipeng_tian/32/8015_2.png) [@Shipeng\_Tian](https://forums.pega.com/u/Shipeng_Tian)\
**Post date:** [May 24, 2024, 5:43am UTC](https://forums.pega.com/t/configure-custom-control-by-registering-action-page-in-java/7082/1 "2024-05-24T05:43:09Z")

</div>

Hi,

I am learning how to fix the behavior of the non-autogenerated control that invokes the specified rule. As the below URL described:

[configure-custom-control-by-registering-action-page-in-java](https://docs.pega.com/bundle/platform-23/page/platform/security/configure-custom-control-by-registering-action-page-in-java.html)

Does there any one know that where the following java code should be go? A text file or somewhere else?

 ![register custom action.png](https://pega1.discourse-cdn.com/pega/original/2X/0/0a3bba15cc5ee011e6976df45ab949901421424e.png)

---

<div class="post-metadata">

**Author:** ![Priyanka\_Boga](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/priyanka_boga/32/3726_2.png) [@Priyanka\_Boga](https://forums.pega.com/u/Priyanka_Boga)\
**Post date:** [May 25, 2024, 2:23pm UTC](https://forums.pega.com/t/configure-custom-control-by-registering-action-page-in-java/7082/2 "2024-05-25T14:23:10Z")

</div>

@Shipeng_Tian - If the control is used in specific section add your java code in a non auto generated section and add this section which has this control embedded.

Make sure to wrap the java code in \<% java code %\> tags .

If it is multiple places can make use of UserWorkForm html fragment rule.

Thank you.

---

<div class="post-metadata">

**Author:** ![Shipeng\_Tian](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/shipeng_tian/32/8015_2.png) [@Shipeng\_Tian](https://forums.pega.com/u/Shipeng_Tian)\
**Post date:** [May 27, 2024, 1:30am UTC](https://forums.pega.com/t/configure-custom-control-by-registering-action-page-in-java/7082/3 "2024-05-27T01:30:56Z")

</div>

Hi, @Priyanka Boga

Thanks for your reply.
