cancel
Showing results for 
Search instead for 
Did you mean: 

Code sample of sendRedirect using Web Dynpro NetWeaver 6.4

Former Member
0 Kudos

Hi ALL,

I’m building a Web Dynpro application under Netweaver Developer Studio 6.4 and I need to redirect to another URL while the client click on a button.

I know it should be something like request.getServletResponse(true).sendRedirect("myURL");

But I’m not sure how to get the request, or the response in order to apply the sendRedirect method.

Do you have any code sample or Web documentation I could use to redirect my Web Dynpro application?

Best regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jean

check the following document on inter application navigation,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/91b6ad90-0201-0010-efa3-962...

cheers

sameer

Former Member
0 Kudos

Hi Sameer,

Thank you for the information.

Is there any documentation on Inter-Application-Navigation from Web Dynpro to none Web Dynpro application? (i.e.by clicking a button on a Web Dynpro application, it will redirect to “http://www.yahoo.com/” ).

Best regards,

Former Member
0 Kudos

Navigation to external applications is possible through outbound plugs of the name Url defined an as exit plug in the interface view. Attach the Interfaceview to the view you want to perform navigation and fire the outbound plug of the interfaceview via API

Regards

Pran

former_member182372
Active Contributor
0 Kudos

Hello Jean-François,

To navigate to http://www.yahoo.com you have 2 options:

1) Call

WDClientUser.forceLogoffClientUser("http://www.yahoo.com");

2) Define Outbound plug with name Url in interface view, mark it as exit, define parameter Url with type String. Add usage of interface view in your view and add something like this in action handler:

wdThis.wdGet...InterfaceViewController().wdFirePlugUrl("http://www.yahoo.com");

Best regards, Maksim Rashchynski.

former_member190085
Participant
0 Kudos

HI Maksim,

The second method wdThis.wdGet...InterfaceViewController().wdFirePlugUrl("http://www.yahoo.com");

and it works for me if i run the webdynpro application in a separate browser. But, if i put the application in a portal iview, it gives the below exception.

java.lang.StringIndexOutOfBoundException: String index out of range: -1

Should i use some different relative url when using it as an iview in portal? Can you please help me here?

Regards,

Vijay.K

former_member190085
Participant
0 Kudos

HI Maksim,

The second method wdThis.wdGet...InterfaceViewController().wdFirePlugUrl("http://www.yahoo.com");

and it works for me if i run the webdynpro application in a separate browser. But, if i put the application in a portal iview, it gives the below exception.

java.lang.StringIndexOutOfBoundException: String index out of range: -1

Should i use some different relative url when using it as an iview in portal? Can you please help me here?

Regards,

Vijay.K

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try using the following code:

wdComponentAPI.getWindowManager().createExternalWindow("http://www.google.com");

Regards,

Utkarsh.