Detecting the server url dynamically

I am finding it difficult to get url of the server dynamically
I am getting it through java script using window.location.host
is it possible using java

Hi,
The solution depends on the specific WL version you are using, but chances are you should be looking at the constructor of the implementation of the service provider for your specific WS. There is usually a default constructor, and a constructor that takes an URI, this second one is the one you should use to set the URI to something different than the default URI.
Regards,
LG

Similar Messages

  • Firefox has detected the server is redirecting the request for this address in a way that will never complete. This is happening in my email program with comcast but does not happen with IE e

    Question
    firefox has detected the server is redirecting the request for this address in a way that will never complete. This is happening in my email program with comcast but does not happen with IE e edit

    Thanks to cor-el for the suggestion given in the link. Sadly I have to report:
    1) It is not a bookmark problem and it makes no difference whether I put
    www.adobe.com or 192.150.18.117 in the address bar.
    2) Cookies are allowed and there are no exceptions set
    3) All cookies have been deleted
    4) network.http.sendRefererHeader is already set to 2
    That deals with the items in the linked document.
    Additional information:
    5) I can get into the adobe site from a clean "in memory" installation of PuppyLinux using Seamonkey using the same router and dhcp setup.
    6) un-installing all Mozilla products - rebooting and re-installing makes no difference even when I remove the mozilla folder from docs&settings.
    so as I said in previous post (as annonymous) not a lot makes sense.
    Bear in mind that I have no problem running tracert in a command window
    Tracing route to www.adobe.com [192.150.18.117] over a maximum of 30 hops:
    1 11 ms 10 ms 9 ms 10.0.0.1
    2 13 ms 12 ms 11 ms glo-2-dsl.as9105.net [212.74.111.191]
    3 13 ms 12 ms 11 ms ge1-2-27.glo0.as9105.net [212.74.106.106]
    4 14 ms 12 ms 13 ms pos0-0.bri1.as9105.net [212.74.108.162]
    5 17 ms 16 ms 17 ms ge0-0-0.he-lon0.as9105.net [212.74.109.14]
    6 17 ms 17 ms 16 ms 10.72.11.75
    7 16 ms 17 ms 17 ms xe-0-3-0-10.lon20.ip4.tinet.net [213.200.77.177]
    8 91 ms 92 ms 99 ms xe-5-1-0.was12.ip4.tinet.net [89.149.184.34]
    9 92 ms 92 ms 93 ms xe-0.equinix.asbnva01.us.bb.gin.ntt.net [206.223.115.12]
    10 162 ms 170 ms 162 ms as-3.r20.snjsca04.us.bb.gin.ntt.net [129.250.2.167]
    11 166 ms 166 ms 165 ms ae-1.r07.snjsca04.us.bb.gin.ntt.net [129.250.5.53]
    12 162 ms 163 ms 161 ms xe-0-2-0-3.r07.snjsca04.us.ce.gin.ntt.net [128.241.219.86]
    13 166 ms 163 ms 161 ms 192.150.18.11
    14 166 ms 166 ms 165 ms www.adobe.com [192.150.18.117]
    Trace complete.
    and I can ping the site.
    so where now ?

  • How to get the server URL?

    I am running WLS server on my machine to host a web app in ADF. How can I get the server name in my manged bean. I dont want to hardcode. The URL is something like this
    http://<my-machine-name>:<port>/epmos/faces/myapp/MyPage.jspx
    How can I retrieve the part
    http://<my-machine-name>:<port>

    In JSFUtils there is a getPageURL method. it will give the whole URL of your page. you can play with the URL string to get the part you need.
       * Method to create a redirect URL. The assumption is that the JSF servlet mapping is
       * "faces", which is the default
       * @param view the JSP or JSPX page to redirect to
       * @return a URL to redirect to
      public static String getPageURL(String view)
        FacesContext facesContext = getFacesContext();
        ExternalContext externalContext = facesContext.getExternalContext();
        String url =
          ((HttpServletRequest) externalContext.getRequest()).getRequestURL().toString();
        StringBuffer newUrlBuffer = new StringBuffer();
        newUrlBuffer.append(url.substring(0, url.lastIndexOf("faces/")));
        newUrlBuffer.append("faces");
        String targetPageUrl = view.startsWith("/")? view: "/" + view;
        newUrlBuffer.append(targetPageUrl);
        return newUrlBuffer.toString();
      }

  • Weblogic RMI -- detecting the server address?

              Hello,
              Is there any way for an Weblogic RMI client to detect to which server it is connecting
              in a clustered environment?
              I have two WLS6.0sp1 servers and several RMI clients written with JFC/Swing.
              I'd like to write the server address in a client's log files.
              Regards,
              shun
              

              Hello,
              Is there any way for an Weblogic RMI client to detect to which server it is connecting
              in a clustered environment?
              I have two WLS6.0sp1 servers and several RMI clients written with JFC/Swing.
              I'd like to write the server address in a client's log files.
              Regards,
              shun
              

  • How the client to detect  the server has closed the socket?

    if the server closed the socket by an unnormal way, for example, closing the socket compulsively. Then the client will show the "IOException:java.net.SocketException: Connection reset" message,
    how the client to avoid such an error message to the user/customer, I mean , what the client can deal with such a message?
    where to put the dealing code?
    try{ int receivedLength=in.read(receivedBytes);
    }catch(SocketException e){
    // put the code here? }
    catch(IOException e){
    }

    Do you know how to prove it---"a socket read should
    always always always have a timeout";As ejp said (IMHO ...) it's his opinion and doesn't need proof. I respect his opinion, but I often write code that doesn't set this.
    Instead I use 2 threads per connection, and don't care if the read thread goes to sleep, since I can still write. If you only have one thread per connection, you better ensure that the read will end in a relatively short amount of time, even if your partner decides it's time to go for lunch.
    how the length of this timeout will be? That is a business decision, it all depends on the expected time between received messages and is application dependent.
    is it a field of the socket?If you are using blocking mode sockets you set this with setSoTimeout. If you are using non blocking mode NIO you specify it on the select call, although the soTimeout should also work there, although I've never tried that.

  • There was a problem connecting to the server - URL's with the type 'file:' are not supported.

    Hi there,
    I recently upgraded to OSX 10.7 and it has been operating faultlessly ever since, other then this one small problem that keeps popping up.
    This message appears, I press OK, the message then appears again for the second time, I press OK and it goes away. This happens every few hours and is not limited to any particular applications, e.g using Safari only.
    I have verified and repaired Disk Permissions using Disk Utility incase it was a broken permission from the upgrade, however the message has still been appearing.
    The basics of my setup are as below:
    Any help in solving this annoyance would be greatly appreciated!

    Thanks heaps for the reply sd,
    I checked incase this had been the problem however my homepage contained no invalid url file (see below).
    Strangely though, while I was in Safari preferences this prompt appeared.
    So I changed Safari to open in 32-bit mode instead of 64-bit mode and so far I havent had the 'problem connecting to server' message appear.
    Fingers crossed this is the end of it!
    EDIT: False alarm...still getting the message.
    Message was edited by: Enjoy The Freedom

  • Error message there was a problem connecting to the server URLs with the type "file" are not supported

    A message displays frequently on the screen with the above error. Any ideas?

    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.

  • Issue while passing Target URL dynamically in SOAP Receiver Adapter

    Experts,
    I am stuck with an issue while passing the Target URL dynamically.
    The UDF required for this works just fine. I can see the Target URL in Dynamic Configuration header(The Key is TServerLocation) in SXMB_MONI but the request that I am sending is not reaching the web service.
    Some posts have suggested to hard code the Target URL as http://.
    Below is the error that I am getting when I hard the Target URL as http://:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context>XIAdapter</context>
                   <code>RecoverableException</code>
                   <text>com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:453)
         at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:131)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:834)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    When I hard code the Target URL as Test (any dummy value), the error that I get is different. (Detailed error shown below)
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context>XIAdapter</context>
                   <code>RecoverableException</code>
                   <text>com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: no scheme
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:453)
         at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:131)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:834)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    I've referred the post [Dynamic URL for SOAP receiver adapter;.
    I am on PI 7.0.
    Any help in this regard is highly appreciated.
    Best Regards,
    Vijay

    Issue resolved... by doing this:
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "TAuthKey");
    conf.put (key2, "username");
    In the advanced tab of the communication channel, set the flag "View Authorization keys", and then added "username" (user to access the dynamic target url) and the password (2 times).
    That's it...

  • Retrieve portal url dynamically.

    Hi,
    Could anybody pls let us know how to identify the portal Url dynamically using a function module or SAP Table?
    We want to put this URL in the notification e-mail so it is dynamic when the object is moved to Quality and production systems.
    Thanks in advance.

    One way to make Portal URL dynamic is to create a ztable with fields ABAP system id and portal URL.
    Select Portal URL from this table based on the sy-sysid.
    By this way you dont have to change your code. Just change table entry on each server.
    Hope this helps!
    Monalisa

  • SDK : how to get the server adress and port ?

    Almost everything is in the title, I'm look for code to get the server URL and port where the ME is running ;o)
    There should be some standard API I guess.
    Thanks
    Regards

    Hi,
    In the code that I write I usually have access to the HTTP Request Object.
    String serverName = request.getServerName();
    String serverPort = request.getServerPort();
    Then I just do a compare on the returned value to see if I am on our Test or Production server.
    if(request.getServerName().indexOf("prodservername") >= 0)
      // PRODUCTION CODE HERE
    else
      // TEST CODE HERE
    Hope this helps,
    Mike

  • Firefox can't find the server

    Firefox can't find the server
    == URL of affected sites ==
    http://

    See: http://support.mozilla.com/en-US/kb/Server+not+found
    Most often, this is the section of that article that works for users: http://support.mozilla.com/en-US/kb/Server+not+found#Firefox_cannot_load_certain_websites
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Install/Update Adobe Flash Player for Firefox (aka Shockwave Flash)'''</u>: your ver. 10.0 r45; current ver. 10.1 r53 ('''important security update 2010-06-10''')
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash Updating Flash]'''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -exit Firefox (File > Exit)
    -check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -double-click on the Adobe Flash installer you just downloaded to install/update Adobe Flash
    -when the Flash installation is complete, start Firefox, and test the Flash installation here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=1
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version of Flash. To install/update the IE ActiveX Adobe Flash Player, same instructions as above, except use IE to download the ActiveX Flash installer.
    *Also see: http://kb.mozillazine.org/Flash ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • Message 40010 run local form in the server

    hi all
    i want to run a form that saved in the client machine by using another machine (server) as application server URL
    i specefiy the server url in the developer but i keep getting message
    40010 can not read form
    since it works fine if i choose the client application server URL
    any help would be nice ,
    thanx

    Q - can the server read the directory where your form is?
    The app server will be looking in a specific directory to read the forms. This is specified in the .env file.
    If you want to test a form you can always specify the form name in the URL on the app server e.g. http://<server>:<port>/forms90/f90servlet?config=......&form=<formname>
    HTHs!
    L :-)

  • Passing WebService URL Dynamically in BPEL

    Hi,
    We have requirement to Call the WebService URL dynamically to BPEL Process. Currently Websevice URL is hardcoded in WSDL file and our Client has changed their URL recently. We need to Change the URL in all the BPEL Process (Totally 10 BPEL Processes). We are thinking of the following approach but we are not sure whether its works.
    1. Store the URL in Profile
    2. Retrive the URL Value in BPEL Process and Pass it to the Web Service at Run Time
    3. This will avoid the hardcoding of URL in BPEL Process and in case of any change in the URL in future, then we can change the Profile Value instead of all the BPEL Process.
    Any Help on this is highly helpful.
    Thanks in Advance,
    Saravana

    http://www.oracle.com/technology/pub/articles/bpel_cookbook/carey.html
    - hth
    Ketan

  • Sync Addon Setup says "Please enter valid server URL" for Custom Sync Server settings

    While setting up the Sync add-on, I selected "Use a custom server" setting.
    I wish to keep the syncing information on my own server space where my personal website is also hosted.
    No matter what URL i enter (the ftp one or the http addr) it still show a "Please enter a valid server URL" message under the textbox and the next button stays disabled.
    Please help!
    This is important for me because xmarks is of no use to me anymore as it is blocked by our company firewall.
    Hoping "Firefox Sync" proves to be the solution!
    Thanks in advance.

    If you follow the "strong recommendation" to use the Weave Minimal server make sure to watch out for these pitfalls. Took me a while...
    # Don't try to create a new account in Firefox. You must create the account on the command line on the server.
    # Don't forget to take note of the long string printed by the create_user script, that's your SyncKey, and you need it later.
    # In the server URL field in the "sign in with existing account" dialogue, you must enter a trailing slash, ie. if you installed Weave Minimal at https://myserver/weave, you must enter this at https://myserver/weave/
    Good luck. It does work!

  • I am trying to locate my SERVER URL

    Hello!
    I am trying to locate the server URL on my mac. I tried to contact my internet service provider and they were not able to help me. I tried to look in proxies but I could not find anything as my computer receives internet through WIFI from my router. I'm not sure if that is useful or not. Please help!

    What server? Are you running Apple Server?
    Clinton

