on 11-16-2005 2:39 AM
Hi ,
I tried both the codes given in Weblogs for redirecting to another URL from a Webdynpro .
Code Sample 1
==============
HttpServletResponse request = ((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter)
WDWebContextAdapter.getWebContextAdapter()).getHttpServletResponse();
String redirectUrl = "http://www.google.de";
try {
request.sendRedirect(redirectUrl);
} catch (IOException e) {
//@TODO: handle exception
e.printStackTrace();
Problem I faced
###############
No Errors but not performing redirection.
Code Sample 2
=================
IWebContextAdapter wca =
(IWebContextAdapter)WDWebContextAdapter.getWebContextAdapter();
String redirectUrl = "http://www.google.de";
wca.sendRedirect(redirectUrl);
Problem I faced
###############
Failed to IWebContextAdapter package. I searched for this class in NWS help but couldn't find.
I am using NWS-Ver2.0.3 and J2EE engine 6.3
Can anyone help?
Thanks in Advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chemmam,
Full class name is com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter. It's available for any WD application in NW04 (however, it is not recommended to use while it's internal).
Try the approach with "Exit plug" with sole Url parameter.
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Why dont u use linkToURL ui element. That should help you to move from one WDApp to another website like google. But if you want to do it dynamically within the code then your code, has to be IWDWebContextAdapter and not IWebContextAdapter i suppose.. Change it and see.
regards
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.