How do I use OracleMaps Javascript API from a different host than MapViewer

Hello,
I have successfully set up the Mapviewer quick start 10131, and am able to view the sample page showMap.html perfectly. I would like to run this same sample on a different server than where Mapviewer is installed. Let say mapviewer is installed on jstraub-winsvr:8888 and I want to run showMap.html from jstraub-linux1:7777. I tried changing the function showMap and the location to oraclemaps like the following:
<script language="Javascript" src="http://jstraub-winsvr:8888/mapviewer/fsmc/jslib/oraclemaps.js"></script>
function showMap()
var baseURL = "http://jstraub-winsvr:8888/mapviewer";
var mapCenterLon = -122.45;
var mapCenterLat = 37.6706;
var mapZoom = 4;
var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,8307);
var mapview = new MVMapView(document.getElementById("map"), baseURL);
mapview.addBaseMapLayer(new MVBaseMap("mvdemo.demo_map"));
mapview.setCenter(mpoint);
mapview.setZoomLevel(mapZoom);
mapview.display();                
Now when I try running this page on jstraub-linux1:7777 I get a Javascript error, and in Firebug, I can see that there are request like the following:
POST: http://jstraub-linux1:7777/mapviewer/ReturnLocaleOper
GET: http://jstraub-linux1:7777/mapviewer/mcserver?xml_request=%3C?xml+version=%221.0%22+standalone=%22yes%22?%3E%3Cmap_cache_admin_request%3E%3Cget_client_config+map_cache_names=%22mvdemo.demo_map%22+format=%22JSON%22/%3E%3C/map_cache_admin_request%3E
Obviously those requests are bogus since mapviewer is at jstraub-winsvr:8888 and not jstraub-linux1:7777, I just want to run the page from jstraub-linux1:7777. Anybody know how I do this?
Regards,
Jason

I believe that I am having the same problem. While I don't yet have a resolution, I do have a bit more information that may be useful. I have examined the oraclemaps.js script file and found some relevant references to the Javascript document.location object. As I watch the script execute, it seems that the author has made the assumption that the page served to the user has been served from the same Oracle Application Server running MapViewer. I have listed the lines that contain references to document.location below. (The line numbers may be off by a line or two as I have made some minor changes to facilitate my investigation.)
Line 742 : //_f16._f104="http://"\+document.location.host\+"/mapviewer/foi";
Line 6280 : var x2=String(document.location);
Line 10270 : var x40=String(document.location);
By changing line 742 to...
f16.f104="http://mymvserver:8888/mapviewer/foi";
...I believe I have the script looking in the right place. (Previously, it had been looking for /mapviewer/foi on the server that originally served the page.)
The x2 variable (at line 6280) seems to provide the current document location as a means to determine the MapViewer URL. Once again, the author seems to presume that MapViewer is found on the same server that originally served the page.
this._f53=x2.substring(0,x3\+x5\+2)+"/mapviewer";
I changed this line to read:
this._f53="http://mymvserver:8888/mapviewer";
Having made these changes, I have moved past the "object not found"-types of errors I had been getting. I now get "Permission Denied" errors which, I am thinking, may be the result of cross-site scripting problems predicted by the previous poster.
So, my question is this: Is it really expected that the page that integrates the map display must be served by the same Oracle Application Server instance on which MapViewer is running? This strikes me as an absurd limitation, so I assume it is not the case. Indeed, there is a post on this forum by another user who claims to have written an ASP.Net application that uses the Javascript interface to integrate MapViewer and the map display ( Link:securing mapviewer ). This is precisely what we are trying to do; but I have yet to determine how to go about doing it.
Can this be done? Is there any documentation that describes how to accomplish this?

