• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LookupPrintServices does not return network printers only local

 
Michael Sideln
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thank you in advance
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Michael Sideln
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob, thank you very much for your timely, informative response. I am trying to fix it now.
 
Michael Sideln
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob,
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 ?
Thank you,

Michael
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, since the network printers don't work under your account, I doubt they would work under a separate account.
 
Michael Sideln
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob,
But why this WAR works/recognize network printers when deployed on oc4j ?
Thank you,
Michael
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be honest, I have no idea...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic