Print version for JSP pages

Hi,
I have the following requirement. I have a site consisting of JSP pages. I need to provide a print version for every page.
The problem is, while printing, if a webpage spans for multiple printing pages, I need to put a footer on each of these pages. But, this footer must appear only once (at the bottom of the page).
How do I achieve this? any help will be greatly appreciated.

there is one work around for doing this... in order to print the header and footer...generate a dummy page with the exact format...
Header
20-25 Lines Text
Footer
Header
20-25 Lines Text
Footer
and so on...
so when this is flushed to the printer....u would get every page formatted with Header and Footer as this is going to happen in the background...there willl be no pblm to users...
hope this helps u...

Similar Messages

  • How do i fix my printer when it won't show the print preview for web pages? it worked and now not.

    how do i fix my printer when it won't show the print preview for web pages?  it worked for a while and now it doesn't.  printer is an hp officejet 7310 all-in-one.

    I would suspect this is a hardware issue.  The rollers are probably having issues picking up the relatively smooth thick media.  You might have better results be cleaning the paper pickup rollers with a damp paper towel.  Also make sure the paper is snugly loaded and the paper guides have been correctly positioned.
    Regards,
    Bob Headrick, MS MVP Printing/Imaging
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • SAPscript print program for multiple pages

    Hello friends,
    How to write SAPscript print program for multiple pages? please help me.
    Thanks and regards,
    Shivanand.

    I believe you have posted this question in the wrong forum.  There is an ABAP Forms Printing Forum.

  • Documentation for JSP pages

    hi,
    i am trying to do documetation for jsp pages, but i not successed.
    can someone clear this up for me? thanks!

    Try the Java developer section of the forums. You're not too likely to get an appropriate response in the SRSS area :-)

  • Is it possible to specify print settings for web pages?

    Is it possible to specify print settings for web pages designed in Muse? For example, can you exclude background images from printing?

    Hello,
    You can define Print Setting to page By Defining CSS Style in page Header by typing Style tag.
    you can go to Page > Page Properties > Metadata  > HTML for <Head>.
    you can refer to the link below for more details about Print properties in CSS.
    http://www.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/
    Regards
    Vivek

  • Save option for jsp page

    hi all,
    In my project am including a html page in jsp.Now i want to save the html page only.Please any body help me to how to give save option for jsp page.
    Thanks in advance.
    mohan :)

    you can save it in with browser "save as"

  • How to print report from JSP Page

    Hi Everybody,
    I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
    1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
    2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
    Could anyone help me to solve this problem.

    Hi Everybody,
    I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
    1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
    2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
    Could anyone help me to solve this problem.

  • How to print report in jsp page?

    excuse me,i am new to jsp
    may i know how to pritn report in jsp page or html?
    tq

    here is a hacked up example.. i ripped out a lot, so it may not compile, but you get the idea... the full version is really long and not much new info.. just all awt/display stuff...
    package rowe;
    import javax.swing.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.sql.*;
    import utility.*;
    import java.awt.print.*;
    public class rowePrint extends JFrame implements ActionListener, Printable{
         String printType = "";
         static JButton j = new JButton("Print");
         FontMetrics fm;
         String jID, promotion, product, jComments;
         public void getInfo(int jid) {
              ResultSet rs;
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection("jdbc:odbc:rowe");
                   Statement stmt = conn.createStatement();
                   rs = stmt.executeQuery("select j.id as jID, j.comments, p.title as pTitle, p.product, p.packagingCartonCost, p.foldingQuarterCostPerM, p.foldingQuarterCostPerM, j.customizationOption as setupFee, p.perMcost, p.qtyCarton, d.name as dName, d.contact as dContact, d.email as dEmail, d.address as dAddress, d.city as dCity, d.state as dState, d.zip as dZip, d.phone as dPhone, d.fax as dFax, r.name as rName, j.totalQty, j.orderIn, j.estFreight, j.miscCost, j.coverSelection, j.imprintSelection from jobs j, promotions p, dealers d, reps r where j.promotion = p.id and j.dealer = d.id and j.rep = r.id and j.id = " + jid);
                   rs.next();
                   jID = rs.getString("jID");
                   jComments = rs.getString("comments");
                   promotion = rs.getString("pTitle");
                   product = rs.getString("product");
              } catch (Exception e) {
                   System.out.println("getinfo: " + e);
       public void actionPerformed(ActionEvent e) {
            if (e.getSource() instanceof JButton) {  
                   wookie();
         public void wookie() {
              PrinterJob printJob = PrinterJob.getPrinterJob();
              Paper paper = new Paper();
              PageFormat page = new PageFormat();
              paper.setImageableArea(0, 0, 600, 780);            
              page.setPaper(paper);
              printJob.setPrintable(this, page);
              try{
                   //printJob.pageDialog(page);
              //     if (printJob.printDialog()) {
                        printJob.print();
              } catch (Exception e) {
                   System.out.println("wookie1" + e);
         public static void main(String[] args) {
              rowePrint at = new rowePrint("Invoice");
              at.getInfo((new Integer(args[0])).intValue());
              at.drawShapes();
         //     at.wookie();
         public void drawShapes() {
              setBounds(0, 0, 670, 550);
              addWindowListener(new WindowAdapter() {public void windowClosing(WindowEvent e) {System.exit(0);}});
              j.setBounds(10, 10, 10, 10);
              j.addActionListener(this);
              getContentPane().setLayout(null);
              getContentPane().add(l);
              getContentPane().add(j);
              show();
         public rowePrint(String s){
              printType = s;
         public void paint(Graphics g) {
              g.setFont(new Font("Serif", Font.BOLD, 18));
              g.drawString(promotion, 20, 30);
              g.setFont(new Font("SansSerif", Font.PLAIN, 4));
              g.drawString("" + new java.util.Date(), 20, 37);
              g.setFont(new Font("Serif", Font.BOLD, 21));
              g.drawString("Rowe Furniture", 440, 35);
              g.fillRect(440, 40, 145, 25);
              g.setColor(Color.white);
              fm = g.getFontMetrics(new Font("Serif", Font.BOLD, 21));
              g.drawString(printType, 512 - (fm.stringWidth(printType) / 2), 60);
        public int print(Graphics g, PageFormat pf, int pi) throws PrinterException {
            if (pi >= 1) {
                return Printable.NO_SUCH_PAGE;
              paint(g);
            return Printable.PAGE_EXISTS;
    }

  • Printing the populated JSP page

    I'm generating the student reports of all the students in a class. I've the data in form of beans in my servlet. i can forward to a JSP and display the reports of the students one by one. as soon as the report is generated, i want the JSP page to be printed. what java api can i use for it? or any other alternative for this?

    JavaScript has a way of printing the page. But that would be certainly on the client side and the client machine needs to have a printer. :P
    Sample:
    <input type="button" value="Print This Page" onClick="window.print()">

  • Printing a wide jsp page

    Hi Friends,
    I have a jsp page displaying some information.It is wide and I have to scroll side ways to see the complete page.Its 2 to 3 times the actual width of the screen.But when I take a print out only the part which is visible is printed and the remaining part which is to the side is truncated.Is there a way so that I can take a print out of the entire width of the page.
    Thanks in Advance for your help.
    (Anthony)

    Hi,
    Thanks for your time.
    I am using tables but the no. of columns in the table are more and it grows dynamically thus becoming a wide report.My requirement is to print the complete report however wide it is.
    please let me know if you have a solution
    thanks,
    Anthony

  • Print Button on JSP page prints title,time etc

    Hi I have aprint Button on my jsp page which prints whatever I want selectively using the <style tags>
    <style type="text/css" media=print>
    .noprint { display: none}
    .noscreen { color: black }
    </style>
    <style type="text/css" media=screen>
    .noscreen { display: none}
    .noprint { color: blue }
    </style>
    <SCRIPT Language="Javascript">
    function printit(){
    window.print();
    </SCRIPT>
    My print Button calls the JavaScript and prints everything that does not have a class=noprint in it... When I print however it also prints on the page
    -The Title on the Left Top corner
    - Page 1 of 1 on RIGHT TOP
    - 2/13/03 on Left bottom
    - 4:06 thats the time on the RIGHT BOTTOM
    Is there anyway I can prevent it from printing this?

    These probably come from the browser. Check if your browser is configured to print these on every page that is printed. If so, you can turn these of from the browser's Page Setup dialog.

  • Print statement in JSP page after redirection

    Hi,
    I have written a JSP page and in that i am redirecting it to another page. Now after redirection i am printing a statement on the console. It is getting printed whereas when i am printing the same on the browser i am not able to print that. Please can any one tell me the difference between printing the same on the console and browser.
    My first JSP page(one.jsp)
    <%
         response.sendRedirect("two.jsp");
         out.println("After redirect");
         System.out.println("After out");
    %>
    My second JSP(two.jsp)
    <%
         out.println("In two.jsp");
    %>
    Thanks in advance
    regards
    Prashanth

    The sendRedirect sets a code in the HTTP response being sent to the client (I believe it is a 302 code but I am not sure off hand) and then proceeds to process the rest of the JSP on the server which is why the print statement shows up in the console.
    The out.println writes to the HTTP response output stream. The client gets the response and sees the HTTP Header code telling it to make a new request so it stops processing the response message and sends a new request message which is why the out.println message is not seen in the browser.

  • SAP HR-- In form 16 , i am not able take print out for all pages..

    Hi,
           In SAP HR module , i have totally 5 pages, i need to take the printout for all pages.. but i am getting only 1 pages.pls could u solve this problem
    Regards
    senthil

    There is no relation with module to printer settings
    check the printer settings for declared printer in output devices
    otherwise contract basis guy
    regards
    sateesh

  • How to implement content caching for jsp page ?

    Hello everyone,
    I am reading an article <Servlets and Jsp Best Practice>,at
    http://developer.java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/#author, on one section it is saying :
    "Cache content: You should never dynamically regenerate content that doesn't
    change between requests. You can cache content on the client-side, proxy-
    side,or server-side. "
    Now I am working on a project. For every user, some of the content servlet generated will be the same for at least a week . I am thinking if I implement caching for these jsp pages, that would increase performace a lot.
    But I have no idea how to implement it either client-side or server-side, can someone give me a hint ?
    Thanks,
    Rachel

    You mean actually you are caching the response stream
    and the key to distinguish between different response
    streams are made of user's different request
    parameters. And the filter's function is to intercept
    the request to see if this request parameter's
    combination already exists in the Hashmap,then either
    use the cached response or forward to
    servlet.....really interesting...Do I get it right ?Yes that's it in a nutshell.
    >
    Then how do you build those response streams in
    advance ? You did it manually or have some mechanism
    to build it automatically ?
    The data gets cached the first time somebody visits the page.
    Find some examples on Filters, and take a look at the HttpServletResponseWrapper class. You need to cache response headers as well as the body. Another pitfall that you might run into is handling an If-modified-since header on the request. Don't cache the results of those requests.
    -Jonathan
    >
    Thanks again !
    Rachel

  • Slow response time for JSP pages under iAS 6.0 SP4

    Hi,
    I got an application deployed on iplanet app server 6.0 SP4 on solaris
    2.8. Using a single kjs engine and lite sessions. kjs memory size is
    min 256 and max 256 megs. but verbose:gc shows memory is 98% free.
    when i restart the app server, all JSP pages are really rendered fast.
    After a while (1 or 2 days), the time to service the same request to
    JSP pages is getting much longer (even with JSP pages having only
    static content in them). CPU is idle ... It just takes time. KXS log
    shows requet is taking like 2-4 seconds instead of about 150 milli
    secs when the engine is just restarted.
    Now if i call a servlet (which do not dispath to a JSP), the response
    time is ok! Memory is ok. It looks like its related to JSP pages
    only.
    Anyone having an idea what the problem could be? One conig param is
    the JSP page cache in iASAT. Default value is 10. What is a correct
    setting for production? I have 4 different web app deployed in the
    same server instance.
    Tanks a lot for your input
    Andre Paradis

    Andre,
    I have found the answer to my problem and perhaps yours. It seems that I18N (internationalization) in SP4 may have a performance bug in it.
    My soak tests show that with i18N checked in the iAS Admin Tool, testing the fortune cookie sample application with light load (1 request / sec) resulted in a kxs response time initially of 15ms, however this response time increased by roughly 1% per request (i.e after 100 requests the response time had more than doubled).
    Switching I18N off yielded a steady 7ms kxs response time from the fortune cookie application.
    I would add that I turned I18N on AFTER the installation procedure.
    Is this a known issue in SP4? Is there a patch?
    regards,
    Owen

Maybe you are looking for

  • Can't seem to get this computer to work with 3D

    I just got this qosmio f755-3d350 today. I've spent a half day trying to get it working, and I'm starting to get frusterated with it. and the level of support. Comon Toshiba, you know better then releasing a product that doesn't work. and little supp

  • DVI to VGA screen goes black

    I have a G5 and wish to mirror a TV screen to the existing monitor.  I have bought a DVI splitter to DVI and VGA.  One screen goes black ( the Mac Screen ) as the Mac thinks there is only one monitor connected. How do i tell the Mac to have a mirror

  • IPad 3 - Wifi + 4G GPS not working

    Folks, I got a the new iPad with 4G, however no SIM is inserted.  The issue I have is that the GPS is not working.  My current location comes up as Taiwan on google maps.  I tried a few of the free gps apps and they do return the right lat/long.  Is

  • LC other than national currency

    Hi All, I have a customer who's national currency is SGD,but the according to the IRAS(Inland revenue authority of singaopre), if 60% of the customer's transactions are other than the local currency(national currency) then the Local currency should b

  • I need a better Calendar App!

    Hello  I'm a long time BB user - now with the Q10.  I find the built-in Calendar app fiddley & less than terrific.  Can someone recommend a Calendar app that I could download, even if not free, that is a better business application than the built-in