question

Nitin D. avatar image
Nitin D. asked ·

How to capture data return by method which is defined in JSP page?

We have an JSP page which have a method which are returning some information which we want to capture and later on want use in business transaction:

like ..

<%!
private static String getData(String para_1, String para_2, String para_3) {
  String value = null;

   // data processing to get data in expected format

  return value;
}
%>


How to get the method return value ?

appmonbusiness transactionjavasensormeasures
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Answer

Joe H. avatar image
Joe H. answered ·

Did you look at defining a rule to capture the Return value of that method? You'll have to be creative in defining the class as the JSPs classname likely changes each compile.

If it's not possible to define the JSP class, perhaps you can define a base class, or find that same parameter in another place in the architecture, possibly even passing the parameter to a dummy Class.Method just to expose it to DT. Such as com.foo.Dynatrace.JspParam1(string);

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.