Skip to Content
author's profile photo Former Member
Former Member

unable to get IPortalComponentRequest on jsp page

I am trying to acquire the request object from a jsp page. I have the following code:

IPortalComponentRequest request = (IPortalComponentRequest)pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);

When it compiles I get the following error:

Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: C:/usr/sap/SBD/JC02/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/reporting_prototype_i/work/pagelet/_sapportalsjsp_list_caller_page.java:39: incompatible types

*found : javax.servlet.jsp.PageContext*

*required: com.sapportals.htmlb.rendering.PageContext*

PageContext pageContext = factory.getWPPageContext(componentRequest, response, null, true,8192,true);

and then about 25 more lines related to the error.

As far as I can tell I am acquiring the request correctly but it still throws this error. All the examples show javax.servlet.jsp.PageContext so Iam not sure how they do not get an error. Any help would be greatly appreciated.

Thanks

Paul

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2010 at 10:33 PM

    Ok this is working now. Needed to import IPortalComponentRequest.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.