Similar Messages

  • How to use the Worklist API from Java (classpath ??)

    Hi all,
    Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
    I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
    I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
    thanks.

    Hi all,
    Ok now.
    To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
    Only after adding the following JAR's to the build path, was I able to compile it:
    orabpel-common.jar
    orabpel.jar
    bpm-infra.jar
    bpm-services.jar
    So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
    Thank you very much for your help,
    assaf.

  • Using Java mail API from JSPDynPage

    Hi Experts,
    I am working on a Portal Assignment that requiresto sent work flow mails on the basis of error conditions.
    Can u please suggest if at all I can use Java Mail APIs from JSP page within the JSP DYN Page Framework.
    If at all Java Mail can be used could u please suugest some help docs on the same.
    Thanks for the help.
    Manab C Ghosh
    EP Consultant
    Kolkata INDIA
    +919830603327

    Hi Experts,
    Thanks for all the responses to my Mail question(mailing from JSPDynPage).
    I have found the solution.
    Here is how I have got the things: (pls note there are other solns)
    Using Java Mail APIs;
    Create a Java file in the scr.core / src.api
    MailSender.java
    * Created on Jul 21, 2005
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    package com.mailsend.test;
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    * Edited on Jul 24, 2005
    * @author Manab C Ghosh
    public class MailSender {
         public String sendMessage(){
            String msg ="Hello mail Test";
            String smtpServer ="mySMTPServer";
            String smtpSender = "senderemailaddress";
            String smtpRecipient="receipientemailaddress";
            String stBody =  msg ;
            //String stDate = new Date().toString() ;
            String stSubject = "Mail Test ";
            Send(     smtpServer,          //SMTPServer
                      smtpSender,          //Sender
                      smtpRecipient,     //Recipient
                      stSubject,          //Subject
                      stBody               //Body
                        );               //Attachments                    
         return "Mail Success";
    public static void Send(String SMTPServer,
                                  String From,
                                  String To,
                                  String Subject,
                                  String msgText1
            // Error status;
            int ErrorStatus = 0;
            // create some properties and get the default Session
            Properties props = System.getProperties();
            props.put("mail.smtp.host", SMTPServer);
            Session session = Session.getDefaultInstance(props, null);     
            try {
                 // create a message
                 MimeMessage msg = new MimeMessage(session);
                 msg.setFrom(new InternetAddress(From));
                 InternetAddress[] address = {new InternetAddress(To)};
                 msg.setRecipients(Message.RecipientType.TO, address);
                 msg.setSubject(Subject);
                 // create and fill the first message part
                 MimeBodyPart mbp1 = new MimeBodyPart();
                 mbp1.setText(msgText1);
                 // create the Multipart and its parts to it
                 Multipart mp = new MimeMultipart();
                 mp.addBodyPart(mbp1);
                 //mp.addBodyPart(mbp2);
                 // add the Multipart to the message
                 msg.setContent(mp);
                 // set the Date: header
                 msg.setSentDate(new Date());
                 // send the message
                 Transport.send(msg);
            } catch (MessagingException mex) {
    Call this file from the JSP page (which is set at JSPDynPage controller)
    one important thing-----
    Create a dir under PORTAL-INF and import the following jars-- activation.jar, mail.jar,imap.jar,smtp.jar, mailapi.jar.
    This works..
    Thanks once again to the Experts.
    happy mailing
    Manab Ghosh.
    INDIA (+919830603327)

  • How do I access and use my Itunes library from a different/new computer?

    How do I access and use my Itunes library from a different/new computer?  My computer is no longer working, so I need to be able to access my library from my wife's computer.

    Your library will only be where you put it.  Copy everything from your backup copy of your old computer to the new one.
    You can redownload some itunes purchases in some countries:
    Download past purchases - Apple Support

  • How can i use my iphone 4 from japan in india

    how can i use my iphone 4 from japan in india

    The only way to use an iPhone from Japan in India is to pay your Japanese carrier for international roaming. Japanese iPhones can not be unlocked.

  • I do not have a credit card how can I use the App Store from Belize

    I do not have a credit card how can I use the App Store from Belize

    iTunes gift cards.

  • Is it possible to change out of the box Callout content for already existing library using some javascript API ?

    Is it possible to change out of the box Callout content (change DOM elements) for already existing library using some javascript API?
     API ?

    Hi,
    We can use CSS and jQuery to achieve it.
    Please add the following code into the Content Editor Web Part.
    <style type="text/css">
    .js-callout-content{
    display:none;
    .js-callout-mainElement span{
    display:none;
    .js-callout-mainElement{
    border-width:0px;
    </style>
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("a[title='Open Menu']").click(function(){
    setTimeout(function(){
    $(".js-callout-body .js-callout-bodySection").eq(0).html("<span>Test</span>");
    $(".js-callout-mainElement span").show();
    $(".js-callout-content").show();
    $(".js-callout-mainElement").css("border-width","1px");
    },1000);
    </script>
    Result:
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How can i use C/Javascript/php/Java in flex?

    can i embed these language into my flex project?
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    please help~

    saipanBETTY0509 wrote:
    Subject: How can i use C/Javascript/php/Java in flex?
    can i embed these language into my flex project?
    You can't.  Why do you want to do this?
    saipanBETTY0509 wrote:
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    I think what this means is "I want to check to see how much hard disk space is available.  Also, I need to check the pixel dimensions of an image."
    Is that right?
    There is no way in the Flash Player (as far as I know) that you can determine the amount of free disk space.  However, in AIR you can use air.File.applicationStorageDirectory.spaceAvailable to determine the storage space available in the application storage directory.
    As far as determining the dimensions of an image, there are plenty of good resources out there on that.  Maybe this one will be helpful to you?
    http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-pr ocessing-local-images/
      -Josh

  • How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    AAC is Advanced Audio Coding.  Basically it's a format that sounds better than MP3 but doesn't take up as much space as a lossless format (like you'd have on a CD).  More than likely you've had that encoding turned on when you ripped your music into itunes (it's the default encoder).  Therefore your LG phone won't play them.
    You need to turn off the AAC format by going to the iTunes menu, Preferences, General (at the top), then clicking the "Import Preferences" button.  Change the AAC Encoder to MP3 Encoder.  After that you'll have to make MP3 copies of your songs by right clicking them and selecting "Create MP3 Version."  You'll get a copy of the song that should transfer to your SD card and have MP3 encoding.  Hopefully your phone will play that.

  • HT201328 My iPhone is from Japan and I want to activate it here in the Philippines because I'm living here. I have lost the original SIM from Softbank and replaced it with a new SIM card from Globe. How can I use the SIM card from Globe?

    My iPhone is from Japan and I want to activate it here in the Philippines because I'm living here. I have lost the original SIM from Softbank and replaced it with a new SIM card from Globe. How can I use the SIM card from Globe?

    You cannot. The iPhone is locked to Softbank, and only they can unlock it. Problem is that Softbank will NOT unlock the phone, as they do not offer iPhone unlocking.
    Buy an iPhone in the Phillipines.
    PS Before you go on a rant at Apple, be aware that Apple does NOT unlock phones and they do not set unlocking policies. The carriers (Softbank in this case) set the unlocking policy.

  • Hi, i redeemed an itune gift card, how to i use it to purchase from itune store, my balance is 15e

    hi, i redeemed an itune gift card, how to i use it to purchase from itune store, my balance is 15e

    Find the item that you want to buy and click on its price to buy it - as long as you are buying for yourself (you can't use your balance for gifting) then your balance should be automatically used.

  • How can I use one gmail address on two different macbooks in 'mail'?

    I'm using one business gmail address. Me and my girlfriend both have a macbook. Now the gmail address is linked to my macbook. But she wants to use it as well. Unfortunately the 'mail' system won't allow her to sync with the gmail address. And I get messages from gmail saying that someone tried to log in to my account. Which is something I certainly want, but can't change. Does anyone now how I can use 1 gmail address on two different mac's? Thanks

    You may be able to change the suspicious account activity message alerts
    in your Gmail settings, and check that side of it, since I can use several
    means of accessing my Gmail and Google Accounts; and in the past had
    shared an account (not google) with another party half a world away when
    her email server went down for a month.
    The Mail software should not know the difference, unless the setup in there
    is not correct; if this is so, then more than what she says would be wrong.
    The Google mail Support help site pages should cover this adequately.
    Gmail Help - Google Help
    https://support.google.com/mail/?hl=en

  • How can i use the same front panel graph in more than one events in an event structure?

    i want to display the signals from my sensorDAQ in a graph.but i have more than one event in the event structure to acquire the signal and display it in the graph.the first event is to acquire the threshold signals and its displayed in the graph as a feedback.after the first event is executed, i will call the second event,where the further signals are acuired and compared with the threshold signals from the event 1.my question is how can i use the same front panel control in more than two events in the event structure?please answer me i'm stuck.
    Solved!
    Go to Solution.

    Hi,
    I have attached here an example of doing the same using shift registers and local variables. Take a look. Shift register is always a better option than local variables.
    Regards,
    Nitzz
    (Give kudos to good answers, Mark it as a solution if your problem is Solved) 
    Attachments:
    Graph and shift registers.vi ‏12 KB
    graph and local variables.vi ‏12 KB

  • How can I use the print module to print different size images on one large "canvas"?

    How can I use the print module to print different size images on one large "canvas"? An example would be in Photoshop, go to file>new, and create the size paper I want, and move images of different sizes onto it.
    I was thinking the print module would do this automatically for me.

    You can't, at present. It's been a requested feature, so we'll see if it shows up in a future version, but it's not there at present.

  • HT204053 How do I use the same Apple ID and different Cloud for other devises

    Hi
    How do I use the sane Apple ID and different Icloud for other devises

    http://support.apple.com/kb/HT4627

Maybe you are looking for

  • Satellite Pro A300 crashes with blank screen

    I have a Satellite Pro A300, AMD CPU, ATI graphics, Vista. The system worked fine for a year but a few months ago it started crashing, the screen went blank, not blue, anything running, like music, stopped. This can happen after several hours or minu

  • How to add diskgroup in ASM on linux

    Hi All, I have installed oracle 10.2.0.4 through Oracle VM- template. I install this template on OEL 5 (oracle enterprise linux 5) update 2. 10.2.0.4 template is readily avaible which I just extract and run. It install 10.2.0.4 with ASM for single in

  • DVWP XSLT count number of column having Yes/No values for each row

    I have a Data View Web Part .Now I have a column that contains either 'Yes' or 'No' and i want to count the number of 'Yes' for the rows and column  . below image will help to understand better what i am tying to achieve.  

  • Monotype sorts not showing properly

    I have used Monotype sorts in Numbers for years. Now with the new improved Numbers 3.0.1 it fails to show properly. Instead of the usual checkmark I just get a "3". Why is this happening. Thanks for any help you can give.

  • Updated to 6.0.1 wifi issue

    So I started a new discussion because my problem seems a little different than the others I saw. I just updated to 6.0.1 then ended up having to restore my ipad. After I restored, wifi started giving problems. I can connect to several different netwo