I have a web application that runs perfectly on oc4j - all network/local printers are detected and I can submit jobs over there, but when I deployed the same WAR on Tomcat 7, the PrintServiceLookup.lookupPrintServices retrieves only the local printers. The application runs on Windows. I think there is a problem with the permissions/Tomcat settings. Any idea what should be fixed?
The printers are probably only available for your user account, not for the account that Tomcat runs as. Try changing the latter (from the Services screen) to see if that works. If so, you should create a separate user for Tomcat, log in as the user and install the printers, then let Tomcat run as that user.
Rob, thank you very much for your timely, informative response. I am trying to fix it now.
Joined: Sep 01, 2006
This Tomcat server is installed and running on my PC, Windows OS.
So as you recommended I choose the "This account" option on the Services screen, "Log On" tab and entered my Windows network account credentials and started the service. The result was the same - only local printers but no network printers are found.
About the other option that you mentioned above - "you should create a separate user for Tomcat, log in as the user and install the printers, then let Tomcat run as that user." - how to install these network based printers on my local Tomcat server ?