
com.mindscapehq.raygun4java.webprovider.RaygunRequestMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webprovider Show documentation
Show all versions of webprovider Show documentation
The official provider for the Raygun Crash Reporting service. This is the web provider that sends errors caught from your servlet/JSP application. Used in conjunction with raygun4java.core.
package com.mindscapehq.raygun4java.webprovider;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
public class RaygunRequestMessage {
private String hostName;
private String url;
private String httpMethod;
private String ipAddress;
private Map queryString;
private Map data;
private Map form;
private Map headers;
private String rawData;
public RaygunRequestMessage(HttpServletRequest request)
{
httpMethod = request.getMethod();
ipAddress = request.getRemoteAddr();
hostName = request.getRemoteHost();
url = request.getRequestURI();
queryString = QueryStringToMap(request.getQueryString());
}
public Map QueryStringToMap(String query)
{
String[] params = query.split("&");
Map map = new HashMap();
for (String param : params)
{
String name = param.split("=")[0];
String value = param.split("=")[1];
map.put(name, value);
}
return map;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy