# Problem with forms in Java Spring Boot

**URL:** <https://forum.camunda.io/t/problem-with-forms-in-java-spring-boot/39205>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [August 9, 2022, 10:20am UTC](https://forum.camunda.io/t/problem-with-forms-in-java-spring-boot/39205 "2022-08-09T10:20:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NSh](https://forum.camunda.io/letter_avatar_proxy/v4/letter/n/85f322/32.png) [@NSh](https://forum.camunda.io/u/NSh)\
**Post date:** [August 9, 2022, 10:20am UTC](https://forum.camunda.io/t/problem-with-forms-in-java-spring-boot/39205/1 "2022-08-09T10:20:42Z")

</div>

Hi,  
I want to add a form to a human task in Java Spring Boot distro. According to [this tutorial](https://www.youtube.com/watch?v=QXt5FzW4eMA&list=PLJG25HlmvsOVssaiPmavxv3htN_dXS3BW&index=2), I put my form inside `resources/static/forms` directory, and set the forms attributes of my human task as below:  
 ![image](https://forum.camunda.io/uploads/default/original/3X/c/f/cf03a18d6cc1b73887cdc7885cda2a6bf4aef7d7.png)

(the form file name, and also its id are `pin-code`)  
But, this doesn’t work. I had done this in another project and it had worked. I am confused what the problem is now.

In other distros (Camunda Run/TomCat), I did this simply by setting `Camunda-Forms` as Forms `Type`, and `<my-form-name>` as Form Ref. But this didn’t work in Java Spring Boot. I also tried to do this way:  
 ![image](https://forum.camunda.io/uploads/default/original/3X/2/a/2a36dcf8209c795457626a823b1b3b1f1a1bf37c.png)

But, this didn’t work either.  
Could anyone possibly help me with this?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Ingo\_Richtsmeier](https://forum.camunda.io/user_avatar/forum.camunda.io/ingo_richtsmeier/32/25968_2.png) [@Ingo\_Richtsmeier](https://forum.camunda.io/u/Ingo_Richtsmeier)\
**Post date:** [August 9, 2022, 11:57am UTC](https://forum.camunda.io/t/problem-with-forms-in-java-spring-boot/39205/2 "2022-08-09T11:57:12Z")

</div>

Hi @NSh,

when you want to reference forms from the spring-boot application, try `camunda-forms:app:forms/pin-code.form` as `form-key`. See [User Task Forms | docs.camunda.org](https://docs.camunda.org/manual/7.17/user-guide/task-forms/#form-key-details) for further details.

The alternative is to reference the forms from the database using `form-reference`.

And to deploy them into the database you have to extend the deployment resources in the configuration.  
Use either the `.deployment-resource-pattern` if you did not use a process application ([Process Engine Configuration | docs.camunda.org](https://docs.camunda.org/manual/7.17/user-guide/spring-boot-integration/configuration/#camunda-engine-properties))

or configure with `<property name="additionalResourceSuffixes">form</property>` in `processes.xml` in case you use the annotation `@EnableProcessApplication` ([Process Archive Configuration | docs.camunda.org](https://docs.camunda.org/manual/7.17/reference/deployment-descriptors/tags/process-archive/#configuration-properties))

Hope this helps, Ingo

---

<div class="post-metadata">

**Author:** ![NSh](https://forum.camunda.io/letter_avatar_proxy/v4/letter/n/85f322/32.png) [@NSh](https://forum.camunda.io/u/NSh)\
**Post date:** [August 9, 2022, 12:55pm UTC](https://forum.camunda.io/t/problem-with-forms-in-java-spring-boot/39205/3 "2022-08-09T12:55:17Z")

</div>

Hi @Ingo_Richtsmeier,  
Thanks a lot for your explanations.  
I just found out what was the problem when using `camunda-forms:/forms/pin-code.form` as form key. I had added `static.forms` as a directory in `resources` directory. I removed it and added first `static` directory and then `forms` directory inside it. Now, it is working fine!

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 31, 2024, 10:23am UTC](https://forum.camunda.io/t/problem-with-forms-in-java-spring-boot/39205/4 "2024-01-31T10:23:52Z")

</div>

Closed on January 31, 2024, 10:23am UTC