Maybe you are looking for

  • Expand Text Box? "Advanced" text options not hidden?

    The title text box/editor is very small in the 10.2 update.  It's just big enough for 2 lines of text.  I find it fairly inconvenient to have it so small (I am referring to the text box in the inspector).  I'm guessing there is no way to expand this

  • BULK INSERT into View w/ Instead Of Trigger - DML ERROR LOGGING Issue

    Oracle 10.2.0.4 I cannot figure out why I cannot get bulk insert errors to aggregate and allow the insert to continue when bulk inserting into a view with an Instead of Trigger. Whether I use LOG ERRORS clause or I use SQL%BULK_EXCEPTIONS, the insert

  • "enlarge default font size"

    Between early cataracts and not being able to get computer glasses made right.  I am tryingn to figure out how to enlarge the default font size for text in all (most?) of Safari.  When I click on the "make the font larger" feaure [A/A], it makes head

  • Converting UTF-16 to UTF-8

    Hi all, I have XML data in UTF-16 format in 'xml_result' using the below command. I need the data in UTF-8 format to download. How should i convert it? *CALL TRANSFORMATION id     SOURCE   H_EXP  = IGR     RESULT XML xml_result. Thanks

  • Exchange Server 2013 and ms-Exch-SMTP-Accept-Authoritative-Domain-Sender

    Hello, Team! I think I've found a serious issue in last CU releases. This is the case: 1 Multirole server Exchange 2013 SP1 (and older) , one creceive connector from internet to this server, no edge, nothing. I care about preventing spoofing my compa