JSP Dynamo Request Retrieval
by Frank Kim on Aug.30, 2005, under Page Development, Programming
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);
Related posts:
September 16th, 2005 on 11:58 AM
Thanks,
It helped me a lot.
one more doubt I have that, how can convert the atg.portal.servlet.PortalServletRequest object to DynamoHttpServletRequest.
September 23rd, 2005 on 7:03 AM
Unfortunately you can’t convert a PortalServletRequest object to a DynamoHttpServletRequest object. Neither class is a subclass of the other.