How to stop caching ip address in servlet

I am using iplanet 6.0 with 2.3.1_02 jvm,
Is it possible to set the -D option in jvm12.conf to set the ttl not to cache ipaddresses?
OR Do we have to write the code inside the servlet?

Experiment. Write a servlet that prints out the IP address of the host "hello.world".
Stick in "1.2.3.4 hello.world" in /etc/hosts and run the servlet.
Then change the /etc/hosts entry to "9.8.7.6 hello.world" and see what happens (you'll need to wait out your jvm.options ttl setting, obviously).
Now to the real point: at least if you are running Solaris, be careful of the name server ttl cache setting. Test it long and carefully before deploying to production. Avoid it if you have a plan B. Seems like there is a pretty ugly bug in there somewhere.
I run a server that used to have ttl settings. After a couple of days, the server would start throwing UnknownHostException's right and left.
See bug id 4417030 in BugParade; search more for other possibly related reports.
Due to threading, Java needs a re-entrant resolver library implementation. I hear writing one is quite hard, and few if any OSs get it right.
(I do know about the ttl setting for negative lookup results; it ain't that.)

Similar Messages

  • How to stop caching on the server

    Hello,
    Can anyone please guide me as to how do we disable caching on the
    portal server since the changes i am making in the JSP pages are not
    reflected immediately. I have already cleared the browser cache but now i
    want to clear the cache on the portalserver. I have also cleared all the
    class files created when the jsp was compiled but still there is no change.
    If anyone has faced similar problems and can throw some light on it.
    akshay

    Akshay
    I faced the same problem as you did.I went thru what Adrian advisesd and it works.Did
    you update teh correct XML file?.In my case,the weblogic.xml file is whawt holds
    this property and resides in
    D:\wlportal4.0\applications\portal\dp2\WEB-INF\weblogic.xml
    where 'dp2' is the sample portal iam working on.
    I hope this helps.
    - Logesh
    "akshay" <[email protected]> wrote:
    Hi Adrian,
    Thanks again for the quick reply but even this setting
    did not
    work.
    This has created a major development problem and the only way out i found
    was either to restart the server or change the name of the file which
    i am
    accessing. Please suggest some other way to achieve this no caching state
    on
    the server i even cleared the browser cache.
    Thanks in advance
    akshay
    "Adrian Fletcher" <[email protected]> wrote in message
    news:[email protected]...
    Akshay,
    Ok, now I understand your problem. What you need to do is to changethe
    JSP
    operating parameters for this webapp. These parameters are found inthe
    weblogic.xml file associated with your webapp. The reference for thejsp
    descriptor element can be found here:
    http://edocs/wls/docs61/webapp/weblogic_xml.html#1012195
    I think the parameter you need to change is pageCheckSeconds. Ifyou set
    this to 0 then the page is checked every request.
    Hope this helps,
    Sincerely,
    Adrian.
    Adrian Fletcher.
    Senior Software Engineer,
    BEA Systems, Inc.
    Boulder, CO.
    email: [email protected]
    "akshay" <[email protected]> wrote in message
    news:[email protected]...
    Hi adrian,
    Thanks for your quick reply I am not aware about theclustered
    environment but here i have created a jsp page (named first.sjp)
    to
    check
    a
    connection pool i have created which i have placed it along with
    the
    index.jsp page of stockportal and using the following URl i havemade a
    request http://<myportalserver>:7501/stockportal/first.jsp the first
    time
    when i request for this page it works fine -- the data flows perfectlybut
    after making any changes say for example if i change the table name
    from
    where the data is to be fetched
    it does not show me the new data it shows me the data from the previous
    table. whereas if i change the name of the jsp page and request itworks
    fine. I want to disable this caching
    at the server to make this thing work i cleared all the cache ofthe
    browser
    but still could not achieve no cache state.
    thanks in advance
    akshay
    "Adrian Fletcher" <[email protected]> wrote in message
    news:[email protected]...
    Akshay,
    The design of the caching in portal is such that all changes should
    be
    reflected immediately, even across a cluster. However there isone
    outstanding issue around a performance enhancement for the anonymoususer
    case, where this cache is not updated unless the associated .portal
    file
    is
    datasynced. So for changes to the default group either test with
    a
    logged
    in
    user of this group or do a datasync to clear the cache.
    If this does not solve your problem please let us know.
    Sincerely,
    Adrian.
    Adrian Fletcher.
    Senior Software Engineer,
    BEA Systems, Inc.
    Boulder, CO.
    email: [email protected]
    "akshay" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    Can anyone please guide me as to how do we disable caching
    on
    the
    portal server since the changes i am making in the JSP pages
    are not
    reflected immediately. I have already cleared the browser cachebut
    now
    i
    want to clear the cache on the portalserver. I have also cleared
    all
    the
    class files created when the jsp was compiled but still there
    is no
    change.
    If anyone has faced similar problems and can throw some light
    on it.
    akshay

  • How to stop caching

    hi all
    please could someone let me knowhow to stop a JSP page from being cached, which headers do i use?
    thanks

    Try one or more of these:
    response.setHeader("Pragma", "no-cache");
    response.setHeader("Expires", "Tue, 25 Dec 1993 23:59:59 GMT");
    response.setHeader("Cache-control", "no-cache");
    response.setHeader("Last-Modified", "FRI, JAN 29 2099 23:59:59 GMT");
    response.setDateHeader("Expires",0);
    By the way, there's another smooth way of preventing pages in the cache to be fetched, using javascript. In a href or a submit, use javascript, adding a new Date() in the querystring, this will result in a unique request everytime.
    /Ruickard

  • How to stop multiple auto-switching to address bar every time I open a new tab and try to type something anywhere outside of address bar?

    How to stop multiple auto-switching to address bar every time I open a new tab and try to type something anywhere outside of address bar? Like something just wants me to use that embedded search when u type something not-web-address in address bar and hit enter. And the most ridiculous thing is that it happens repeatedly on like every second, like I just move down from address bar and start typing again, but then again it switches me to address bar, and 3, 4 times like that. And the result is also that I can't see the address of that page.
    I think its has something to do with my AVG antivirus, because this started the same time some AVG Nation started to appear in every new tab i open (and thats also irritating me, I read about it here on support.mozilla.org and it seems that the only solution is to completely reinstall Firefox, but I dont want to lose all my settings) but when i type something in address bar and hit enter it opens the search results in Google.
    Please try to help me, I like Firefox but I must switch to Chrome until I fix this problem.
    Thanks in advance

    First, please update to Firefox 32. 22 is no longer support nor is it secure. Then let us know if you still have this problem. [[Update Firefox to the latest version]]

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • N Mail, when using "reply all" why does Mail automatically include my email address in the cc line? Whey would I want to include my email address in an email I am sending.  Anybody have any idea how to stop this?

    In Mail, when using "reply all" why does Mail automatically include my email address in the cc line? Whey would I want to include my email address in an email I am sending.? Anybody have any idea how to stop Mail from including my email address in the cc line when using "reply all"?

    Automatically cc myself is not checked.  I did find out that if you have multiple email address that all of them need to be associated with "My Contact" tab.  Thanks

  • Hello I have just updated my iphone 5 and it keeps requesting 2 old email addresses from I quests my old laptop any idea how to stop this ? Thanks

    Hello I have just updated my iphone 5 and it keeps requesting 2 old email addresses from I quests my old laptop any idea how to stop this ? Thanks

    Log out of the old ID, then login using the new one with the correct pw.

  • How do I stop autofill of addresses in the address bar

    I just switched to Mac from PC. I purchased a used macbook with OS X (10.5.5). I am trying to figure out how to stop Safari from automatically displaying website addresses in the address bar when I start to type in an address. Also along the same subject, is there a way to clear that information as these are websites the previous owner visited and some are rather vulgar. Any help would be appreciated.

    hi there, jhy --
    Welcome to Apple Discussions!
    We're a bunch of Mac users helping each other,
    so glad you found us.
    Ok, here's where to go for starters, OK?
    1. Go to the main Safari menu, at the upper left corner of the menu bar,
    Then select "Preferences", then go to:
    General: Remove history items "After one day."
    Autofill: Uncheck all options of Autofill,
    go to "Edit" button for each one, and select "Remove All."
    Then go to
    Security. Select "Show Cookies" and then "Remove All."
    Then to over to the Google Search "Search Discussions" at the upper left side ------->
    and click and hold on the magnifying "Q" thingie just to the left of the word "Search"
    and select "Clear Recent Searches."
    That at least is a good start, I hope.

  • Anyone any advice on how to stop my mail "activity" from continuously caching? is this a problem? I have had inbox issues recently that are not resolved yet but I am not sure if they are related.

    Anyone any advice on how to stop my mail "activity" from continuously caching? is this a problem? I have had inbox issues recently that are not resolved yet but I am not sure if they are related.

    Quit Mail. Force quit if necessary.
    Back up all data. That means you know you can restore the Mail database, no matter what happens.
    Triple-click the line below on this page to select it:
    ~/Library/Mail/V2/MailData/Envelope Index
    Copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder
    from the menu bar. Paste into the box that opens (command-V), then press return.
    A Finder window will open with a file selected. Move the selected file to the Desktop, leaving the window open. Other files in the folder may have names that begin with "Envelope Index". Move those files, if any, to the Trash.
    Log out and log back in. Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is corrupt and that Mail has to quit. Click OK.
    Test. If Mail now works as expected, you can delete the file you moved to the Desktop. Otherwise, post your results.

  • How to stop Mail from selecting addresses from the list of Previous Recipients?

    How to stop Mail from selecting addresses from the list of Previous Recipients?

    This is a related question.
    I deleted ALL my previous recipients and when I create a new e-mail it STILL is getting addresses that I don't want - they pop up and I don't know how to stop this!
    I switched from one ISP to another - I deleted the old e-mail account in MAIL - I DID use the same name on the account - is that why it keeps bringing up the old address? 
    ARGH!

  • Just started getting about 300-400 emails per day from several fraudulent Addresses to my icloud email and am not sure how to stop receiving them, or create a rule to have them all go to Junk.When unsub, I get more. Emails from my contacts are now Junk?!

    Just started getting about 300-400 emails per day from several fraudulent Addresses to my icloud email and am not sure how to stop receiving them, or create a rule to have them all go to Junk.When unsub, I get more. Emails from my contacts are now Junk?! How do I fix this? I have over 800 emails since 5Am YESTERDAY!

    First, don't unsubscribe.  This only tells the spammer that your email address is valid and they will send even more.
    If this is only being sent from a few specific email addresses, you can set up a rules on icloud.com similar to the image below to send them to the trash.  This describes how to set up a rule: http://help.apple.com/icloud/#mm6b1a3f8a.

  • When i type any letter on web search, earlier address appear. how to stop that?

    when i open firefox there is an item on toolbar ie web search and before that there is some space in which one type any item to search on web. once that is finished and again when some other item is to be typed to search on web, we start with the first letter of that item or subject so to say. as soon as that that letter is typed, down below appears the the entire list of the items previously searched.how to stop appearing of earlier searched items?

    You can do this by disabling form history.
    # In the Tools menu select Options to open the Options dialog
    # Select the Privacy panel
    # Set "Firefox will" to "Use custom settings for history"
    # De-select the setting "Remember search and form history"

  • How do I stop past email addresses I have sent to going in to my contacts?  I delete them from my contact and they reappear. Thanks

    I stop past email addresses I have sent to going in to my contacts?
    I delete them from my contact and they reappear.
    Thanks

    They're probably in Mail's previous recipients window. Click the Window menu, then Previous Recipients. You can search for and delete addresses from here.
    Matt

  • How to stop Safari caching?

    When I visit this discussion group in Safari on my iPhone using the link,
    http://discussions.apple.com/forum.jspa?forumID=1274, I often get old versions of the page.
    Is there some way to force Safari to stop caching and get the latest page?

    nedhamilton wrote:
    Is there some way to force Safari to stop caching and get the latest page?
    There is not. However, you can clear your Safari cache in Settting > Safari > Clear Cache

  • HT1918 how to stop being sent paper work to my billing address

    how to stop being sent paper work to my billing address

    Tools menu (Alt_T) > Account settings > Return receipts for the "per account" settings and a link to the global setting. If however your using Microsoft Exchange or another corporate mail server you may have no choice in the matter. The server over rides local settings, and adjustment required the server admin to make changes.

Maybe you are looking for