return name != null ? name : bean.getClass().getSimpleName().toLowerCase();
}
protected void setRequestParameters(HttpServletRequestFilter request) {
if (mc != null) {
UriInfo ui = mc.getUriInfo();
MultivaluedMap<String, String> params = ui.getPathParameters();
for (Map.Entry<String, List<String>> entry : params.entrySet()) {
String value = entry.getValue().get(0);
int ind = value.indexOf(";");
if (ind > 0) {
value = value.substring(0, ind);
}
request.setParameter(entry.getKey(), value);
}
List<PathSegment> segments = ui.getPathSegments();
if (segments.size() > 0) {
doSetRequestParameters(request, segments.get(segments.size() - 1).getMatrixParameters());
}
doSetRequestParameters(request, ui.getQueryParameters());
request.setParameter(ABSOLUTE_PATH_PARAMETER, ui.getAbsolutePath().toString());
request.setParameter(RELATIVE_PATH_PARAMETER, ui.getPath());
request.setParameter(BASE_PATH_PARAMETER, ui.getBaseUri().toString());
request.setParameter(WEBAPP_BASE_PATH_PARAMETER, (String)mc.get("http.base.path"));
}
}