# Java method parameter as User Tag

**URL:** <https://community.dynatrace.com/t/java-method-parameter-as-user-tag/45551>\
**Category:** Open Q&A\
**Tags:** tagging, request-attributes, java\
**Created:** [May 13, 2024, 4:04pm UTC](https://community.dynatrace.com/t/java-method-parameter-as-user-tag/45551 "2024-05-13T16:04:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![istvan\_safranek](https://avatars.discourse-cdn.com/v4/letter/i/ed655f/32.png) [@istvan\_safranek](https://community.dynatrace.com/u/istvan_safranek)\
**Post date:** [May 13, 2024, 4:04pm UTC](https://community.dynatrace.com/t/java-method-parameter-as-user-tag/45551/1 "2024-05-13T16:04:23Z")

</div>

Hello!

I want to add a user tag to an application. The user tag would be a request attribute which is a java parameter. Here is my problem.

I capture a string which is look like this:

loginId=shortname, [mail=name.short@mailserver.com](mailto:mail=name.short@mailserver.com), givenName=Short, name=userID, sn=Name, department=DepartmentName

I want the user tag looks like this: “Name Short (loginID)”

I guess I should use a regex expression but I don’t know what.

Is it possible to do this way or is there any other way?

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [May 13, 2024, 9:35pm UTC](https://community.dynatrace.com/t/java-method-parameter-as-user-tag/45551/2 "2024-05-13T21:35:09Z")

</div>

Currently, it is not possible to concatenate multiple server-side request attribute to form a User Tag.

I’d recommend using the Dtrum JavaScript API, because it provides with more flexibility for those custom user tag use cases.

[https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum\_types.DtrumApi.html#identifyUser](https://www.dynatrace.com/support/doc/javascriptapi/interfaces/dtrum_types.DtrumApi.html#identifyUser)

You’d need to call the&nbsp;identifyUser() method in your frontend to send your custom user tag into the platform.

 ![Eric_Yu_1-1715635984967.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/5/5589b6f602d4df010e20d3b0f24f54a47b20dd59.png)

Hope it helps!
