jboss portal + as from jboss.org
A portlet includes a jsp page, which in turn calls a tag:
String userAgent = ((HttpServletRequest) pageContext.getRequest()).getHeader("User-Agent");
userAgent is always null. Request is a RenderRequest.