Store current page url into a string

What method do i use to store the url of the page that the applet is being viewed?
The reason i need this is because my applet would produce a different output if the url was http://dimg.biz/1.php as opposed to http://dimg.biz/2.php.

getDocumentBase(). It's a method of Applet.
It's right there in the API docs.

Similar Messages

  • Get current HTML URL into flash with LoadVars and ColdFusion

    I need to get the current page url and pass it into flash.
    I'm also using ColdFusion. Is there an easy solution?

    I gave up on bringing in the URL and parse it into a string,
    there is too much I don't understand. I put in two commands in the
    HTML where the Flash movie is sitting:
    1. <param name="FlashVars" value="airport=sbn"/>
    2. and in <embed src I put in, Flashvars="airport=sbn"
    "airport" is the variable in Flash (it is called as
    "_level0.airport" in the Flash file) and "sbn" is the variable
    definition for 12 of the files. I will just find "sbn" and replace
    it with the new airport name in the next set. It's not very slick,
    but it's better than having to create a new navigation for every
    airport. Thanks for the help.

  • How to store serval char variables into a string variable?

    I have serval char variables, but i don't know how to put them together (without using arrays). I am thinking to store these char variables into a string variable but i don't know how to do it. For example,
    char letter1 = 'a', letter2 = 'b', letter3 = 'c';
    String letters;
    then how can i do to make letters = "abc" from using letter1,2,3?
    I am just a beginner of Java, if anyone can help me, i will appreciate that very much!!!

    String letters=""+leter1+letter2+letter3;is fine and dandy. What it actually compiles to is
    String letters = new StringBuffer().append(letter1).append(letter2).append(letter3).toString();Which ofcourse is much more code to write, but still good to know.
    So do see the API for java.lang.StringBuffer.
    Heikki

  • How to get the current page URL

    HI All
    I am working in oracle apps 4.0
    I have one page called history in that i have one page item called Application url. My application id is 122 but its a copy of application 106
    How to get the current page url for the page item.
    Any steps should be help ful
    Thanks & Regards
    Srikkanth.M

    I'm not 100% clear on what the requirement is from the description, however it does sound like you are making things unnecessarily complicated.
    If you want permanent/ID-independent links then use application and page aliases.
    so here we used to display the url like this: <tt>{noformat}http://81.131.254.171:8080/apex/f?p=122{noformat}</tt>
    Do you mean that the URL is displayed like that? If so that doesn't seem particularly helpful. How is anyone supposed to know what it is?
    There are many ways to provide links in APEX&mdash;including lists and nav bars.
    Where the link is to another resource located on the same server (such as another page in the same app, or a different app in the workspace), relative addressing can be used, making it unecessary to include scheme, domain and port information in the URL. For example, if the page to be linked to has a page alias <tt>ABOUT</tt> in an application with alias <tt>UNITY</tt>, and the apps share an authentication scheme/cookie to permit shared sessions, then the link URL is simply
    f?p=UNITY:ABOUT:&APP_SESSION.

  • Get current page url

    I need to grab the current page url. What is the pl/sql api to do this?

    You find it in the page_url field of the portlet_runtime record in the wwpro_api_provider package.

  • Function for getting full current page url

    Hello Everyone!
    Is there a funtion to get your full current page url? With
    the
    http:// and possible url variables?
    Thank you!

    > <cfoutput>#"
    http://" & CGI.HTTP_HOST &
    CGI.SCRIPT_NAME &
    IIf(len(trim(CGI.QUERY_STRING)),DE('?'),DE('')) &
    CGI.QUERY_STRING#</cfoutput>
    Unless it's HTTPS, or running on a port other than 80... ;-)
    I don't have access to an HTTPS-running server @ present,
    otherwise I'd
    provide a more helpful answer. However there are two
    additional CGI
    variables which get set to (something) if the request was
    made via HTTPS.
    To deal with the port, there is CGI.SERVER_PORT. If it's
    other than 80 (or
    443 if HTTPS), the one should include a colon and the port
    number after the
    HTTP_HOST value.
    Adam

  • Extract current page url without host

    Anybody aware of a {tag_ or {module- that returns the current page url without host, i.e. on page 'http://mysite.com/sub/page1.html' we need to extract the page url 'page1.html'?
    Thanks

    I think I missed it the first time, but I found it, thanks (http://forums.adobe.com/thread/1032246?tstart=0)

  • How do I open a new window (cmd + N) on the current page (url) NOT my homepage?

    Before I updated to firefox 28, I was able to hit cmd + N and it would open a new window with the exact same webpage I was on. Now it opens a new window with my homepage. I'm assuming I had an add-on or extension, but I am desperate to be able to do this again. Ideas?

    This is an oversight by the developers of the latest FireFox revision: a great shame, as the overall feel of the browser has patently been improved.
    Xabolcs has come up with a nice fudging idea; if it were to work; but sadly it doesn't for me....
    As mentioned by MGprof, the latest version of FireFox (May'14) now opens one's "homepage" instead of a new blank window.
    As my "homepage" is almost a dozen tabs; this is worse than useless. It's like starting FireFox again; and then having to close a whole string of unwanted tabs!
    To compound my frustration, the "move to a new window" option disappeared on another recent FireFox "upgrade"; but I managed to get round that by copying an url from a tab, then opening a new blank window, to paste the url into.
    So, is there any possible way to open a new window in this latest version of FireFox?
    I just want to be able to open a new FireFox window; and I'd be happy with it being either blank, or duplicating the url of a currently-showing tab.
    This would allow view of one trimmed-size webpage in front of another one, showing in a selected tab in my normal-use multi-tab window: useful when comparing complex images, for example.
    I have just installed the above-recommended "duplicate-2-window"; but can't make it work for me.
    I've assumed "no-restart-necessary" claim is correct; but using cntrl+N, I now get a new blank TAB!
    I'll try rebooting next, and post here again if that improves the situation; but don't hold your breath!
    Meanwhile, if the developers are watching out for feedback..................................... please sort this, by putting back the "open a new window" option: I do NOT want to have to use Gugl-Krohm!

  • How do you store input from keyboard into a string array

    I am trying to learn java and one of the programs I am trying to write needs to be able to accept a machine hostname at the keyboard and stuff it into a string array element. I am sure I will be using something along the lines of:
    BufferedReader in = new BufferedReader(new InputStreamReader(
                             System.in));
                   String str = "";
                   System.out.print("Enter a FQDN to look up: ");
                   str = in.readLine();
    but how do I get the input stuffed into hostname[ ].
    Any hints or assistance will be appreciated.
    Michael

    Well part of. I need to be able to take a random number of hostnames (ie. mblack.mkblack.com, fred.mblack.com, joe.mblack.com, ...) and after the user presses the enter key between each entry, the inputted information is stored in an array element. for example with the three shown above the array would look like this after the user finished.
    hostname {"mblack.mblack.com","fred.mblack.com","joe.mblack.com"};
    the algorithm would be
    Prompt for hostname
    get user input and press enter
    store hostname into array element
    prompt for next hostname or enter with no input to complete entry and execute lookup.class methods.
    I have the program written and working fine if I use a static array where I put the hostnames in the list, but cannot figure out how to get the information from the keyboard to the array element.
    Thanks for the help though, the response is very much appreciated.
    Michael

  • Adding page h1 or page url into a form response

    Hi, does anyone know if you can include a page url or page htm heading like a <h1> in a form submission.  Have a site with about 30 products on static HTML pages and using a content holder to include a product enquiry form. When the product enquiry form is submitted there is no way of showing the product name or url with a standard form submission. Appreciate any advice as to how I can indicate what product the enquiry relates to. ta megan

    Hey Sean,
    http://www.aleis.com.au/producer/one-piece-hand-helds/rrfid-reader-7020-one-piece-hand-hel d
    Above is page example where needed to implement this. 
    The "Get a Quote" tab at the base of the page, calls the product name and places in the RFID Model field in the form. 
    In this example Javascript calls the H1 from page and places in in the form field "RFIDmodel"
    <script type="text/javascript">
            $(function(){
                var title = $('h1').text();
                var field = $('#RFIDmodel');
                field.val(title);
    </script>

  • Get current page address and query string into Flex

    Hello!
    How can I get the current address in the address bar into
    Flex please? (As $_SERVER would in PHP for example)
    Thank you!

    "M*A*S*H 4077" <[email protected]> wrote in
    message
    news:gob8lp$ke1$[email protected]..
    > Aha, so there is no predefined Class in Flex for this?
    >
    > Thank you, Amy!
    That is the class. You might want to look at FABridge,
    though, because I
    think it is designed to help ease these things.

  • Firefox not displaying current page URL in address book.

    Firefox is now showing the URL data for the most recently opened tab in every address bar rather than the actual data for the page opened within that tab. For example, tab 1 is opened to wsj.com and tab two is the opened for foxnews.com, suddenly the address bar for tab 1 is now showing foxnews.com in the address bar AND it is now impossible to go 'back' because the back button is greyed out. Additionally, if a link is clicked from within the current tab, the URL in the address bar does not change but remains 'fixed' on the address opened in the most recently opened tab.
    == This happened ==
    Every time Firefox opened
    == 20 June 2010

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • How/Where to store current page details in ADF?

    Hi All,
    What is the best way to populate the managedBean while loading the page?
    In my application, I have an page fragment which display the user details from Webservice DataControl. I drag and drop the webservice data control in to the pageFragment. This fragment has mapped in the taskFlow and the taskFlow as attached in to main JSPX page as a region. I need to store this user information to any place (ManagedBean / or anyother best place to store) which I can use throughout my application, since I dont want to reexecute the webservice each time to get the same user information. Also I want to collect and store this info while I render the main page, not after any user action.
    Please advice how & where to store the information in ADF? Can I create an managedBean? If so how to trigger that class method at page load?
    Thanks
    kln

    Hi,
    in this case you configure the managed bean to be in session scope. Then, on the first page, you define a phase listener for the after restore phase (its a tag on the f:view element). This phaselistener references the managed bean using EL (important). It can do so using a method expression in JSF. For example, if the managed bean had a method populateUserInfo then yu could reference #{beanname.populateUserInfo} and execute the method expression using Java. In the managed bean, the method would access the binding layer Using the BindingContext class
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10653/oracle/adf/model/BindingContext.html
    Call
    BindingContext .getCurrent().getCurrentBindingsEntry() to obtain a handle to the active instance of BindingContainer.
    BindingContainer bindings = BindingContext .getCurrent().getCurrentBindingsEntry();
    Then on the binding container, you invoke the method to query the Web Service for the user info
    //before you can call a method on the ADF binding layer, make sure the ADF binding is created for the method
    OperationBinding opws = (OperationBinding) bindings.get("name of the method exposed on WS");
    //if you need to pass parameters
    opws.getParamsMap().put("argument name",value);
    opws.execute();
    You can use similar code to access the user information from the method iterator in ADF to populate the managed bean fields. You can then access user information from the managed bean through getter and setter methods
    Frank
    Ps.: I know the description is a bit rough. I'll see if I can come up with a blog sample to a later time
    Edited by: Frank Nimphius on Jan 26, 2010 5:43 PM

  • Page not cached because "URL contains query string"

    I have used JDeveloper to produce a search/display page using ADF where the user enters search criteria and then presses a Search command button. The parameters are POSTed to the webserver, and I need to devise a cache rule to cache pages using the entered search criteria so that another seach for the same values can be served from the cache.
    I have created a rule that will cache GET, GET with Query String and POST.
    I have put .* in the POST body. When I do this, the first query page is retrieved from the origin server and cached and resulting queries with different search criteria are returned the data for that first search (ie. it's not taking into account the search parameters).
    If I switch off that rule and look at what's being received, I see the following:
    /158.234.27.10:8889/BM/faces/physical.jsp POST;;;event=&form1:selectOneChoice1=0&form1:selectOneChoice2=&form1:selectedDate=2004-08-10&form1:table1:rangeStart=0&form1:table2:rangeStart=0&form1:table3:rangeStart=0&form1:table4:rangeStart=0&form1:table5:rangeStart=0&form1:table6:rangeStart=0&oracle.adf.faces.FORM=form1&oracle.adf.faces.STATE_TOKEN=3&source=form1:commandButton1;;
    Now, there are 3 search parameter fields that need to be considered - the others should be ignored:
    form1:selectOneChoice1
    form1:selectOneChoice
    form1:selectedDate
    It's not clear to me where (and how - in what format) I specify parameters to ignore and parameters to consider. I have tried listing these 3 parameters in the URL parameters table for the Rule (I did not specify a value - should I have done?) but when I do this, the page is not cached and shows the reason for this is that "URL Contains Query String".
    Can someone explain how to specify important POST body parameters and unimportant POST body parameters?
    Thanks,
    Andy

    Hi,
    Please go through this:
    http://download-west.oracle.com/docs/cd/B14099_02/caching.1012/b14046/cache.htm#sthref1530
    Hope it helps you. I think you should be able to configure the intended rule in Web Cache.
    Regards,
    Priyanka GES

  • How to store double quote into a string?

    How to store double quote into a string?
    What I mean is:
    suppose I want to save the following sentence into string s:
    What is the syntax?
    Thanks a lot!

    String s = "<a href=\"../jsp/Logout.jsp\">"
    check out this page
    http://java.sun.com/docs/books/tutorial/index.html
    Hope this helps

Maybe you are looking for