cancel
Showing results for 
Search instead for 
Did you mean: 

Request object in JSP from abstract portal component

Former Member
0 Kudos

Hi,

I have an abstract portal component like this:

import com.sapportals.portal.prt.component.*;
import com.sapportals.portal.prt.resource.IResource;

public class Nav2 extends AbstractPortalComponent
{
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
    {
		IResource jspResource = request.getResource(IResource.JSP, "jsp/Nav2.jsp");
		response.include(request, jspResource);
    }
}

Now in the called JSP, I want to use the request object.

e.g.

Hashtable env = new Hashtable();
env.put("NavigationPrincipal",request.getUser());

But, the request object is not available.

How to I get the same object available here?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Prem,

Each JSP page has access to certain implicit objects that are always available. One of them is the request object. The request is subtype of javax.servlet.ServletRequest e.g: javax.servlet.http.HttpServletRequest.

Is this the request object that you wwant to use inside the jsp or it is some portal specific request object?

If you have the first case you simple can use "request" to refer to the request object.

I hope this helps.

Regards,

Diyan