Opening new web page using servlet and jasper report. ?

Hello,
I am developing one small web application and implementing jasper report in it. I am using jasper report with servlet. Which is generating one pdf file and displaying in same browser. But I want to open this report in new browser. Which is only display that report window. I am trying it. response.setContentType("application/pdf");
               /response.addHeader("Content-Disposition", "attachment; filename=" // this is basically for downloading pdf file.
                         + request.getParameter("D:/rnext/30-oct-2009/sms/web/jsp/Reports/allstudentsofwholecollege.jasper") + "");
      response.setContentType("application/pdf");
      response.setContentLength(bytes.length);
      servletOutputStream.write(bytes, 0, bytes.length);
      servletOutputStream.flush();
      servletOutputStream.close();In this code it is showing me attachement file of report.
When I changed the response.addHeader(Content-Disposition", "inline; filename=" // this is basically for downloading pdf file.)
It is opening in same window. Please help if you can. It is urgent. please help.
Thanks in advance.
Manveer

Use target attribute with link you have placed on you JSP page. [Look Here|http://www.w3schools.com/tags/att_a_target.asp]
Also remove Content-Disposition header if you want to open file in browser.
In latest browsers it might be possible you will see new tab opened rather then whole new browser window, This depends on browser settings.

Similar Messages

  • Buling a new Web Application using JSF and Ajax.

    Hello Group,
    I am a building a new web application using JSF and AJAX. Planning to use Myfaces Tomahawk, Dojo for Ajax, Hibernate, Spring,Eclipse IDE and Jetty Server.Can some one please suggest me will this be a right one for
    building complex UI and will it support for using the jsf features and would like to know any other free open
    source framework, ide, tools which support the best way for an agile project..?. There is restriction like i have to use java1.4

    jaisheela wrote:
    Hello Friends,
    I am also in the same situation.
    I am a building a new web application using JSF and AJAX.
    Requirement is I need to use IBM version of DOJO and JSF but I need to develop the whole application using Eclipse 3.3,2 and Tomcat 5.5.
    With IBM version of DOJO and JSF, will Eclipse and Tomcat help to speed up the development or do you suggest me to go for Rational Application Developer and WebSphere Application Server.
    If I need to go with RAD and WAS, then I am new to RAD and WAS, is it easy to use RAD and WAS for this kind of application and implement web applicaiton fast.
    Any feedback will be great help.Those don't sound like requirements of the system to me. They sound more like someone wants to improve their CV/resume
    From what I've read recently, if it's just fast you want, look at Ruby on Rails

  • When I select print from any website article while in Firefox it only prints a blank page. When I open same web pages using Safari, they print fine. Documents in other appliations print fine. Only Firefox documents print blank page.

    When I select print from any website article while in Firefox it only prints a blank page. When I open same web pages using Safari, they print fine. Documents in other appliations print fine. Only Firefox documents print blank page.

    Quit Safari.
    Open the Library folder in your home folder as follows:
    ☞ If running Mac OS X 10.7 or later, hold down the option key and select Go ▹ Library from the Finder menu bar.
    ☞ If running an older version of Mac OS X, select Go ▹ Go to Folder… from the Finder menu bar and enter “~/Library” (without the quotes) in the text box that opens.
    Delete the following items from the Library folder:
    Caches/com.apple.Safari/Cache.db
    Preferences/com.apple.quicktime.plugin.preferences.plist
    Preferences/QuickTime Preferences
    Relaunch Safari and test.

  • Open new web page in N80

    Hi,
    Can any one pls let me know how to open a new web page in Nokia N80 while browsing net using wifi?Like in PC/IE we can open a new page for a new web address while minimise the current.Is there any option like this in Nokia N80.

    i thought there was an option, by going to "options"-> "window"
    my phones in order of appearance : (starting 3 years ago!) Sony CMD-Z1 plus, Motorola timeport, Nokia 3310, Nokia 3410, Sony Ericsson T300, Sharp GX10i, Sharp GX30i, Sagem My-X-2, Sony Ericsson V800, Sony Ericsson P900, Samsung D500, Sharp 902, Nokia N80 (got mugged by 4 20 year olds). Motorola V3, Sony Ericsson K610i, Samsung D800, LG Chocolate, Nokia N70!
    I change phones a lot, have had 11 different handsets in 2006!!

  • How to open a web page using indesigncs3  javascript ?

    i cant able to open web pages using this CS3 js.i anyone tell me the syntex?
    thanks
    subha

    Post your question in the forum 'InDesign Scripting'.

  • Multiple browsers won't open a web page, but Skype and Mail work.

    turned off my computer one night and the next morning none of my browsers (safari, chrome, Firefox) would open a page...("server unexpectedly dropped the connection")  spotify works, and my mail program still receives mail.   What's weirder, a google search sometimes works in chrome, but won't load a page once selected inside the google results page!  Also, two other devices connected wirelessly to router work fine.
    Any ideas?

    The exact same thing happened to me last week.   On May 22 I was able to search the Internet like normal, and then I turned off my computer to go to bed.  The next morning I tried using Firefox and found out that not many sites would load.  I then tried Safari and had the same issue.   I was able to search for something on google by typing a search term into the search box at the top of my browser, and it took me to the google page as you describe above.  
    However, when I clicked most links, they would not load.  Some would, though, but only a few.  After analyzing the links that did work, I realized that the sites that worked were https sites.   Http sites would not work at all.  
    I had two things that updated on May 22 -- one was Adium and the other was Sophos anti-virus.   The Sophos update was what caused the issue....but only because it must have had a conflict with AVG LinkScanner, which I had disabled a long time ago. 
    Before I realized that it was the AVG LinkScanner with the real issue, I turned off the web protection features on Sophos.   I then refreshed some http sites, and it solved the problem.
    However.....I did some more research and learned that AVG LinkScanner might be the real issue (even though it hadn't updated since Feb. and I had it disabled).   I disabled it because I couldn't find a way to uninstall it.  So I found this link:
    https://discussions.apple.com/thread/4724011?start=0&tstart=0
    And I uninstalled AVG Link Scanner, and after I uninstalled it, I turned back on the web protection features on Sophos anti-virus.   The http sites still work. 
    I don't know if this is the same issue as I had, but it sounds so similar.  Do you, by chance, have AVG LinkScanner, Sophos anti-virus, or any anti-virus program?

  • Firefox will not open new web pages.

    When I open firefox it goes to the firefox default page with one blank new tab. New tabs will open with blank page but Firefox will not go to any new sites just stays on blank pages. I have already tried starting in safe mode, creating a new profile, and un-installing and re-installing and the problem persists.
    It is not blocked by either my firewall or antivirus program.
    This all seems to have started after an automatic update made by Firefox.

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • With multiple tabs open, and selecting a new (blank) tab, RoboForm open new web page in far left tab, not the new (blank) one. How to correct this?

    Problem: Firefox Browser Tabs when using RoboForm
    When using Tabs in the Firefox browser (with multiple Tabs already open), I (1) click to open a new (blank) tab and then, (2) click on RoboForm to go to a new website. Instead of the new website opening in the newly opened (blank) tab it opens in the first (far left) tab. This only began happening when I installed Firefox 5.0 and RoboForm Desktop v7.3.2 at the same time.
    My system: HP Pavilion Media center, Windows Vista Ultimate 64-bit, 8GB RAM, Firefox v5.0, Roboform Desktop v7.3.2

    Thanks a lot. The culprit turned out to be Webmail Notifier. Unfortunately, there seems to be some problems on their end that the developer has not yet responded to, but something about the extension is screwing up tab functionality.
    Thanks!

  • When i use safari new web pages pop up and my blockers are on

    Every time i use Safari, extra windows pop up, i close it and then another one will pop up.
    I have blockers on but i doesn't seen to make a difference.

    Go step by step and test.
    1. If adware is installed without your knowledge,
        download  free AdwareMedic by clicking “Download ” from here
        http://www.adwaremedic.com
       Install , open,  and run it by clicking “Scan for Adware” button   to remove adware.
       Once scanning and removing the adware is done, quit the app by clicking AdMedic in the menubar
        and selecting “Quit AdwareMedic”.
    2. Safari > Preferences > Extensions
        Turn those off and try Safari.
    3. Safari > Preferences > Privacy > Cookies and other website data:
        Press “Remove all website data” button.

  • Exiting animation to a new web page (using Edge .oam file in MUSE)

    Hello,
    Ok. Here is the situation. I have a webpage that was done in MUSE, on that page there is a mouse click button that starts an Edge animation.
    When the animation finishes I want an ( automatic) action that displays a new webpage on the same website.
    I tried setting up a 'timeline stop' action on the main stage
    window.open("http://homie0106.businesscatalyst.com/menu-1.html");
    No dice. Any ideas? 
    Thanks in advance
    Bob

    GOT IT.  The method I posted DID work.....once I fixed my hyperlinking mistake.

  • Opening any web page causes hangs and multiple unresponsive scripts

    Any time I open up firefox, it hangs on nearly every webpage. After several minutes, an unresponsive script error will appear. Stopping the script does nothing the vast majority of the time. Most often, one to ten more unresponsive script errors will appear. I have already tried resetting firefox and running firefox in safe mode, neither of which helped the problem.

    Hello,
    Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    Then perform these steps:
    *Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
    *In the Firefox options window click the ''Advanced'' tab, then select "General".
    *In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
    *Now, restart Firefox and see if the problems persist.
    Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    Did this fix your problems? Please report back to us!
    Thank you.

  • How to open a web page using HttpConnection class in cs3

    Hi all!
    Can anyone help me how to open a webpage using HttpConnection class in cs3?
    Thanks
    Senthil

    > If any other way to access database? advice me!
    Instead of using http, you are better off writing a command line script (that
    uses bash or cmd.exe or whatever) that does this and then call that script using
    app.system.
    The code is much simpler and far easier to test and debug.
    -X

  • IN R12, NEW WEB PAGES ARE OPENED IN THE MINIMIZED POSITION

    We've upgraded to Release 12.0.5. Whenever we click on functions that open new web pages, the new web page opens in the minimized position.
    This is very troublesome for our user community because they often do not notice the new page blinking and they keep clicking the link many times.

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    You can also try to set the gfx.content.azure.enabled pref to false or if this didn't help disable Direct2D by setting the gfx.direct2d.disabled pref to true on the about:config page and leave hardware acceleration otherwise enabled.
    *[[/questions/942265]] Font is messed up on Firefox 17.0

  • I have a Mac Air, I opened a web page and it died within a nano second, then I got the beachball for about 40 mins so I turned it off. Now I cant start it up again, I get the chime, the apple a grey screen then I get the pinwheel, it's still going, help

    I have a Mac Air, and I opened a web page in Safari and it died before the page could load, then I got the spinning beach ball for about 40 minutes so I turned it off. Now When I turn it on I get the chime, a grey screen, then the apple, then the pin wheel  -its been going now for an hour.
    Any help greatly appreciated

    There are several ways to back up a Mac that is unable to fully boot. You need an external hard drive to hold the backup data.
    1. Boot into Recovery (command-R at startup; 10.7 or later), from a local Time Machine backup volume (option key at startup; 10.7.2 or later), or from your installation disc (C key at startup; 10.6.8 or earlier.) Launch Disk Utility and follow the instructions in the support article linked below, under “Instructions for backing up to an external hard disk via Disk Utility.”
    How to back up and restore your files
    2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode by holding down the key combination command-T at the startup chime. Connect the two Macs with a FireWire or Thunderbolt cable. The internal drive of the machine running in target mode will mount as an external drive on the other machine. Copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    How to use and troubleshoot FireWire target disk mode
    3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.

  • Building a best practice web application using ColdFusion and Jave EE

    I've been tasked with rewriting a software using ColdFusion.  I cannot seem to find a lot of information on best practice development in ColdFusion.  I am an experience Java developer who has never used ColdFusion before.  I want to build this application using a synergy of ColdFusion and Java EE technologies.  Can someone recommend me a book that outlines how to developer in ColdFusion?  Ideally this book assumes the reader is an experienced developer with no exposure to ColdFusion.  Ideally the methods outlined in the book are still "best practice" methods.

    jaisheela wrote:
    Hello Friends,
    I am also in the same situation.
    I am a building a new web application using JSF and AJAX.
    Requirement is I need to use IBM version of DOJO and JSF but I need to develop the whole application using Eclipse 3.3,2 and Tomcat 5.5.
    With IBM version of DOJO and JSF, will Eclipse and Tomcat help to speed up the development or do you suggest me to go for Rational Application Developer and WebSphere Application Server.
    If I need to go with RAD and WAS, then I am new to RAD and WAS, is it easy to use RAD and WAS for this kind of application and implement web applicaiton fast.
    Any feedback will be great help.Those don't sound like requirements of the system to me. They sound more like someone wants to improve their CV/resume
    From what I've read recently, if it's just fast you want, look at Ruby on Rails

Maybe you are looking for

  • Custom Net Change Booking Report

    Friends, I am in the process of creating a Custom Net Change Booking Report. The Report should show the changes that affect the sale order Bookings. The Audit history capture the changes but it stores two lines for each change. Main Constrains are:-

  • Manual Subreport Variable Counter Issue on Following Page

    I have a subreport that has a manual counter in it which counts records if certain criteria is met.  I designed the sbrpt field values to display inline with the respective lines in the main report.  I accomplished this by placing the sbrpt in the gr

  • Is the slide show suppose to work in iweb?

    Hey guys...i know this might seem dumb, but i've scoured the forums for an answer and there doesn't seem to be a problem like mine. so here goes. When the slide show is filled with thumbnail pictures and then you go to click on the pictures. Should a

  • My MacBook prints documents every time I open it up. How can I stop this?

    My macbook likes to print my most recently printed documents over again every time I open it up.

  • T61 Rescue and Recovery - system restore has no restore points

    Hello I just got a T61 with Vista basic, I made some restore points in Vista but in ThinkVantage, system restore there is no restore points in the "Main hard disk" area. I also have updated using ThinkVantage system update, all the crucial items. Is