# 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:** 1\
**Showing post:** 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?

---

_[View the full topic](https://community.dynatrace.com/t/java-method-parameter-as-user-tag/45551)._
