on 05-21-2009 3:18 PM
Hi Experts,
I am new Portal Content Development.
I have a JSP application deployed on SAP NW portal server as ear file using Eclipse.
Now to integrate this application in portal i have to create an Iview.
To Create Iview i have to create JSPDynpage.( Since URL Iview will not be useful in my case)
I am trying to follow Approach #2 as mentioned by Detlev in this thread [;
Now in this JspDynPage I have to call my JSP application.
In this application i want to read SAP NW server name and port name to create URL of JSP Application.
after which URL would be :
http://<Server host name >:<port>/JSPapplication.jsp
Now how do i read Server Host name and Server Port name from JSPDynpage?
Thanks in advance for the answer.
Regards,
Ashish Shah
Why not use a relative path URL? Just using /JSPApplication.jsp should work. I suggest you try that first.
If you really want to get your server name, that can be done.
Something like
String me = System.getProperty("SAPMYNAME").toString();
me = me.substring(0,me.indexOf("_"));
will work
Getting the port is more complicated, mostly because your application doesn't know the portnumber! You can get the instance number by using
String inst = System.getProperty("SAPSYSTEM").toString();
and assume that the port number if "5"inst"00", but that only works if your portal uses the standard port numbering scheme.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Thanks for your suggestion , i tried it.
However it seems to be struts application and url for the application is http://<server>:<port>/MyStruts/MyStrutsHome.do.
I tried following relative paths: and these are the errors
MyStrut/MyStrutHome.do --> Unable to fetch site http://MyStrut/MyStrutHome.do.Error # 502
/MyStrut/MyStrutHome.do --> Unable to fetch site http:///MyStrut/MyStrutHome.do.Error # 400
MyStrut/ --> Unable to fetch site http://MyStrut/.Error # 502
/MyStrut/ --> Unable to fetch site http:///MyStrut/.Error # 400
MyStrutHome.do -->Unable to fetch site http://MyStrutHome.do.Error # 502
Not sure weather i can create a URL Iview for Struts based applications.
Can you share your thoughts on this?
meanwhile i am trying to fetch server name and port in my JSPDynpage as suggested by you.
Thanks for your help till now.
Regards,
Ashish Shah
Hi,
Please try the following code to get the server name and port from JSPDynPage
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
HttpServletRequest req=request.getServletRequest();
String serverName=req.getServerName();
int serverPort=req.getServerPort();
Thanks
Muthukumar
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.