Topic: Failing to print from Tomcat

Using Apache Tomcat 6 on Windows Server 2003, Rail 2.3.9.

I am trying to deploy an application in which records can be printed to a label printer. To print, Rails creates a new file, which is then copied to lpt4: (which is actually a USB port on a networked computer, via "net use") with a system command:
"copy #{Rails.root}/print.txt lpt4"

This works fine in development (Webrick), but I have just discovered it does not work when I try to deploy to production (Tomcat on the same physical machine). I have flash set to give the error message and command used, the error message is "0 files copied", nothing more helpful than that. The command looks fine, and indeed, I can copy the command and paste it into the command prompt, and the label is spat out. Clearly the file is saved properly, and perfectly fine for the printer to understand.

My first guess was a permissions issue, so I had Tomcat using the admin account, but still nothing.

Anyone any suggestions for what the problem might be? At this stage, I am not even sure where to look.

Last edited by F2Andy (2010-10-11 11:31:55)