madhurikg
asked on
How to find the available printers using java when the program is running in weblogic??
Hi,
I need to find all available network lan printers which support given document flavor using java API.
When i run the following code standalone, i am able to find the printers.
PrintService[] mPrintServices = PrintServiceLookup.lookupP rintServic es(aDocFla vor, aPrintRequestAttributeSet) ;
But the same code when it is getting executed in weblogic environment by a message driven been it is not able to find all network lan printers except local printer.
It is on the same windows machine.
Do i need to configure anything in weblogic to make the printers visible to weblogic or should i have to disable any ports?
***This is urgent looking for suggestions***
Thanks
I need to find all available network lan printers which support given document flavor using java API.
When i run the following code standalone, i am able to find the printers.
PrintService[] mPrintServices = PrintServiceLookup.lookupP
But the same code when it is getting executed in weblogic environment by a message driven been it is not able to find all network lan printers except local printer.
It is on the same windows machine.
Do i need to configure anything in weblogic to make the printers visible to weblogic or should i have to disable any ports?
***This is urgent looking for suggestions***
Thanks
ASKER
I run the code by stand alone java application. I do not get any pop up windows. I just print all available printservices.
The following is the code.
PrintService[] mPrintServices = PrintServiceLookup.lookupP rintServic es(aDocFla vor, aPrintRequestAttributeSet) ;
for (int i = 0; i < oPrintServices.length; i++) {
lw.log("printservicename:: :"+oPrintS ervices[i] .getName() );
}
If the same code is executed by the Message driven Bean(EJB) in weblogic it is not finding any lan printers
**looking for suggestions
The following is the code.
PrintService[] mPrintServices = PrintServiceLookup.lookupP
for (int i = 0; i < oPrintServices.length; i++) {
lw.log("printservicename::
}
If the same code is executed by the Message driven Bean(EJB) in weblogic it is not finding any lan printers
**looking for suggestions
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How do you run the code in first place? Is it via a stand alone java application? Do you get a popup with the available printers? Bare in mind that EJBs are executred on the server and not on the client and therefore you might be getting all printers but you are not able to see them.
Cheers