How to use JNDI to lookup a network printer and print

Discussions

General J2EE: How to use JNDI to lookup a network printer and print

  1. I want to find a network printer on a windows network and print to it from a servlet/JSP page.

    I dont want to use the browser print.

    I dont want to write to a xls,rtf,pdf file and then open it and use the windows print .

    I want to directly locatea printer and print from my web application

    Any pointers....

    thanx
    BKK
  2. krish,

    lookin up for a printer and then using its services entirely depends on the underlying network operating system u r using.

    once u know the operating system and directory services thats comes with the OS u can pick the appropriate serviice provider for JNDI lookups.

    for a list of service proovider(analogous to JDBC driver) u can go to -

    http://java.sun.com/products/jndi/serviceproviders.html

    hope this helps