How to use the printing in jsp

Discussion in 'Java' started by steve, Apr 13, 2004.

  1. steve

    steve Guest

    I am doing a final year project. It is using the JSP, but i don't know
    how to use the printing with it.
     
    steve, Apr 13, 2004
    #1
    1. Advertising

  2. steve

    Tony Morris Guest

    "steve" <> wrote in message
    news:...
    > I am doing a final year project. It is using the JSP, but i don't know
    > how to use the printing with it.


    LOL!!!

    --
    Tony Morris
    (BInfTech, Cert 3 I.T.)
    Software Engineer
    (2003 VTR1000F)
    Sun Certified Programmer for the Java 2 Platform (1.4)
    Sun Certified Developer for the Java 2 Platform
     
    Tony Morris, Apr 13, 2004
    #2
    1. Advertising

  3. steve

    Chris Smith Guest

    steve wrote:
    > I am doing a final year project. It is using the JSP, but i don't know
    > how to use the printing with it.


    JSP is a technology for generating web pages. It's not connected to
    printing in any way.

    You *could* print from Java code in a JSP scriptlet, but remember that
    this code runs on the web server, not on the client, so this would only
    work if *you* want a printed record of what the web server is doing. It
    would not print anything your users could get to. This printing would
    be done the same way you'd printing from Java outside of a JSP; probably
    using the JPS API from 1.4.

    You probably could also have the JSP generate JavaScript code that
    prints the page. I don't know much about this, but JSP is merely
    incidental here and not connected to the result; you could ask for
    information on printing from JavaScript in an appropriate newsgroup for
    that language (such as comp.lang.javascript).

    The normal way to go about this, though, is to just generate the
    resulting data in a simple HTML format so that it can be easily printed
    by the user (simple because popular browsers tend to suck at fitting
    nested tables to match the width of a sheet of paper). You'd then rely
    on the user to print that page if they want to do so.

    --
    www.designacourse.com
    The Easiest Way to Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Apr 13, 2004
    #3
  4. Tony Morris wrote:

    >
    > "steve" <> wrote in message
    > news:...
    >> I am doing a final year project. It is using the JSP, but i don't know
    >> how to use the printing with it.

    >
    > LOL!!!
    >


    Maybe he's creating a website that will print the page the users requested
    and snail-mail it to them :)

    --
    Kind regards,
    Christophe Vanfleteren
     
    Christophe Vanfleteren, Apr 13, 2004
    #4
  5. steve

    steve Guest

    On Tue, 13 Apr 2004 10:16:04 +0800, steve wrote
    (in article <>):

    > I am doing a final year project. It is using the JSP, but i don't know
    > how to use the printing with it.


    well then do a search on the internet for "java printing jsp"

    but if it is your final year , perhaps you don't have want is needed to
    become a programmer.
     
    steve, Apr 14, 2004
    #5
  6. steve

    Guest

    steve wrote:
    > I am doing a final year project. It is using the JSP, but i don't know
    > how to use the printing with it.


    Peace.

    <html>
    <body>
    Tested in Internet Explorer and Firefox
    <input value="Print Preview" type="button" onClick="window.print();" />
    </body>
    </html>

    Good Bye.
     
    , Jun 9, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon B
    Replies:
    7
    Views:
    7,586
    =?Utf-8?B?SmFzb25DaG9p?=
    Jan 30, 2006
  2. DigitalUncle
    Replies:
    0
    Views:
    959
    DigitalUncle
    Nov 2, 2004
  3. JustSomeGuy
    Replies:
    13
    Views:
    522
    msalters
    Dec 9, 2004
  4. Replies:
    0
    Views:
    4,470
  5. Replies:
    2
    Views:
    531
Loading...

Share This Page