cancel
Showing results for 
Search instead for 
Did you mean: 

Portal request object.

Former Member
0 Kudos

Hi:

I wanna use IPortalComponentRequest class to get values from portal but I cann't find the required libraries for the same.

Any ideas?

Thanks,

PKK.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Sam:

I have created a DC of type Web Dynpro and imported the

file structure into that project.

Compiled(Build) and Deployed.

In my project2 (Web Dynpro project) I refer above DC project in the library reference.

Having done this I compiled my project2 and deployed and I still get NoClassDefFoundError.

Any suggestions?

Thanks

Praveen.

Former Member
0 Kudos

Hi Praveen,

Let me warn you that this might not be a right solution.

But I will take you till where I reached..

To refer a DC in another DC, it is not enough to make a library reference..

Please find the below help path in the NW'04 documentation..

Web Dynpro->The Development Process->Setting Up a Web Dynpro Project->Developing in the Team

After creating a DC and defining a proper usage for it in the second DC project deploy them in order..

By this you won't get the NoClassDefFoundError. But you will get a "ClassCastException"..

So As I suggested in my previous mail, it is better to use "HttpServletRequest" type casting instead of "IPortalComponentRequest"

Or else give a try to run the app in EP6.0 SP3...

Thanks and Regards,

Sam Mathew

Former Member
0 Kudos

Thanks Sam.

I have one more small problem.I was able to compile my classes and all but when I deploy my application on the portal System I get Class Defention not found for com.sapportals.portal.prt.component.IPortalComponentRequest

How do I add References in my project?

Thanks,

Praveen.

Former Member
0 Kudos

Hi Praveen,

Even I had the same problem..I added the prtapi.jar to the J2EE engine..Still no use..

Here is a crooked way...

Create a DC project and add the files in the prtapi.jar to this project.Deploy this DC first. Then refer the DC1 in DC2 which is your local application..In this case you won't get the "no class found" exception.

This also won't solve your problem. Becase the system will through you a type cast exception when you cast IWebContextAdapter to IPortalComponentRequest..

But you could do one thing. type cast the IWebContextAdapter to HttpServletRequest ..and then use the request object..

Cheers,

Sam

Former Member
0 Kudos

Have you tried running the WD on a Portal 6.0 SP3 system which has the WAS 640 engine..

Cheers,

Sam

Former Member
0 Kudos

AFAIK, it is not possible to get a handle to the request object in webdynpro.

-Shakeel

Former Member
0 Kudos

Hi,

IPortalComponentRequest is available at design time with NDS. But you have to manually add this jar to the project. The path is <Drive>:\Program Files\SAP\JDT\eclipse\plugins\com.sap.ep.applicationDevelopment\prtapi.jar.

Runtime doesn't have these files. I added it to the J2EE lib using the deploy tool. But it seems the runtime is not able to locate the jar. Anyway you could give a try.

Option 2: Run the WD on a Portal 6.0 SP3 system which has the WAS 640 engine..

Thanks and Regards,

Sam Mathew