• Post Reply Bookmark Topic Watch Topic
  • New Topic

Get the list of printers configured on the Server machine via a JSP page  RSS feed

 
Nagesh Vu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Following is the scenario:
User wants to access the list of printers configured on the servers and fire an output.

Following is our piece of code:


We do not get any output. We believe that the servlet gets 'SYSTEM' as an user login ID and trying to fetch the printer list for this user ID 'SYSTEM'. Such a login does not exist on the Server and hence the printer list is empty (Is this assumption correct? Who is this user SYSTEM?). Is there a better solution or approach?

Regards,
Nagesh
 
Devaka Cooray
Marshal
Posts: 5325
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nagesh Vu wrote:Is there a better solution or approach?

The best practice is you should move your java code into a separate java class and avoid using any java code in your JSPs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!