Return url for the current page

Hi,
I would like to know how to return the url for the current page?

These are my preferred choices:
request.getRequestURI() will give you the relative path from root. For example:
/mypages/thepageIamon.jsp
request.getRequestURL().toString() will give you the full path. For example:
http://www.mysite.com/mypages/thepageIamon.jsp
Hope this helps.

Similar Messages

  • Collecting the URL for the current page..

    I'd like to collect the complete URL that created the current page. I'd like to pas this information to a succeding dynamic page, so that I can return to the current page.
    I have tries using the OWA_UTIL.get_cgi... routines but they seem to be lacking the parameter list to make them complete. The path and page, but no parameters.
    Is there an API routine or a technique to accomplish this in PL/SQL?
    Thanks,
    Stuart

    We had the same problem at a project, we solved it with the use of javascript. If you want an example mail me at [email protected]
    arny

  • Back button doesn't work due to multiple history entries for the current page. How can I fix this problem?

    This problem started February 2015. I have noticed it mostly while searching ebay. When I hit the back button it did not work. I right clicked the back button and found at least 2 and sometimes up to a dozen duplicate history entries for the current page I am on, meaning I would have to click the back button a dozen times to get to the previous page. I am using Firefox 35.0.1 on a Vista computer. I have not found any fix for the problem after searching the internet for hours. I have seen similar issues with people using IE and some say the duplicate entries are caused by banner ads but still no one has provided a good answer or fix for the problem. Please help.

    I will leave further answers to users of ebay. Script or adblockers may ease the problem.
    * Try this add-on search [https://addons.mozilla.org/en-US/firefox/search/?q=blocker&platform=windows&appver=35.0&sort=users blocker] (Windows)

  • How to achieve SUBMIT for the current page when I click other tab?

    Problem: How to achieve SUBMIT for the current page when I click other tab?
    Description: I have a two-page application and each page associates with a tab. Say page1 associates tab1 and page2 associates tab2. In each page, I have a submit button, a after submit process associated to the submit button, and a tabular form. For page1, I fill out the fields and hit the button. The page1 will appear again and I can see the data I have insert. However, If I fill out the fields and click the tab2 (page 2) instead. when I come back to page1, the data I filled out are all gone. Is there any way in HTML DB to force the submit in the current page after you click other page. If use JavaScript, what is code looks like.
    Appreciate your time and your answer.
    Mike

    Scott,
    just for clarity, if I understood correctly what you said there are two possibilities:
    1) keep the standard tab branch and give up the possibility of validating page items. Below you can find an example of such cases.
    2) Replace the template substitution string and perform a "custom" button-like submit also adding a branch to the main page associated with the tab. Page items will be validated if the branch firing point is set after the validations.
    I couldn't find an example of the latter, but I found easily an example of the former:
    it's the "Report attributes", page 420 of app 4000.
    If you enter 'aaa' in the "Number of rows" form field and then you press "apply changes", htmldb correctly displays an inline error message saying that the value must be numeric. On the contrary, if you click on the "Region Definition" tab, htmldb takes you to a page showing an oracle exception:
    ORA-20001: Error in DML: p_rowid=4785927011172906402, p_alt_rowid=ID, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value aaa for column PLUG_QUERY_NUM_ROWS
    Bye,
    Flavio

  • URL of the current portal page loaded using Javascript ?

    Hello:
    I am trying to add programmatically the url of the current
    page loaded in the portal to the 'Favorites List'. There
    is a pre-built KM iview to store your 'favorites'.
    I can extract and write to this 'favorites' using KM java
    API. But only challenge is to extract the current loaded
    page URL and title using Javascript.
    I would appreciate any help in this regard.
    Thank you very much,
    Prasad Nutalapati

    Dude i was having the exact same problem. I solved it using the SAP-provided EPCM (javascript client framework).
    Javascript Code
    var pageName = "";
    var URL = "";
    function bookmarkPage()
         /* page url */
         var fullURL = "https://<%=request.getServerName()%>/irj/portal?NavigationTarget=" + URL;
         /* IE bookmark */
         if(EPCM.getUAType() == EPCM.MSIE)
              window.external.AddFavorite(fullURL , pageName);
         else
              var msg = "Sorry. The \"Add To Favorites\" feature only works with Internet Explorer. " +
                          "The URL to this page is " + fullURL;
              alert(msg);
    /* get pagename from eventObject from subscribed event */
    function getPageObject(eventObj) {
        pageName = eventObj.dataObject.title;
        URL = eventObj.dataObject.URL;
    /* subscribe to event in pagetoolbar area */
    EPCM.subscribeEvent("urn:com.sapportals:navigation", "AddNavTargetAllowDuplicate", getPageObject);
    End of code
    Basically, what this does is that everytime a page loads, the innerpage, where the content is, raises an event using  the EPCM.raiseEvent() method. EPCM.subscribeEvent subscribes to an event called AddNavTargetAllowDuplicate which has an object holding the page information (i.e. page title and URL (ROLE://...)). Everytime that it notices an event raised, the function getPageObject gets called to go get data from the event object that is available globally in the framework.
    You should be able to put this code anywhere in any iview and it should work. Thou i have only tried putting it in the masthead. Try and if you still have questions please let me know.

  • Returning Records Only for the Current Month

    Hello,
    I have a query that returns records for the current week and I would like to extend it to return records for the current month.
    where TRUNC (START_DATE) < NEXT_DAY (TRUNC (CURRENT_TIMESTAMP) - 1, 'Sat') + 1
    AND TRUNC (END_DATE) > NEXT_DAY (TRUNC (CURRENT_TIMESTAMP) - 1, 'Sat') - 7
    I have two date fields, the first is called 'Start_Date', the second is called 'End_Date'. I would like the query to return all records for the current month including those that may begin prior to or finish post the month as events can begin in one month and end in another. Does anyone know how this is done in a 'Where Clause'?
    Kind Regards,
    Steve Welch

    Actually LAST_DAY(ADD_MONTHS(TRUNC(sysdate),-1))+1 gives you the starting day of the current month, and LAST_DAY(TRUNC(sysdate)) gives you the last day of the current month.
    So the where be
    WHERE TRUNC(START_DATE) >= LAST_DAY(ADD_MONTHS(TRUNC(sysdate),-1))+1 OR TRUNC(END_DATE) <= LAST_DAY(TRUNC(sysdate))
    Start Date >= 1st Day of Month OR End Date <= Last Day of Month, meaning either date is within the current month.

  • Sending the current page in a mailto link

    I want to create a mailto link that will attach the url of the current page to the body of the e-mail message.
    I have created a display only item and added the following code to the default value:
    <anchor href='mailto:?subject=Please Review the attached Lessons Learned&body=Please review the following Lessons Learned: Copy and Paste link here'>Send the Lesson Learned for Review</anchor>
    (I have replaced the a tag with anchor so the code will show up)
    This is working and opening up the mail client with a blank recipient list and the subject and body filled in. Now where I have "Copy and Paste link here", I would like for the URL of the current page to be filled in. Is there a way to do this?
    Thanks,
    MIchelle

    Hi
    I use the following computation for the field, which is used as a parameter of a send_mail procedure.
    SERVER_NAME and DAD NAME are described somewhere in APEX help - they are usefull if you need to switch between development/testing/production environment with different server host names and Oracle database names.
    P50_INTEREST_ID contains the value to be set on the linked page 38, more precisely to it's attribute P38_INTEREST_ID. The value could be reffered also as v('P50_INTEREST_ID') or &P50_INTEREST_ID. instead of :P50_INTEREST_ID.
    IAL_NICKNAME is an application variable containing users nickname.
    Roman
    'Hi,' ||
    CHR(13) || CHR(10) || CHR(13) || CHR(10) ||
    'Please, look at ' || 'http://' || owa_util.get_cgi_env ('SERVER_NAME') || '/pls/' || owa_util.get_cgi_env ('DAD_NAME') || '/' || 'f?p=' || V('APP_ID') || ':38:::NO:38:P38_INTEREST_ID:' || :P50_INTEREST_ID || ' .' ||
    CHR(13) || CHR(10) || CHR(13) || CHR(10) ||
    V('IAL_NICKNAME')

  • Return to the current page after refreshing

    Hello!
    When I refresh the current page I'd like to return to it, not to another page.
    When I choose "SAP Business Intelligence" forums link (with all subordinate forums in one screen) and go to previous pages (for example, to 3rd page), even if I return to 1st page when I refresh the screen it shows me again the 3rd one, not the first. It's very annoying. Could it be changed?
    Best regards,
    Eugene

    Eugene
    The forums are displayed in an iframe. Therefore, if you wanted to simply refresh the forums to the exact page that you have navigated to, you should right-click on the content area of SDN (the forums page) and choose the refresh option. This will refresh this window and should keep your place marker. If you refresh the URL in the browser window then this will refresh the entire SDN page and will take you to the entry point of the forums.
    I hope this helps
    D

  • You have insufficient privileges for the current operation-Getting error running OAF page in R12

    I have a custom OAF page in R11 which is working fine.
    Same page is giving below errors in R12.
    Any suggestions how to resolve this issue..please advice.
    [167]:STATEMENT:[fnd.framework.webui.OAPageSecurity]:MAC validation status = false   
    [167]:STATEMENT:[fnd.framework.webui.OAPageSecurity]:Request parameters validation status = false   
    [167]:ERROR:[fnd.framework.webui.OAPageSecurity]:You cannot run a page which is not SelfSecured when the MAC fails.   
    [169]:ERROR:[fnd.common.Message.auto_log]:FNDFND_INSUFF_PRIVILEGES   
    [169]:ERROR:[fnd.framework.OAException]:You have insufficient privileges for the current operation. Please contact your System Administrator.   
    [170]:EVENT:[fnd.framework.webui.OAPageContextImpl]:OAF LOG: Event : Redirect Page, in: oracle.apps.fnd.framework.webui.OAPageContextImpl: OA.jsp?akRegionCode=FNDDIALOGPAGE&akRegionApplicationId=0&transactionid=817211813&oapc=10&oas=YyMjRI6buFwrYehD8b25iQ..&retainAM=Y&addBreadCrumb=S&OAMC=G   
    [170]:PROCEDURE:[fnd.profiles.Profiles]:getProfileOptionValue:  name=JTF_PF_MASTER_ENABLED; levelID=10001; levelValue=0; levelValueApplID=0   
    [170]:EVENT:[jtf.activity.CorePageObject]: PATBE START currentPageObject : PAT STATUS:false   
    [170]:EVENT:[jtf.activity.CorePageObject]: PATBE END currentPageObject : return factory.dummyProxyUser():   
    [322]:EXCEPTION:[fnd.framework.webui.OAPageBean]:java.lang.NullPointerException   
    Thanks in Advance
    Sridevi K

    Hi Sridevi,
    The custom page is a selfsecured page?
    ie, it will be accessed without login?
    What is the profile option fnd_debuging_level 's value set to.
    I Could see one your other thread
    Re: You have insufficient privileges for the current Operation error
    you mentioned that you did tried setting the profile options
    Framework Validation Level
    FND Function Validation LEvel
    FND Validation Level
    to none, still you are facing the issue,
    At what level you tried the profile options.
    Thanks,
    With regards,
    Kali.
    OSSi.    

  • 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.

  • How do I create a new calendar for the current year, using last years calendar's birthday's/photos and comments from the lower pages?

    Each year for the past 5 years I make a family calendar and send copies to all he family members around the globe.  I hate that I have to recreate all the birthdays and special occasions from scratch, and re-drag all the photos onto these dates, in the lower half of the page of each month on the new calendar.  How can I create a new calendar for the current year and port all of these photos/comments into the new calendar from last years calendar, to save having to redo all this work!!  I am not talking about the upper half page of the photos only...I am referring to the calendar page of each month.
    Thanks in advance. 
    Colin

    Welcome to the Apple Discussions. Open iWeb so you see your original site in the left hand pane. Use the File->New Site menu option to create a new site. Give it the name you want.
    Now select a page in your original site and type Command+D. That will duplicate the page. Drag the duplicate page down to the new site and rename it as needed. Do that for the other pages you need in the original site.
    OT

  • Hi, I'm making hyperlinks. They work for the main page of the webpage, but when I'm trying to redirect the hyperlink to a "sub page" of the webpage it is still going to the main page. (allthough I'm pasting the complete url address)

    Hi, I'm making hyperlinks. They work for the main page of the webpage, but when I'm trying to redirect the hyperlink to a "sub page" of the webpage it is still going to the main page. (allthough I'm pasting the complete url address)

    Hi! first of all, thank you so much for your help.
    I don't know about that panel you are talking about.
    what I do is RIGHT CLICK, INTERACTIVE, NEW HYPERLINK, and a window pops up, where I paste the address (images).
    Where says URL I paste the complete address that the "sub page" gives me.
    Is that correct? (for the main page of the wabepage works correctly)
    thanks!!!

  • Don't know how to calcualte the current page in smartform for second layout

    Hi All ,
       Iam creating an smart form which contains two layout in a single form. I need the page number to be displayed as followes.
    1st layout : 1 of 2
                     2 of 2.
    in 2nd layout 1 of 2.
                        2 0f 2.
    I dont have any issues in printing total number of pages. i dont know how to calculate the current page for the 2nd layout. <<text removed>>
    Edited by: Matt on Jun 25, 2009 5:09 PM - Removed ALL CAPITALS from subject

    Hi,
    Create a New window of Type 'Final Window' and Position it in the layout where u want to display the page numbers.
    Now, create a text element in the window and create the text like below in the text element.
    P1 Page &SFSY-PAGE& of  &SFSY-FORMPAGES(3CZ)&
    &SFSY-PAGE&                            - Current Page No.
    &SFSY-FORMPAGES(3CZ)&         - Total No of Pages.
    Note: dont forget to create the window type as 'Final Window', otherwise it will show ssome junk...
    Hope it helps!!
    Rgds,
    Pavan

  • What is the URL for Nightly Start Page i want to use that in my Open a new tab?

    How can i find the URL for the new Nightly start page as i want to use it in the new tab so it is the same as the home page . i use the nightly start page as home page too

    hello caseyvan, "about:home" is the url for the default firefox/nightly start page. you can set that as a new tab page when you can enter '''about:config''' into the firefox location bar (confirm the info message in case it shows up) and search for the preference named '''browser.newtab.url'''. double-click the entry & change it to any site you want to show up on a new tab.

  • Apps Login Page Error- Insufficient privileges for the current operation

    Hi Gurus,
    We migrated application node from HP-UNIX to SUN Solaris with 11.5.10.2 and 10.2.04 database. When i try to login as sysadmin, got the error You have insufficient privileges for the current operation.
    But i can able to go in with Forms URL and it works. I don't see any errors on IAS except
    Fatal error in parsing device registration file in jserv.log.
    Any help is appreciated.
    Thank You.

    I found 150 invalid objects in the database. Also i have question here my database and the application is on different domains.Where do you have those invalid objects? Under what schema?
    Using different domain names should be OK.
    Do you think that will work. If the application and database put it in the same domain( put the apps in same database domain), by running the autoconfig will update the domain name in application server globally.I cannot assure if it is going to work or not.
    Have you checked Apache log files?
    If not change the domain name globally what else need to be done to change it. Please suggest on that.These are the docs you need to access if you want to change the domain name.
    How to change the hostname of an Applications Tier using AutoConfig [ID 341322.1]
    How to change the hostname and/or port of the Database Tier using AutoConfig [ID 338003.1]
    Steps To Clean Nonexistent Nodes or IP Addresses From FND_NODES [ID 260887.1]
    Thanks,
    Hussein

Maybe you are looking for

  • Text messages going to the wrong phone.

    My son, wife and I each have an iPhone 4.  My son and I each have aan iPad2. Recently, some text conversations between me and third parties showed up not only on my iPhone but also on my son's iPhone and iPad. I attempted to solve the problem by turn

  • How to get a View handler?

    Hi all,   I'm trying to make a mandatory field check but in the message triggered I want to use the attribute "Text" of the label of my inputfield: //This is my inputfield's label IWDLabel Dt_Decrichiesta = (IWDLabel) view.getElement("Dt_Decrichiesta

  • Table hierarchy in a schema

    Hi, How to find the tables hierarchy in a schema? the output show independent tables first then primary key tables then foreign key tables. I am not asking for single table.we need overall the tables in a schema in hierarchy manner.

  • "Send" button not working in Mail

    Picked up Leopard on an iMac two days ago. Some of the time when I compose a new email, Mail works fine--I click "send" once I'm through typing and out it goes. Other times--like this morning--I try to send an email and the "send" button is transpare

  • ORA-00934: group function is not allowed here

    Hi, My requirement is to check oi.quantity is equal to sum of packing_detail. quantity by order_number select oi.quantity_ordered oi_qu, pd.quantity pq from ordered_items oi, packing_details pd where oi.ordered_item_id = pd.ordered_item_id and oi.qua