Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 11th, 2009, 05:56 PM
Registered User
Join Date: Feb 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with Tomcat as service on Windows Server 2003

Hi all,

I made a small Java web-application which prints pdf-files - on-demand - on the server.

Everything went well on my dev environment, but not when I deployed the application on the Tomcat server in production.

The Tomcat server is started as a service on a Windows 2003 Server. I was unable to print on the server. The application starts an external program that prints towards network printers. The strange thing is that the process of the external program is started (I can see the process in the Windows process manager) but nothing happens further more. I've searched on the net and found a whole lot of issues on this, which all referenced to the user used to start the Tomcat service. So I changed the user the services uses to a local admin, a domain admin, a user, .... Nothing seems to help.

Today I tried it with a batch-file from which I start the external program, instead of putting the path to the program into the Runtime.getRuntime.exec-command in Java. Doesn't work either. So instead of printing I tried to start IE, Windows explorer, calculator, ... from the batch. Each time the process of the program is started but nothing happens.

When I start the server with the startup.bat, I have no problem at all. But unfortunately, that's no option.

I've been trying, experimenting, searching, banging my head, ... for 2 days now. Can someone on this forum help me?
Old February 12th, 2009, 03:35 PM
Authorized User
Join Date: Dec 2008
Posts: 50
Thanks: 1
Thanked 5 Times in 5 Posts

Originally Posted by monesseldeur View Post
Hi all,

When I start the server with the startup.bat, I have no problem at all. But unfortunately, that's no option.
have you tried the startup.bat on server as well?

I am not sure but we had a similar issue where we were starting MS WORD but it was prompting(needed to click ok button) and used to halt the server.

also check for domain policy if there is one for services. i.e. services on server cann't start other executables also windows Server series and normal series have different security settings.

Old February 12th, 2009, 04:59 PM
Registered User
Join Date: Feb 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Running the server from the bat would solve the problem, but isn't an option, as the server always needs to be online, even when the user is logged off.

After a lot of trying and a bit of help I found out the reason the external programs can't be run: there isn't any interaction with the desktop. When you run the process using the LocalSystem user you can check the option 'Allow process to interact with desktop'. With this option it is possible to start applications with a GUI, but not possible to print, because this user hasn't access to printers. Unfortunately it is impossible to use this option with another account.

So I need to find an application to print pdf without a GUI or a way to allow the user to interact with the desktop.

Any suggestions would be extremely appreciated.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat Fails to start in Windows server LiquidLen Apache Tomcat 1 January 18th, 2009 02:10 PM
Windows Server 2003 neil.abachi07 Windows Server 1 September 13th, 2007 02:11 PM
Problems in Windows Service alokanat .NET Framework 1.x 2 September 11th, 2006 01:54 PM
Windows 2003 Server R2 srutter BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 4 February 25th, 2006 06:52 PM
ASP and Windows 2003 Server gerhard@krenn.net Classic ASP Professional 9 March 23rd, 2004 06:04 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.