Results 1 to 4 of 4
  1. #1
    jmvenkat is offline Member
    Join Date
    Sep 2009
    Posts
    2
    Rep Power
    0

    Default printer get printed in the server in stead of client

    I am using jBoss server .
    when we are giving print from the client it does not print in client but its get print in the server.. i don't know how to redirect it...so help me...

    this is the piece of code::

    PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
    printRequestAttributeSet.add(OrientationRequested. PORTRAIT);
    printRequestAttributeSet.add(MediaSizeName.ISO_A4) ;
    PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();
    printServiceAttributeSet.add(new PrinterName("HP LJ P3005", null));
    exporter = new JRPrintServiceExporter();
    exporter.setParameter(JRPrintServiceExporterParame ter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet);
    exporter.setParameter(JRPrintServiceExporterParame ter.PRINT_SERVICE_ATTRIBUTE_SET, printServiceAttributeSet);
    exporter.setParameter(JRPrintServiceExporterParame ter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
    exporter.setParameter(JRPrintServiceExporterParame ter.DISPLAY_PRINT_DIALOG, Boolean.FALSE);

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    We don't know whether you are serving your application using webstart or maybe it's just a web application. Basically if you want that code to do the printing then it has to be running on the computer where you want the printing to happen from.

  3. #3
    jmvenkat is offline Member
    Join Date
    Sep 2009
    Posts
    2
    Rep Power
    0

    Default

    it's just a web application. if we give the print in the client system the printer has to be activated in the client machine, but here it is going to the server and started printing from the server...
    weather we can redirect the client to print through the browser...

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Your java code is running on the server machine not on the client. The client is just receiving some HTML pages that they are viewing on their browser. You probably need to read up on web applications to understand how they work.

Similar Threads

  1. Verify if a file as been, for sure, printed
    By pjmorce in forum Advanced Java
    Replies: 0
    Last Post: 11-20-2008, 11:45 AM
  2. Replies: 1
    Last Post: 10-05-2008, 04:12 PM
  3. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 10:18 AM
  4. jsp program for client side printer to print these 2 strings on 3/3
    By for453 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-07-2007, 05:42 PM
  5. Replies: 0
    Last Post: 08-06-2007, 07:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •