cancel
Showing results for 
Search instead for 
Did you mean: 

JSP DynPage Component - how to launch and pass a parameter

Former Member
0 Kudos
218

Hi folks,

I have created a component based on a JSP DynPage and uploaded the par to the Portal (EP5 SP5).

I would like to launch this component from a link (url) from another page and also pass a parameter as part of the url. The JSP DynPage should then retrieve the parameter from the request.

I have tried to launch the component and pass a parameter called name using the following url and then retrieve the value from the request object(as per standard JSP practice)http://<portalIP:port>/irj/<etc>....<MyComponentName.default>?name=Adam

but this doesn't appear to work.

Can anyone see where I'm going wrong or provide a different way of achieving this?

Thanks.

p.s. good to see that there's other people with Java and SAP skills!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You have to call it using the <PAR name>.<component name> ex:

PurchaseOrder.displayPDF?9000000184_0000

Then in the component displayPDF you have to do:

IResource ir = request.getResource(IResource.JSP,"jsp/displayPDF.jsp");

request.dispatchRequest(ir,response);

Then in your JSP page you can do a request.getQueryString() to get the querystring.

It is a long process but it works....

Good luck

Marjolaine

Former Member
0 Kudos

Thanks Marjolaine

I'll give it a try!

Former Member
0 Kudos

Come on peeps, someone out there must now how to launch a portal component from a URL!