Printing a web  page from the browser using JSP

Hi sir,
I want to know how to print a webpage that contains some
report data where the web page contains a button as well when i click the button only the webpage contents(report data) should be send to the printer and should be printed.Here i should not use any javascript.By using pure java code in Jsp i need to do this.Pls.provide the code for this so that i will be grateful to u.Where it is very Urgent.I will be waiting for ur reply.
Thanx,
m.ananthu

If you are reasonable sure that the user will be using a newer browser you could use the <LINK> tag to set an alternative print page. When the user clicks on the print button it calls a javascript funtion that does a window.print function call. The browser will then request the alternative print page and print this page instead of what is in teh browser.
This will require two JSP pages but with proper use of includes you can reuse the code.
Sorry I don't have any examples handy so you'll have to search the web but I know it works because I've done it for an intranet site.

Similar Messages

  • Uploading the file to server from the browser using JSP

    I have facing difficulty while uploading the file from the browser using user interface to the server or to the database. As previousy i was working in coldfusion, i find it very easy there with cffile command, but i am confused how to do that in JSP
    please reply soon, as i am stuck in my project because of that
    Sarosh

    Check out http://www.jspsmart.com , They have a nice free upload api that can be used w/ JSPs or Servlets. I hear O'Reilly has a nice one too. May as well use someone elses if they've done it already.

  • Why can't I print a web page from my Android 4.1 phone to my 8500a printer? e-print is working.

    Why can't I print a web page from my Samsung Android 4.1 to my Officejet Pro 8500A. eprint is working, so I can send e-mails to my e-print address, but when I try to print a web page, it says that I don't have a printer. Can someone help me with this? 
    This question was solved.
    View Solution.

    Just received an update to the Android version of HP ePrint.
    It now has the ability to print web pages!  Thanks HP!  
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • I can't print any web page. after the print command, it wants to save xps files. on cannon printer. vista system

    can't print any web page. after the print command, it wants to save as a xps file.
    == This happened ==
    Every time Firefox opened
    == after up grade to 3.6.6 ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)

    I found that Firefox/XPS had deleted all printer driver setups except for the XPS connection. I had to reinstall my printer connection in order to have that selection present in the printer dialogue box.

  • My MacBook Air won't load web pages from the internet. It will connect to phone hotspot and run fine. The apple store reset the library and network preferences and it ran fine for a little bit, now slow again. Any ideas?

    My MacBook Air won't load web pages from the internet. It will connect to phone hotspot and run fine. The apple store reset the library and network preferences and it ran fine for a little bit, now slow again. Any ideas?

    My MacBook Air won't load web pages from the internet. It will connect to phone hotspot and run fine. The apple store reset the library and network preferences and it ran fine for a little bit, now slow again. Any ideas?

  • How to upload the image and diplay the image in the browser using jsp

    How to upload the image and diplay the image in the browser using jsp
    thanks
    shan

    i'll suggest looking for sample code or tutorial with a relevant query in google, which as far more time than us to answer this type of reccurent question

  • I can no longer get firefox to print a web page. I am using the print command in the drop down 'file' menu

    Can no longer print a web page. I use the drop down "fie" menu and the "print" command
    the HP4180 series appears to recognize the command but delivers only a blank page

    See if the solutions given in this artcile help: [http://kb.mozillazine.org/Problems_printing_web_pages Problems printing web pages]. <BR>Pay special attention to sections '''Prints to a small portion of the page''' and '''Does not print entire page content'''.

  • When Printing a web page from Firefox. The fonts are timy and all spacing is incorrect.

    Prior to beta 4.12, the pages printed correctly. Now, the fonts are small and the text spacing is incorrect. All text has at least one extra space between the letters.
    This happens on ALL sites when printing a web page.
    I tried printing the same page in Internet Explorer and it prints correctly.

    See this thread:
    *[/questions/787654]

  • Printing a web page from a Nexus 10 tablet to HP Deskjet 3055A printer

    Hi All
    I am trying to print web pages from my Google Nexus 10 32GB tablet to my HP deskjet 3055A Cloud printer.
    I am able to print off documents, emails, email attachments, etc successfully after sending them to the specified printer email address.
    I am also signed into Google Chrome at the time, and they say on their help link that I should go to Menu, then select Print from the options list, but Print is NOT in the list.
    Can you please help me?
    Thanks very much!
    Reevo Anders

    The menu option to Print is only available with Android 4.4.
    See these articles on how printing differs between Android 4.3 and 4.4:
    Android 4.3 (Jelly Bean) and Earlier: How to Use HP's Built-in Print Solution for Android
    Android 4.4 (KitKat) and Later: How to Use the Android Printing Solution
    I work for HP

  • How do I view my web pages in the browser again?

    I was able to work on my web pages in Dreamweaver MX2004 and view them in a browser until 3 days ago.  I have also been able to make changes on my web pages which showed up in my website until around 3 days ago.  i am very frustrated. I can no longer view them in a browser or make changes that show up on my website.   Any suggestions?

    I didn't install anything new.  I am using Windows 7 on a new computer and had successfully gotten my Dreamweaver installed and running.  I was able to view my pages in the browser just fine.  I made changes to my site just fine.  Now when i go to F12 to preview in the browser, all I get is a blank page showing my connection number to my web host and in little letters at the top, it says "pageok".  I have always seen the page and could correct any mistakes, but now I can't see the page.  It's also unbelievable the changes I have tried to make on some pages show up in my local and remote pages on my computer but do not show up when I go to the website.

  • Firefox won't allow me to print a Web Page. The only option I am given is to Save the Web Page as a PDF File .

    In FF 16.0.1 when I try to print a web page I get dialog box to save it as PDF. There is no other choice in the ‘save as type’ box. I do not want to save it; I just want to print it. This happens whether I use ‘file/print’ or the print button on FF. I use Win XP and HP all in one C7280 and no changes have been made recently to either. I looked for FF add- on to disable called ‘hp smart web printer’ that I read about in a closed FF support thread about this same problem but it is not on plug-in or add-on list. I also read in another closed thread on this issue to remove SWP using add/remove programs but its not listed. I believe this problem began when FF upgraded itself to 16.0.1 recently. The problem does not exist when I use I.E. or Chrome so logically it must be a FF issue. Its driving me crazy and I cannot find a solution that works anywhere. HELP please.

    Old Fox....thanks so much. I do not have the HP smart web printing in my add ons or plug ins. I used SWP in my problem posting and should have spelled out HP smart web printing..sorry.
    The NAME of the printer showed 'document converter'. WELL DUH! That was the problem all along. I have no idea how it got changed but I won't dwell on it. I have never had to look at those 'choices' because I don't need to change anything when I print but its never too late to learn.
    I am so happy and thanks again
    Terri

  • Can not print a web page from firefox site. What's wrong?

    When I try to print a page I get the follow screen after the print screen.
    Save file as : *xps, next line xps document (*xps). How do I print a web page.

    {Ctrl + P} or File > Print = is your printer selected in the Printer - Name box?

  • Create web pages from xml files using Servets or JSP

    I�m new in this tecnology and I have to create a web pages from information that I get from a XML files. I would like to know if there is a place where I can find examples of code or any book that could help me.

    Two places with loads of information on this:
    http://xml.apache.org
    Look at Xalan or Cocoon.
    Also, there was an article on http://www.javaworld.com on XML with JSP.

  • How to print a specific page from the internet

    I have tried to print a specific page, and get about seven pages that are linked to it, without
    seeing the specific page I wanted printed out. The page settings under printer only lists header and footer
    info, and no choices to print only this page or frame. There is no way to print  one specific page on this printer?
    I always was able to do this  with the Epson printer I just replaced, but unable to with this printer.
    Please help! There must be a way to do this when printing from the internet. Thanks for any help.

    deezire
    Welcome to the HP Community Forum.
    I don't have any idea what you are trying to print, nor do I wish to know.  Smiling.
    The key may be to control this in Print Preview like you would with most things when you are printing from a Browser.
    Manage Print Output with Print Preview
    ========================================================================
    Depending on which browser you are using, you might also be able to make use of Smart Print:
    Downloads and Information:
    HP Printing Software
    Scroll down > look on the right side of the page under Web Page Printing for the HP Smart Print download
    How-To:
    Smart Print Help and FAQ
    Includes: How to update your installed version of Smart Print:
    #6: How do I get the latest version of Smart Print?
    Smart Print updates automatically using the default settings. You can choice to update manually by selecting the "?" on the Smart Print Preview/Print bar located in the upper left corner of Smart Print. Select the Updates tab to get the latest version.
    Click the Kudos Thumbs-Up to say Thank You!
    And...Click Accept as Solution when my Answer provides a Fix or Workaround!
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • Opening a web page in a new tab appear web page from the history

    When I like to open a web page in a new tab, is opening a BLANK page and in the new tab's address bar appear a random web page address from history .

    Try performing a clean reinstall.
    Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thanks,
    cyborg4

Maybe you are looking for

  • Issue related to Total's

    HI Experts, Actually I am new to WebI.I have got an requirement to dispaly total number of employees in the report.Usually this report should show Department names and employees related to that departments and number of employees in particular depart

  • X-fi picks up all computer audio please h

    This is an issue regarding the X-fi extreme music. Before anybody states it, yes I have "what you hear" unticked, this is my 3rd motherboard with this card and have had the same problem with everyone of them. Also I have the most recent drivers. My p

  • GTS Stop delivery creation for blocked sales orders

    We implemented Note 579357 to stop the creation of deliveries when sales orders are blocked and everything works correctly except for rush orders (order type SO). After the note was applied, deliveries are not automatically created for rush orders ev

  • A problem about SLiM

    Today, I want to try SLiM to manage my login screen. I just followed the guideline in Wiki about "Display Manager" and "SLiM", and everything is fine  except that several scripts I dropped in "/etc/X11/xinit/xinitrc.d" do not run following the gnome

  • Axis QName prefix not working?

    I'm new to Axis nad I would like to change the default ns1 namespace prefix to something else when generating SOAP XML. I'm using version 1.4 and here is the code that I'm testing (just the Call section): Call call = (Call)service.createCall(); call.