on 03-19-2007 7:54 PM
Hi Friends,
Could anyone please let me know how to get the Portal URL from the WebDynpro. I mean by Portal URL as -<u><i><b> http://myserver:port/irj</b></i></u>;
Being irj as a webapplication, <b><i>how can we get this whole url from webdynpro?</i></b>
Thanks
Raghavendra
If it is not recommended to use TaskBinder class, then why does SAP have it in their documentation?
[HERE|http://help.sap.com/saphelp_nw04s/helpdata/en/bb/fdc4402418742ae10000000a155106/frameset.htm]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got Answer!! its a workaround. I added the servlet.jar to buildpath of project and used the below code. Only problem i have is , How to identify which protocol the portal is using. ie., http or https. Current url works for http
String slHostName=TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();
String slPortNumber=String.valueOf(TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort());
wdContext.currentContextElement().setImgAnon("http://" + slHostName + ":" + slPortNumber + "/irj/go/km/docs/documents/CompImages/comp-logo.jpg");
Thanks,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raags,
I also got teh same problem, I need to fetch server host and port at runtime and I used the same code but its not workin. Actually its not able to resolve the protocol adapter. i tried organizing imports but it didnt worked. I have added servlet.jar in my libraries.
Kindly help.
Regards Manu
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.