Getting current server node url.

Hi,
I have a requirement where i need to refresh the whole browser.
1. We have three boxes DEV,ACC,PROD all having different url.
can u pls let me know hoe to get the current server node url in a Dynpage application.
What methods can I use for this.

Hi,
If you nodes are in cluster you get information from similarly as below:
import com.sapportals.portal.prt.service.clusterinformation.IClusterInformation;
public static int getCurrentNodeId() throws PortalRuntimeException
          //     Get the current Node
          final IClusterInformation clusterInfo = (IClusterInformation)PortalRuntime.getRuntimeResources().getService(IClusterInformation.KEY);
          return(clusterInfo.getNodeId());
public static String getServerName()
          String name = null;
          try
               InetAddress host = InetAddress.getLocalHost();
               name = host.getHostName();
          }catch(UnknownHostException hostExcept)
               LogHelper log = GlobalConfig.getServiceLog();
               log.log("Error looking up server name: ", hostExcept);
          return(name);
Hope this will help you.

Similar Messages

  • How to get current server node information uses webdynpro?

    Hi,everybody!
            Can I use webdynpro to get the current logined on sever node informaition,such as server node id,server node number.

    This problem is resolved.

  • Using IClusterInformation Interface to get the server node.

    Hi ,
       I have created a portal application which contains an Abstract Portal Component to display the server node the user logs on.
    I have written the following code :
    IClusterInformation clusterContext =
    (IClusterInformation) PortalRuntime.getRuntimeResources().getService( IClusterInformation.KEY);
    I too added the Sharing Reference , "com.sap.portal.runtime.system.clusterinformation" to Application Config property in Portalapp.xml file.
    But still am getting an error "IClusterInformation cannot be resolved".
    Do I need to add some external JAR File to the Java Build Path of my portal Application. If so , Which JAR file I need to add?
    Regards,
    Eben Joyson.

    I use this to get the server - node:
    String node = "";
    Enumeration props = System.getProperties().keys();
    while (props.hasMoreElements()) {
      String thisProp = props.nextElement().toString();
      if (thisProp.startsWith("dsr.") && thisProp.endsWith(".buffersize")) {
        node = thisProp.substring(5 + thisProp.indexOf("_" + SID + "_"), thisProp.indexOf(".buffersize"));
          if (node != null) {
            String cluster = node.substring(0, 6) + "00";
            node = node.substring(0, 8);
    Hope it helps
    Johannes

  • Help in getting current expanded node in Tree UI

    HI,
    I have a requirement to build a tree dynamically. On expanding each node I need to create sub nodes inside that. But it is always creating inside the node where the lead selection is and not inside the current expanded node. Even though I have used getTreeSelection () to get the current element.
    <b>Detailed description about the application.,</b>
    I have created a context with the following structure,
    TreeNode (0..n)
    |
    |--> ChildNode (recursive SiteTree)
    |--> Name (string)
    I have created a Tree UI Element in the view and inserted a node type 'TreeNodeType'.
    I have set the properties of the inserted node type as given bellow,
    Value Attribute in TreeNode -> Name I have assigned to 'Text' property of 'TreeNodeType'.
    Initially I have created four nodes in the init() method ., using the following code :
    for(int i=0;i<3;i++)
    IPrivateTestTreeView.ITreeNodeNode treenode=wdContext.nodeTreeNode();
    IPrivateTestTreeView.ITreeNodeElement treeelement=wdContext.createTreeNodeElement();
    treeelement.setName("Testroot:"+i);
    treenode.addElement(treeelement);
    Now I need to create sub-nodes for this dynamically.,
    I have created an action and called it in 'onLoadChildren' event of 'TreeNodeType' with the following code:
    public void OnCurrentSelection()
    IPrivateTestTreeView.ITreeNodeElement el = wdContext.nodeTreeNode().getTreeSelection();
    wdComponentAPI.getMessageManager().reportSuccess(el.getName());
    <b>
    Where this returns me only the name of LeadSelection node and not the  node which i try to expand.  </b>
    Is there anyway I can get the currently expanded node., Kindly help me out in this.
    Points will be rewarded for helpful answers. Thanks in advance.
    Regards,
    Nirmal

    HI Ayyapparaj ,
    <b>First I would like to thank you for your reply.</b>
    So it means that we cannot identify the currently expanded node in tree UI element and It will always be the lead selection node we will be able to get rite?
    Can we make the current lead selection to currently expanded node 'By Default'?
    Coming back to your solution.,
    I created a context element 'isExpanded' of type boolean inside the TreeNode.
    You said that there will be a call made to 'getter and setter' methods while we expand the node and we can set the lead selection to that element from there.
    Could you please give me some more details of how to achieve it.
    Thanks in advance.
    Regards,
    Nirmal G

  • Get current filename or url

    Hello Everyone,
    is there a function that retreives your current filename?
    I would like to be able to know the name of the cfm file i'm
    visiting, without the rest of the folder structure.
    Thanks for any info!

    #getfilefrompath(cgi.script_name)#
    query string, if you need it, is available in
    #cgi.query_string#
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • File system getting full and Server node getting down.

    Hi Team,
    Currently we are using IBM Power 6 AIX operating system.
    And in our environment, for development system, file system is getting full and development system is getting slow while accessing.
    Can you please let me know , what exactly the problem & which command is used to see the file system size and how to resolve the issue by deleting the core files or some ting. Please help me .
    Thanks
    Manoj K

    Hi      Orkun Gedik,
    When i executed the command df -lg and find . -name core noting is displayed, but if i execute the command df is showed me the below information. below is an original file which i have modified the sid.
    Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
    /dev/fslv10     52428800  16279744   69%   389631    15% /usr/sap/SID
    Server 0 node is giving the problem. its getting down all the times.
    And if i check it in the /usr/sap/SID/<Instance>/work for the server node "std_server0.out file , the below information is written in the file.
    framework started for 73278 ms.
    SAP J2EE Engine Version 7.00   PatchLevel 81863.450 is running! PatchLevel 81863.450 March 10, 2010 11:48 GMT
    94.539: [GC 94.539: [ParNew: 239760K->74856K(261888K), 0.2705150 secs] 239760K->74856K(2009856K), 0.2708720 secs] [Times: user=0.00 sys=0.36, real=0.27 secs]
    105.163: [GC 105.164: [ParNew: 249448K->80797K(261888K), 0.2317650 secs] 249448K->80797K(2009856K), 0.2320960 secs] [Times: user=0.00 sys=0.44, real=0.23 secs]
    113.248: [GC 113.248: [ParNew: 255389K->87296K(261888K), 0.3284190 secs] 255389K->91531K(2009856K), 0.3287400 secs] [Times: user=0.00 sys=0.58, real=0.33 secs]
    Please advise.
    thanks in advance
    Manoj K

  • URL to connect especific server node

    Hi personal,
    Some time behind, my friend showed me an url count I get to address the call for a certain server node.
    http://utic115:58300/webdynpro/dispatcher/sap.com/tcSLCMS~WebUI/Cms
    Anybody oh he/she knows?
    Thank you,
    Obrigado,
    Marco Zerbini

    Hi Asha,
    Here’re some suggestions for you.
    1.       
    Please make sure the username and password are all right.
    2.       
    Please check if you’ve added the Control Panel requested URL to IE trusted site zone.
    3.       
    If you have configured an administration simple uniform resource locator (URL), you can access Lync Server Control Panel from an Internet
    browser that is running on any computer within your organization’s firewall. So please check the Admin URL in Topology Builder.
    Above all, hope useful.

  • I get a "the requested URL was not found on this server" when trying to play a song in my iphone

    I have a new iphone5 and after synking my songs and musice. I get a "The requested URL was not found on this server" when I click on a song or a music video. It is almost like itunes did not copy my songs from my account to the new iphone.

    I was having the same problems with my movies and tv shows.  I unchecked them, then rechecked them, and synced all them again.  Presto!  They are all working again.  Thank you.

  • How to get the Change node in Production Server!!!!!

    Hi Guys,
    Kindly let me know how to get the Change node in Production Server for the Transaction Code Pe03 for generating the Acknowledgement No for the year 2008 .
    Plz provide me the steps how to get the Change Node for Acknowledgement No so tat i can get the configuration done.
    Regards
    Ansuman Mohanty.

    Hi Mr!
    If you want to generate the e-file feature 40ACK, do it in our Customization client box (Golden box) & save the request & move to Quality & production.
    Still if you need to workout only in Production, than with the help of Basis people you can get the Production change mode for 5 to 10 min time & can generate it. But mostly Basis people wont give us change mode for Production box ... with ur request they can do..try it.
    Did u collected 4 quarter TAN no's for 2008 Quarter...if not collect it & generate it at a time.
    All the best:-)
    Kind Regards,
    Saisree.S

  • Since installing Lion I keep getting the error message 'there was a problem connecting to the server. URLs with the type 'file:" are not supported"' How can I fix this?

    since installing Lion I keep getting the error message 'there was a problem connecting to the server. URLs with the type 'file:" are not supported"' How can I fix this?

    A Davey1 wrote:
    Not a nice answer!
    Posting "Check the 'More like this'" area and not simply providing the answer is a great way to make these groups worthless.
    You're ignoring context.  On the old Apple Discussion Groups I never posted replies like that, instead giving people relatively detailed answers.  The new Apple Support Communities made things worse by introducing certain inefficiencies.  Then came Lion.  The flood of messages that came with Lion required a painful choice for any of the people who had been helping here: (1) Give quality responses to a few questions and ignore the rest.  (2) When applicable, give a brief answer such as the one that you found objectionable.  (3) Give up all the other normal activities of life and spend full time trying to answer questions here.
    People who needed help with Lion problems seemed to have trouble discovering existing message threads that described how to solve their problems.  I never posted the suggestion of "Check the 'More like this' area" without verifying that the help that the poster needed could be found there.  Even doing that, what I posted saved me time that I could use to help someone else.
    The people helping here are all volunteers.  None of them is being paid for the time they spend here.  They all have a life outside of Apple Support Communities.  It's arrogant of you to demand that people helping here spend more time than they already do.

  • How to get the parent node of the current node?

    Hi all,
    i want to get the parent node of the current node and the not the parent of the parent node.
    thank you very much

    Hi,
    the parent node of <subnode1-2>29.99</subnode1-2> is (node1), how can do to get <node1> throw <subnode1-2>29.99</subnode1-2> the sub node of <node1>.
    As per my understanding the parent node of <subnode1-2>29.99</subnode1-2> is book not the node1.
    If you want node 1 as a parent of subnode1-2 than your xml will look like this.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book>
    <fathernode>Harry Potter</fathernode>
    <node1>
           <subnode1>29.99</subnode1>
           <subnode2>29.99</subnode2>
    </node1>
    <node2>
           <subnode1>19.99</subnode1>
           <subnode2>19.99</subnode2>
    </node2>
    </book>
    </bookstore>
    and also if you want tom retrive float data than refer following XPATH.
    "//book[[price='1000']]/price/text()"
    Regards,
    Manoj Bilthare

  • JTree: How to get the currently selected node

    How do I get the currently selected node in JTree?
    getLastSelectedPathComponent() this method always return the last selected node and not the current one.
    Thanks in advance
    Sachin

    Use
    TreePath selectedPath = tree.getSelectionPath()If your tree allows multiple selections, use
    TreePath [] selectedPaths = tree.getSelectionPaths() this will return an array of all selected tree paths.
    Once you get the tree path, call the treePath.getLastPathComponent(). this should tell you the currently selected node.
    Hope this helps
    Sai Pullabhotla

  • I keep getting an error message saying "There was a problem connecting to the server.  URLs with the type "file:" are not supported."  Can someone help me get rid of it.

    I keep getting an error message saying "There was a problem connecting to the server.  URLs with the type "file:" are not supported"  Can someone help me locate and get rid of this error.

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • My Mac suddenly started getting a pop up message saying "There was a problem conecting to the server. URLs with the type "file" are not supported." My internet is working fine,no problem connecting. I just keep getting this message which I click off .

    My Mac suddenly started getting a pop up message saying "There was a problem conecting to the server. URLs with the type "file" are not supported." My internet is working fine,no problem connecting. I just keep getting this message which I click off and continue working.

    Open the Time Machine pane in System Preferences. If it shows that Time Machine is ON, click the padlock icon in the lower left corner, if necessary, to unlock it. Scroll to the bottom of the list of backup drives and click Add or Remove Backup Disk. Remove all the disks, then add them back. Quit System Preferences. Test.

  • How to get current URL from Internet Explorer ?

    Hi,
    I have design an add-on for IE and I'm
    trying to get URL from IE which is currently opened that is which is currently user sees. Is there any way to get it? I want to store that address in label and use it for something useful. Is it possible with C# ?
    I have did the following code to get current URL but it showing last opened URL instead of current URL which is user see
    using SHDocVw;
           SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();
                         string filename;
                         foreach (SHDocVw.InternetExplorer ie in shellWindows)
                             filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
                             if (filename.Equals("iexplore"))
                               label1.Text=ie.LocationURL;
                               label1.Text = ie.LocationName;
    and I have tried this one also 
    foreach (InternetExplorer ie innew ShellWindows())
       label1.Text = ie.LocationURL.ToString();
       label2.Text = ie.LocationName.ToString();
    Please give me any suggestion or code to solve this problem.
    Thanks.
    Priyanka

    You already got addon running in the active ie instance. You just need to catch the WindowStateChanged event in every instance so you can write down the last event with OLECMDIDF_WINDOWSTATE_USERVISIBLE somewhere. When you need the active IE instance, just
    pull from your save.
    Note an IE tab may crash and take your addon with it. It is better to start a broker process to store your global data.
    Visual C++ MVP

Maybe you are looking for