HttpServletRequest - previous page from which current page is requested

When a servlet is invoked, I want to know from which page of the browser this servlet is invoked.
in other words...
Is it possible to find out (from the HttpServletRequest object) which is the previous page of the browser from which the servlet request has come in?
Thanks
Edited by: mhakimz on Jan 30, 2008 3:08 PM

One solution is to add the referer as a parameter to the requested URL. This will only work if you have control over the referring page, or in other words: if you link to your servlet from one of your own pages. In that case, you could for example use a hidden field, or just append the referer to the URL: http://jump.here/my/servlet/?myReferer=<this-is-my-referer-url>. This way, you could get the referring URL by requesting
request.getParameter("myReferer")However, you may as well use the HTTP header called "referer":
request.getHeader("referer")See http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z14. In this case, you rely on the client (browser) to send the referer header along with the request, as this is an optional header field. The latter solution will be a good one in many cases.

Similar Messages

  • When I right click on a link "Open link in new tab" since a few days, it "jumps over" the tab to the right and opens in the tab next to that. How can I change this back to opening in the tab next to the page from which I opened as it used to be?

    When I right click on a link "Open link in new tab" since a few days, it "jumps over" the tab to the right and opens in the tab next to that. How can I change this back to opening in the tab next to the page from which I opened as it used to be?

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

  • Need to re-download PSE9 and PRE9 following crash and reinstall of Windows 7.  But the programs aren't listed on my Adobe "Orders" page (from which I would download) but are on my list of products.  What do I do to get the downloads?

    Following a crash I had to wipe my "C" drive and re-install Windows 7.  I want to reinstall Photoshop Elements 9 and Premier Elements 9.  Both programs are listed on my products page on the Adobe Website, but not on the "orders" page (from which I would normally download programs I've bought from Adobe).  How do I get them downloaded?

    Downloads available:
    Suites and Programs:  CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5 | 4 | 3
    Captivate:  7 | 6 | 5
    Download and installation help for Adobe links  https://helpx.adobe.com/download-install.html
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • "Reload current page/Stop loading current page" seems to be missing from Navigation Bar customization. How do I get it back?

    I am loading Firefox on a new computer, and I can't find the Navigation Bar button for "Reload current page/Stop loading current page". Is there any way to get it back as a choice under Navigation Bar customization or to create a new function? CTRL-R used to work for this function, but I'd like to have the button on the Navigation Bar.

    View Page Source has been moved to the "Web Developer" sub-menu. You can use any of the following to View Page Source:
    *CTRL+U
    *Right-click a blank area of the page and choose "View Page Source"
    *Firefox button > Web Developer > View Page Source
    *Using the Menu Bar: Tools > Web Developer > Page Source
    *ALT+T+W, release ALT key, letter O key
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • How can I link to a jsp page from another jsp page within websphere portal?

    Afternoon all,
    I have a websphere portlet which displays a jsp page. I want to put a hyperlink on the jsp page which when clicked will open another jsp page.
    Does anyone know how to do this?
    Thanks,
    Alex

    The anchor tag is the correct one for generating clickable links.
    <jsp:forward> is for transferring control at the server end. Its when you decide to change which page you want to show the user. ie check user is logged in. If not then forward them to login page, else display current page.
    I tried that. It does open the jsp page
    but the place and page links in the portal theme get screwed up.Whats mucked up about them? Do they point where they shouldn't?
    You might try using a <base> tag to set where relative links are resolved from.
    Cheers,
    evnafets

  • Opening a seeded OAF page from custom JSP page.

    Hi All,
    We have requirement to open a seeded OAF page from custom JSP page.
    When we try to open URL of an OAF page after passing URL input parameters, we are always getting following error:
    'You have insufficient privileges for the current operation. Please contact your System Administrator.'
    On directly accessing the seeded OAF page, its encoding all the input parameters passed in URL. Also some more encoded parameters are getting added to the URL dynamically.
    Is there any standard way exists to invoke seeded OAF pages without passing encrypted parameters to it? Also where can we get more details about
    encrypting OAF URL parameters.
    Any pointers would be appreciated.
    Thanks in advance!
    Saurabh

    Have you duplicated entire Customer Service module's menu in your responsibility?
    or Also ping me the menu name..
    --Prasanna                                                                                                                                                                                                                                                               

  • Calculate previous Sunday from the current day

    Hi Gurus,
    Can anybody tell what is the name of the function module which caluclates the previous Sunday from the Current system date. or any other idea how to calculate previous sunday from the current system date in Query.
    Thanks
    Liza

    Hello,
    See my previous thread to you for a similar Re: Find out previous Monday based on 0CALDAY
    Thanks
    Chandran

  • Print one page or Print current page

    Hi
    I have a form which grows in page numbers.
    I want users to be able to print out one page (or print current page)
    I have tried using the Print button that comes default with the software.
    xfa.host.print(1, "7", (xfa.host.numPages -7).toString(), 0, 1, 0, 0, 0);
    This works unless i add more instances of a field, which adds more pages to the form. This results in the wrong page being printed.
    Is there a way that i can target one specific subform to be printed?
    Or to print the current page using the Print button? without having to go to File - Print - current page?
    This is how i've set the page i want to be printed.
    form1.quotation.quotationNew
    any help would be greatly appreciated
    Thanks

    Hi,
    if it is not too late, try this:
    var nTemplatePage = 0; // this is the page as seen in the designer, before rendering.
    var nRenderedPage = xfa.layout.page(xfa.form.participant_document.FlowPage.all.item(nTemplatePage));
    nPageSpan = xfa.layout.pageSpan(xfa.form.participant_document.FlowPage.all.item(nTemplatePage));
    nRenderedPage will be the new page number after rendering.
    nPageSpan will be the number of pages the nTemplatePage spans to.
    then, just put the nRenderedPage into your print as the two page parameters.
    I have this code in a button on the pdf that I use for printing.
    hope that helps,
    John

  • How do I print selected pages from a multi page document

    How do I print selected pages from a multi page document?
    This question was solved.
    View Solution.

    Hi,
    It depends on the software you are using, what is it ? In general you can select a range or just a number of pages.
    Regards
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How Do I delete a blank page from a multiple page doc in Adobe XI?

    How Do I delete a blank page from a multiple page doc in Adobe XI?

    Thank you Claudio.  That's like an ultimate bummer!  So frustrating.  Thank
    you for taking the time to answer my question.
    Best,
    Robert
    Best,
            Robert
    On Sat, Mar 8, 2014 at 10:03 PM, Claudio González

  • How do I save one page from a multi-page pdf document?

    Can I take a 65 page pdf file and save it as 65 individual pages?

    I know if you are using Adobe Acrobat X, you can go to the "Tools" section and then under "Pages" you will see "Extract". If you click on that while your document is open it will show you your options for extracting the pages and saving them as individual PDF files. Be sure to check the box "Extract Pages As Seperate Files" and this should help get you on your way. I hope this helps answer your question on extracting pages from a multiple page PDF.

  • Creating an Aperture web page from photos the page goes white and nothing displays. Is this a RAM issue?

    I have just purchased an iMac 27" 2.7GHZ running OSX 10.7.4 with 4GB RAM (16 GB has been ordered). I am using Aperture 3.3.2. When I attempt to create a web page from photos the page goes white and nothing displays. Is this a RAM issue?

    I have resolved the issue....turns out that, in my case, running OSX 10.8.1 with Aperture 3.3.2 was what was required! I was running Aperture 3.3.2 with OSX 10.7.x and had this issue.
    I hope this helps someone else as well.

  • HP printer only prints blank pages from Word or Pages

    My HP all in one printer only prints blank pages from Word or Pages documents, prints ok from anything else.  Any ideas? Have deleted and readded printer removed HP software reinstalled software from Apple etc. Help please!

    If this just happens from these two programs, it's most likely a driver conflict.  If typically using an alternate driver will alow you to get around this.  To try this, add the printer's que to the Mac.  Click the dropdown next to Use and choose a driver that's not for your printer.  Typically the best one to try is another Photosmart dirver, but Deskjet drivers will work as well.  I would make the instructions a bit more clear, but I don't have access to a 10.6 Mac.  Let me know if this works or not. 
    I am a printer tech for HP.

  • Is it possible to delete a single page from a multi-page Adobe document?

    Is it possible to delete a single page from a multi-page Adobe document?

    With Adobe Acrobat yes - but not with the free Adobe Reader.

  • Having trouble with the syntax when trying to only print some random pages from a multi page documen

    Having trouble with the syntax when trying to only print some random pages from a multi page document.  So far in the Print Selection Area, I have chosen "pages" and then typed 1,3-4 so as NOT to print page 2 but this does not seem to work. - Help Please

    In my updated firefox, the print button does NOT open print preview first.
    How can I access print preview function?

Maybe you are looking for

  • How can i set the page margin to be a different width on the first page than the rest in Pages?

    I am creating an ebook where I want the first page to be the cover, but don't want to have a margin round the edge. However the remaining pages I want a margin so the text looks good (as I am also exporting this as a PDF) Is there any way to do this

  • Remote Disk Not Working

    I have a Mac Air and an iMac, both running 10.5.8 and both on the same wireless network using an airport extreme router. I get connected fine when I access remote disk on the Mac Air, but the CD/DVD icon never appears on the Mac Air desktop (it does

  • Issue with Total Number of SODs at user level.

    Friends, Quick question - We are using GRC 5.3 Production on NT 20003 server. and back end systems are ECC 6.0 1.We added the Additional Role to one of the business users in ECC 6.0 2.We ran the FULL synch after adding this role in backend. Issue : T

  • Get all tags and attributes from schema

    Mapping question I have a mapping requirement where the customer needs all the tags and attributes from the schema whether it has a value or not. The schema has almost 1500 tags and each of them has a attribute. We are mapping only about 50 of them,

  • Skype out resulted in fees for a receiver?

    Hi there! Today I was making some calls from Australia to Europe and on our surprise the receiver got a hefty price to pay for 27sec call. The receiver is at home (Easter Good Friday), with registered mobile phone to HT (Hrvatski Telekom), +385, Croa