Cache problem for servlet opening new browser window

Requirement:
I have JSP page say summary.jsp with link "print account summary"
When user clicks on this link, new browser open with PDF document of summary.jsp
This new browser window should not have address bar and toolbar.
Solution:
Servlet called PrintSummary which sets contenttype=application/pdf and sends the data to outputstream.
href of link is
Java script function is:
function openWindow(url){
window.open(url,'blank','toolbar=no')
Problem:
Since the URL of this new window is
http:// host:portnumber/PrintSummary
Even if I click the "Print summary" link for account2,
being the same URL (http:// host:portnumber/PrintSummary) it accesses the existing page in the cache which is created for account 1.
In href if I just use servlet url as
I get the expected behaviour but then I don't have control on browser appearance and browser window will be with address bar and toolbar.
The only option I could think of was changing URL as follows:
<% String url ="javascript:openWindow('PrintSummary? var1="+ Math.random()+"')";
So that URL is different all the time
Is there any way to solve this problem?
Thanks in advance
M.

I'd definitely try to use a Flex popup... but the
flash.net.navigateToURL method is a simple way to open a popup
window in a new browser. You can pass any data needed by the new
page using the URLRequest and/or URLVariables. The URL you navigate
to could, of course, be another Flex application if necessary. I
use this only when I need to open a popup window on another site,
or an HTML formatter report or something similar.
Concerning yourself with the size of the popup window may be
a bad design choice also. I, for example, have my browser
configured to open all popups in a new tab regardless of sizing
constraints imposed by the designer. If it is absolutely necessary
for you to have control over the size of your popup window, you
should follow the advice given by others and use a Flex
popup.

Similar Messages

  • Opening new browser window

    Hi,
    this piece of code use to work for opening a new browser, but now it has problem in opening browser window. There is no exception thrown, can anyone has suggestion whats wrong in this. I am using JRE1.3. I have a feeling that something is conflicting with IE (I tried on 5.0,5.5,6.0)
    thanks
    Syed
    try
    URL url = new URL(urlString);
    applet.getAppletContext().showDocument(url, "_blank");
    } // End of Try
    catch(MalformedURLException e)
    logs("Exception in opening new browser window: " + e);
    } // End of Catch

    Same here.
    Worked fine under IE5.x to IE6, JRE 1.3.x to 1.4. OS used were W2k and WinXP, no prob here.
    Now on some PCs the windows don't pop up anymore. No exception, no indicator of what's going wrong.
    Any hints?
    J�rgen

  • Any way to open new browser window without using image maps?

    Is there any way to open new browser window without using image maps? My code works fine in Firefox, but not in IE. There are 2 problems in IE: 1st is that the thumbnail images move up within their own borders & 2nd that when you click on an image it does open up a new browser window, but also redirects to the index page (in this case it's just a placeholder index page - the new one I've called index_new.html for the time being).
    Here is the link:
    http://www.susieharperdesigns.com/gallery_beads.html
    Any help is greatly appreciated.

    Your missing a value on the HREF.  In your code you have this:
    <area shape="rect" coords="-24,-9,106,144" href=" " onclick="MM_openBrWindow('gallery_bead1.html','','width=255,height=360')" />
    </map></div>
    and it should be this:
    <area shape="rect" coords="-24,-9,106,144" href="javascript:void()" onclick="MM_openBrWindow('gallery_bead1.html','','width=255,height=360')" />
    </map></div>
    If you fix the code on all your beads, it should work.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Opening New Browser window for click event on an image

    hi all,
    I want someone to help me out solving the problem of opening
    a new browser window on the mouse click event of an image or a
    button etc.... The new window would contain the datagrid details
    from the main window, but in an expanded form. If at all there is a
    solution, I even want to know whether there is anyway for sizing
    the poped up window,because I dont want the new poped up window to
    cover the entire screen.
    For getting better idea of my problem, the best example I
    could give is the popup window that appears when we click on the
    preview button while posting the message to the forum.
    Someone please do help me out in this regard.
    Thanks,
    amar.

    I'd definitely try to use a Flex popup... but the
    flash.net.navigateToURL method is a simple way to open a popup
    window in a new browser. You can pass any data needed by the new
    page using the URLRequest and/or URLVariables. The URL you navigate
    to could, of course, be another Flex application if necessary. I
    use this only when I need to open a popup window on another site,
    or an HTML formatter report or something similar.
    Concerning yourself with the size of the popup window may be
    a bad design choice also. I, for example, have my browser
    configured to open all popups in a new tab regardless of sizing
    constraints imposed by the designer. If it is absolutely necessary
    for you to have control over the size of your popup window, you
    should follow the advice given by others and use a Flex
    popup.

  • Opening a servlet in new browser window

    Does anyone know how you can make a servlet open in a a new browser window when clicking a link for that servlet.
    cheers

    Hi..
    do
    window.open("http://localhost:8080//yourservlet-path//servlet-name");
    you can also set window properties, they are passed as parameters to window.open
    see syntax of window.open. but this thing will open your servlet in a new window with default properties.

  • Open New Browser Window in CS4 opens behind existing window - HELP!

    I am creating a website in CS4, and everything works fine EXCEPT ona few pages, for every link I have set up to open in a new browser window, the new window opens BEHIND the existing window, so that you cannot see it. I tried one solution that said to type "javascript:;" in the href (link) box, but that did not correct the problem. Any ideas?
    Thanks.

    Sounds like you have Tabbed browsing enabled.
    IE
    http://www.ie-vista.com/tabs.html
    Firefox
    http://www.mozilla.com/en-US/firefox/features/#tabs
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.com/blogspot.com

  • Open new browser window from a JApplet

    Hi,
    I want to open a new browser window from a JApplet.My first thought was to use the Live Connect technology but it worked only with simple applets not with JApplets.Then i tried it by getting the Applet context (getAppletContext() method) but it still didn't work with JApplet...(it worked with Applet).I believe it has something to do with the applet security but i haven't yet figured it out.
    For example when i call the getAppletContext() method from a JApplet i get an java.security.AccessControlException ... .Thanks

    I must correct myself now :).
    The getAppletContext() method does work with JApplets too.Still , i have problems with the Live connection alternative.It seems that it by importing the netscape.javascript package i get the security eror that i mention above...

  • Open new browser window after insert

    I am having a problem with form data being errased when users
    go back to a form after after the insert command. I have been
    trying to get the insertGoTo page to be opened in a new browser
    window. The tail end of the insert command code looks as follows.
    $Result1 = mysql_query($insertSQL, $squirrelcart) or
    die(mysql_error());
    $insertGoTo = "new_page.php";
    if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
    header(sprintf("Location: %s", $insertGoTo));
    I have tried modifying the page name to:
    $insertGoTo ="MM_openBrWindow('new_page.php','page_name','
    This didn't work. Any suggestions on how to put the new_page
    in its own window, or is there a way to suppress the form page
    reload when going back ?

    Cody,
    It sounds like you are using <a href="#"
    Try using <a href="javascript:;"
    Or better yet, use David Powers' Smart Link:
    http://japan-interface.co.uk/webdesign/tools/index.html
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com
    "csnodgr2" <[email protected]> wrote in
    message
    news:fmc4tf$feq$[email protected]..
    > I've got a site that has a list of names of deceased
    people. When a
    > viewer
    > clicks on a name I have a new browser window open that
    is a small memorial
    > page
    > specific for that person. This list is fairly long so
    the viewer has to
    > scroll
    > down a ways to get to the bottom. If the viewer clicks a
    name towards the
    > bottom and then closes that new browser window they have
    to scroll all the
    > way
    > back down and find where they left off. This of course,
    is assuming they
    > are
    > going in order to view the memorial pages for each
    person. Is there a way
    > to
    > make the "original page (with the list of names)" not
    refresh to the top
    > of the
    > page? I'm using and would like to continue using tables
    and not layers or
    > styles.
    >
    > Information can be sent onto [email protected]
    >
    > Any help would be much appreciated!
    >
    > Thanks,
    > Cody
    >

  • Open New Browser Window Behavior Issue

    I've got a site that has a list of names of deceased people.
    When a viewer clicks on a name I have a new browser window open
    that is a small memorial page specific for that person. This list
    is fairly long so the viewer has to scroll down a ways to get to
    the bottom. If the viewer clicks a name towards the bottom and then
    closes that new browser window they have to scroll all the way back
    down and find where they left off. This of course, is assuming they
    are going in order to view the memorial pages for each person. Is
    there a way to make the "original page (with the list of names)"
    not refresh to the top of the page? I'm using and would like to
    continue using tables and not layers or styles.
    Information can be sent onto [email protected]
    Any help would be much appreciated!
    Thanks,
    Cody

    Cody,
    It sounds like you are using <a href="#"
    Try using <a href="javascript:;"
    Or better yet, use David Powers' Smart Link:
    http://japan-interface.co.uk/webdesign/tools/index.html
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com
    "csnodgr2" <[email protected]> wrote in
    message
    news:fmc4tf$feq$[email protected]..
    > I've got a site that has a list of names of deceased
    people. When a
    > viewer
    > clicks on a name I have a new browser window open that
    is a small memorial
    > page
    > specific for that person. This list is fairly long so
    the viewer has to
    > scroll
    > down a ways to get to the bottom. If the viewer clicks a
    name towards the
    > bottom and then closes that new browser window they have
    to scroll all the
    > way
    > back down and find where they left off. This of course,
    is assuming they
    > are
    > going in order to view the memorial pages for each
    person. Is there a way
    > to
    > make the "original page (with the list of names)" not
    refresh to the top
    > of the
    > page? I'm using and would like to continue using tables
    and not layers or
    > styles.
    >
    > Information can be sent onto [email protected]
    >
    > Any help would be much appreciated!
    >
    > Thanks,
    > Cody
    >

  • Open new browser window

    it also opens in the parent window at the same time. For
    instance, I have a home page and when you click on a link I want it
    to open up in a new browser window. so i set the behavior to do
    this and it works. However, the first window also changes to the
    new link so I then have two windows open with the same link I just
    clicked on. The main window doesn't stay as the home page. any
    suggestions? Thanks.

    Also David Powers' Smart Link extension may come in handy:
    (2nd extension on the page)
    http://japan-interface.co.uk/webdesign/tools/index.html
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au
    Forum Posting Guidelines:
    http://www.adobe.com/support/forums/guidelines.html
    CSS Tutorials for Dreamweaver:
    http://www.adobe.com/devnet/dreamweaver/css.html
    ": Nadia : ** Adobe Community Expert **"
    <[email protected]> wrote in message
    news:[email protected]...
    > You need to add a "return: false" statement to the link
    so that it
    > doesn't open onto itself....
    > A better explanation can be found here:
    >
    http://apptools.com/rants/popups.php
    >
    >
    > Project seven has this niftly little app available
    (commercial - but it's
    > served me well over time :)
    >
    http://www.projectseven.com/products/prodtools/powertoys/powertoys_retfalse.htm
    >
    >
    > --
    > Nadia
    > Adobe® Community Expert : Dreamweaver
    > ----------------------------------------
    > CSS Templates |Tutorials |SEO Articles
    >
    http://www.DreamweaverResources.com
    > ~ Customisation Service Available ~
    >
    http://www.csstemplates.com.au
    > ----------------------------------------
    > Forum Posting Guidelines:
    >
    http://www.adobe.com/support/forums/guidelines.html
    > CSS Tutorials for Dreamweaver:
    >
    http://www.adobe.com/devnet/dreamweaver/css.html
    >
    >
    >
    >
    > "Alexandra Christensen"
    <[email protected]> wrote in message
    > news:[email protected]...
    >> it also opens in the parent window at the same time.
    For instance, I have
    >> a
    >> home page and when you click on a link I want it to
    open up in a new
    >> browser
    >> window. so i set the behavior to do this and it
    works. However, the first
    >> window also changes to the new link so I then have
    two windows open with
    >> the
    >> same link I just clicked on. The main window doesn't
    stay as the home
    >> page. any
    >> suggestions? Thanks.
    >>
    >
    >

  • Opening new browser window from View Library links

    On some of the documentation pages, e.g. http://www.oracle.com/technology/documentation/ias.html , a new browser window is opened using target=new_win in the HTML code. This window will be re-used if the user goes back and clicks on another, similar link. It's better to use target=_blank for this purpose, because that would ensure that a new browser window is opened every time.

    You would have to a) swap the image, and b) expose a
    previously hidden layer
    that superimposes the image with a transparent GIF on which
    the onClick
    behavior has been applied.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "tldesignstudios" <[email protected]> wrote
    in message
    news:e7vfhm$1hf$[email protected]..
    > Hi all, does anyone know if it is possible to set a
    swapped image to open
    > a new browser window on a click command? Any help woul
    dbe much
    > appreciated. thank you in advance. :)

  • Open new browser window from Hyperlink in BIP PDF output report?

    Hello,
    Is there a way to open a new browser window from Hyperlink in PDF report?
    Thank you all in advance.
    MT

    Dear Friend,
    It is not supported for PDF Report. But below links helps you, to accombish this task in PDF report.
    [url http://oracleapps4u.blogspot.com/2011/03/open-hyperlink-in-new-browser-window.html]http://oracleapps4u.blogspot.com/2011/03/open-hyperlink-in-new-browser-window.html
    Thanks & Regards
    Ahamed Rafeeque Cherkala

  • Open New Browser window with "Server Behavior"

    I know how to open a link in a new browser window by going to
    the Behaviors panel. The site I'm working on is using PHP, so
    instead of a Behaviors panel all it shows is a "Server Behaviors"
    panel. Under the "Server Behaviors" there is't an option to open a
    link in a new browser window. Should I be looking someplace
    different or is there another way to add this function to a link?
    Thanks in advance for any help!

    horsethiefbasin wrote:
    > I know how to open a link in a new browser window by
    going to the Behaviors
    > panel. The site I'm working on is using PHP, so instead
    of a Behaviors panel
    > all it shows is a "Server Behaviors" panel. Under the
    "Server Behaviors" there
    > is't an option to open a link in a new browser window.
    Should I be looking
    > someplace different or is there another way to add this
    function to a link?
    >
    > Thanks in advance for any help!
    >
    Makes no difference whether youre working on a php site or an
    ordinary
    htm site you still open a new browser window in exactly the
    same way.
    windows>behaviours>open browser window

  • Open New Browser Window Behavior

    I have set a behavior in Dreamweaver CS3 to open a new
    browser window to a set size and to only show scroll bars if
    needed. I have left all other attributes unchecked. This works fine
    in all browsers including IE6 but IE7 ignores all my settings and
    just opens a normal full size browser window showing scroll bars,
    address bar, menus etc. Can anyone tell me how to make IE7 open a
    new browser window to my settings using the behaviors in
    Dreamweaver CS3?
    Thanks.
    Russ.

    I cannot reproduce this in IE7. Your OBW behavior works just
    the way you
    want for me. In your code, make sure that this is all on one
    line -
    <li id="cam"><a href="#"
    onclick="MM_openBrWindow('
    http://jkbmwebcam.co.uk/','webcam','width=640,height=480')">Webcam</a></li>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "rjay60" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi Thanks for your reply, heres the code.
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-
    >
    > transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml"><head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    > <!-- TemplateBeginEditable name="doctitle" -->
    > <title>Untitled Document</title>
    > <!-- TemplateEndEditable -->
    > <link href="../css/main.css" rel="stylesheet"
    type="text/css" />
    > <!--[if IE]>
    > <link href="css/iehacks.css" rel="stylesheet"
    type="text/css" />
    > <![endif]-->
    >
    >
    > <!-- TemplateParam name="id" type="text"
    value="currentPage" -->
    > <!-- TemplateBeginEditable name="head" --><!--
    TemplateEndEditable -->
    > <script type="text/javascript">
    > <!--
    > function MM_openBrWindow(theURL,winName,features) {
    //v2.0
    > window.open(theURL,winName,features);
    > }
    > //-->
    > </script>
    > </head>
    > <body id="@@(id)@@">
    > <div id="container">
    > <div id="header">
    > <div id="banner1">Cheapest Prices
    For..</div>
    > <div id="banner2">Used, Secondhand, Repossessed,
    Ex Lase Photocopiers,
    > Laser Printers &amp; Fax Machines.</div>
    >
    > <div id="banner3">Probably..</div>
    >
    > <li id="home"><a
    href="../index.html">Home</a></li>
    > <li id="contact"><a
    href="../contactus.html">Contact</a></li>
    > <li id="about"><a
    href="../aboutus.html">About Us</a></li>
    > <li id="find"><a href="../findus.html">Find
    Us</a></li>
    > <li id="cam"><a href="#"
    > onclick="MM_openBrWindow('
    http://jkbmwebcam.co.uk/','webcam','width=640,height=4
    > 80')">Webcam</a></li>
    > <li id="howto"><a href="#">How To
    Buy</a></li>
    >
    > </div>
    > <!--header ends here -->
    > <div id="sidebar">
    >
    > <li class="sidebarMenuHeader">Product
    Guide.</li>
    > <li id="copiers"><a
    href="#">Photocopiers.</a></li>
    > <li id="printers"><a href="#"> Laser
    Printers.</a></li>
    > <li id="fax"><a href="#">Fax
    Machines.</a></li>
    > <li id="export"><a href="#">Export
    Machines.</a></li>
    > <li id="offers"><a href="#">Special
    Offers.</a></li>
    > <li id="consum"><a
    href="#">Consumables.</a></li>
    > <li class="sidebarMenuHeader">Information /
    Help.</li>
    > <li id="about"><a href="#">About
    Us.</a></li>
    > <li id="aboutyou"><a href="#">About
    You.</a></li>
    > <li id="aboutsite"><a href="#">About Our
    Site.</a></li>
    > <li id="contact"><a href="#">Contact
    Us.</a></li>
    > <li id="faq"><a href="#">Frequently Asked
    Qustions.</a></li>
    > <li id="howto"><a href="#">How To
    Buy.</a></li>
    > <li id="find"><a href="#">How To Find
    Us.</a></li>
    > <li id="demo"><a href="#">Web
    Demonstrations.</a></li>
    > <li
    class="sidebarMenuHeader">Downloads.</li>
    >
    <a href="#">Brochures.</a></li>
    >
    <a href="#">Device Drivers.</a></li>
    >
    > </div>
    > <!-- TemplateBeginEditable name="sidebarRight" -->
    > <div id="sidbarRight">"sidbarRight" Goes
    Here</div>
    > <!-- TemplateEndEditable --><!--
    TemplateBeginEditable
    > name="maincontent" -->
    > <div id="mainContent"> Content for id
    "mainContent" Goes Here.</div>
    > <!-- TemplateEndEditable -->
    > <div id="footer">
    > Copyright? 2008 JKBM.COM Limited</div>
    > <!--RiteCounter-->
    > <script type="text/javascript"
    > src="
    http://www.ritecounter.com/c/12/11331.js"></script>
    > <noscript><a href="
    http://www.ritecounter.com"><img
    > src="
    http://www.ritecounter.com/scripts/htmlc.php?id=11331"
    alt="Free
    > Website
    > Visitor Counter" height="15" border=0></a>
    > </noscript>
    > <!--END RiteCounter--></td>
    > </div>
    > </body>
    > </html>
    >

  • Open new browser window without buttons, menus or URl-field

    Hi All
    How do you make an APEX-link open a new browser window with no toolbar?
    Brgds
    Helge

    You can create a javascript to window.open having toobar, menubar or statusbar=0. The page content can be customized per need. Call this javascript from a link or button click using javascript:popup_window();
    For example,
    <script language="JavaScript" type="text/javascript">
    function popup_window()
    w = window.open("", "Window", "width=320,height=400,status=0,toolbar=0,menubar=0");
    w.document.write('<html><head><title>Help Window</title>');
    w.document.write('</head><body>');
    w.document.write('<div><font face="Arial" size="2">This is help page.');
    w.document.write('</font></div><p>');
    w.document.write('<div><font face="Arial" size="1"><a href="javascript:window.close();">Close This Window</a></font></div><p>');
    w.document.write('</body></html>');
    </script>Ittichai

Maybe you are looking for

  • How can I download a full installer for Yosemite?

    I updated to the latest version of Yosemite from App Store/Updates but I would like to have a full installer available on my system "just in case." However, when I go select OS X Yosemite from the Featured section and click Download all I see is a sp

  • Poor quality resolution in my movies

    My holiday movies didn't appear on the ATV movies list, so i converted them in iTunes for iPod and the quality is really poor. Any suggestions..? Thanks.

  • Determine hot blocks on interconnect

    Hi, I got the below query from the forum...Re: How to determine hot blocks on interconnect and when i ran in my instance.. its show as SQL> select /*+ rule */ de.owner, de.segment_name, de.segment_type,   2    3  ash.event,   4  sum(ash.time_waited)

  • My cd drive won't accept a cd or dvd

    My cd drive won't accept a cd or dvd? how do i fix this problem there is no cd or dvd in the drive

  • Financial Statement version error

    Hi, here i create Define financial statement version i am dong the new entries this folw i am nentioned Financila stament version code, and given description and maintain language, and the select "Item Keys automatic" and given Chart of acc. and did