cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to navigate/pass data from a standalone WD App to JSP Struts App

Former Member
0 Kudos

Passing data:

How to pass data from a standalone Web Dynpro application (NON-PORTAL) to Apache Struts JSP application (SAP ISA Application) through an http URL running on two different boxes? Is it possible to use cookies? If "YES" what API should be used in Web Dynpro to create cookies in NW04S.

Navigation:

I am currently using exit plug to navigate to the http URL from the WD application, is there any better way other than exit plug? If browser back button is used to navigate from JSP link to WD page, error occurred due expired WD application. Is there a way to disable browser back button or a way to force a browser refresh on back button click?

Any help is appreciated.

Kind Regards,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The data can be passed using URL parameters.

In NW04s, Web Dynpro provides "Suspend" and "Resume" plugs for transferring the control to Non-WebDynpro framework and back to Web Dynpro application.

1. Define an outbound plug of type suspend in the interface view

-Suspend plug automatically generates a parameter with the name URL of type string

2. Define a method (e.g. onActionSuspend) in the view controller, set return type void

3. Define an action in the view controller (e.g. suspend, the event handler is onActionSuspend)

4.Create the URL‘

URL = newString(URLofTheExternalFrameworkapplication+ paramsString)

5.Implement the FirePlug

wdThis.wdGetTopLevelComponentInterfaceViewController().wdFirePlugSuspend(URL);

6.Define an inbound plug of type resume in interface view.

public void onPlugResumePlug{

String resumepara=

WDWebContextAdapter.getWebContext.getRequestParamet

er/“param1“);

From the non-WD framework,

1. you have to get the currentURL

String wdUrl= getCurrentUrl();

2. Decode the URL

try{

wdUrl= URLDecoder.decode(wdUrl,“ISO-8859-1“);

}

3.Then you can build the URL by appending URL params

wdResumeUrl= wdUrl+ 'param1=' + result + 'param2'

4. invoke it, the WD application would be resumed without getting timed out.

If you don't have plugs of type Suspend and Resume in interface view in your IDE, then it maybe in the later versions of NW04s.

Hope this helps.

Thanks and Regards,

Rohit Jaiswal