In JHTML pages, the request object is of class DynamoHttpServletRequest
which has many methods that are not part of the HttpServletRequest
interface including the very useful resolveName
method for looking up components in Nucleus.
In JSP pages on ATG there is no guarantee that the request object is of class DynamoHttpServletRequest
. According to the JSP specification the request object always implements the HttpServletRequest
interface.
If you need to get the DynamoHttpServletRequest
do something like this:
DynamoHttpServletRequest dynRequest = atg.servlet.ServletUtil.getDynamoRequest(request);
If you need to get a PortalServletRequest
do something like this:
PortalServletRequest portalRequest = (PortalServletRequest) request.getAttribute(atg.portal.servlet.Attributes.PORTALSERVLETREQUEST);
Thanks,
It helped me a lot.
one more doubt I have that, how can convert the atg.portal.servlet.PortalServletRequest object to DynamoHttpServletRequest.
Unfortunately you can’t convert a PortalServletRequest object to a DynamoHttpServletRequest object. Neither class is a subclass of the other.