# Integrate APM with java 8 tomcat 6 app

**URL:** https://discuss.elastic.co/t/integrate-apm-with-java-8-tomcat-6-app/242668
**Category:** APM
**Tags:** java
**Created:** [July 26, 2020, 3:22pm UTC](https://discuss.elastic.co/t/integrate-apm-with-java-8-tomcat-6-app/242668 "2020-07-26T15:22:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yashwinkumar](https://avatars.discourse-cdn.com/v4/letter/y/ecc23a/32.png) [@yashwinkumar](https://discuss.elastic.co/u/yashwinkumar)
#### Post date: [July 26, 2020, 3:22pm UTC](https://discuss.elastic.co/t/integrate-apm-with-java-8-tomcat-6-app/242668/1 "2020-07-26T15:22:59Z")

</div>

I have a legacy application running on java 8 and tomcat 6.  
I want it to integrate APM to this app as several of my organization services are already integrated with APM.

I have read in the document that tomcat 7, 8, and more are compatible with the APM but not 6 is not mentioned. It is a very complicated task for us to upgrade the tomcat so trying to find a solution to integrate with Tomcat 6.

Kindly, let me know what is the way to integrate without upgrading.

---

<div class="post-metadata">

### Author: ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)
#### Post date: [July 27, 2020, 5:57am UTC](https://discuss.elastic.co/t/integrate-apm-with-java-8-tomcat-6-app/242668/2 "2020-07-27T05:57:51Z")

</div>

Hi and welcome to our APM forum!

AFAIK, Tomcat 6 uses Servlet API version 2.5, which is not supported by our agent. Since it is very rarely used, we currently don't plan to support it.

Besides upgrading your Tomcat version, since you are using Java 8, another option is to install our agent and manually trace your application using our [public API](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html) to create transactions (and rely on the other agent functionalities to trace the rest). A couple of [annotations](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-annotation) may get you quite far.

I hope this helps.

---

<div class="post-metadata">

### Author: ![yashwinkumar](https://avatars.discourse-cdn.com/v4/letter/y/ecc23a/32.png) [@yashwinkumar](https://discuss.elastic.co/u/yashwinkumar)
#### Post date: [July 29, 2020, 5:48am UTC](https://discuss.elastic.co/t/integrate-apm-with-java-8-tomcat-6-app/242668/3 "2020-07-29T05:48:54Z")

</div>

Do we have any hello example using public api for unsupported versions

---

<div class="post-metadata">

### Author: ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)
#### Post date: [July 29, 2020, 6:15am UTC](https://discuss.elastic.co/t/integrate-apm-with-java-8-tomcat-6-app/242668/4 "2020-07-29T06:15:42Z")

</div>

Take a look at the [annotations API unit tests](https://github.com/elastic/apm-agent-java/blob/827450d577ee41b43a6b426ed369e1fec9421f26/apm-agent-plugins/apm-api-plugin/src/test/java/co/elastic/apm/api/AnnotationApiTest.java) for usage.

Regarding where the annotations should go - that's application-specific. Generally speaking, a transaction should encapsulate the entire request-handling flow. For example, if you use plain Servlets, annotate your `doGet` and `doPost` implementation with `@CaptureTransaction`.

Understanding our [data model](https://www.elastic.co/guide/en/apm/get-started/current/apm-data-model.html) will help you determine how to use the API.

I hope this helps.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 19, 2020, 2:15am UTC](https://discuss.elastic.co/t/integrate-apm-with-java-8-tomcat-6-app/242668/5 "2020-08-19T02:15:57Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
