• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Start Tomcat from user

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone!
I have one problem!
I need to start web-application in Tomcat from 'user' but Tomcat start from command line (not start as service).
I have catalina.bat file for command line:



Question: How I can start Tomcat from 'user' via command line with catalina.bat ??
P.S. I have a Windows Server
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

What does "start Tomcat from 'user' " mean? What should that do that running startup.bat (you should not run catalina.bat directly) doesn't accomplish?

Also, you should indicate how the catalina.bat you posted is different from the standard one, so that people know what to look for.
 
sergey yurchenko
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

What does "start Tomcat from 'user' " mean?


I mean that specific 'user' must launch my app.

What should that do that running startup.bat (you should not run catalina.bat directly) doesn't accomplish?

Also, you should indicate how the catalina.bat you posted is different from the standard one, so that people know what to look for.



I'm sorry. I am not specialist in tomcat and I got already tomсat with the launch from the command line...
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I mean that specific 'user' must launch my app.



Is this "user" a client running a browser on the Internet or a person sitting at the keyboard that controls the server?

IF - Tomcat is running
-AND- your web app is correctly described to Tomcat
-THEN - Tomcat will automatically start your web app if it is not already running and a correctly addressed request comes in.

Bil
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I start Tomcat from a user account all the time. The user's ID is "tomcat".

There are only 2 things to allow for when opening up a command shell, setting the JAVA_HOME environment variable and launching CATALINA.BAT (or STARTUP.BAT).

1. If you have reconfigured Tomcat to use any ports lower than 4096, the OS will not allow non-privileged users to use them.

2. If you ever ran this copy of Tomcat as a privileged user, it may have created files which the non-privileged user cannot update or replace. Clean out TOMCAT_HOME's work, temp, and log directories, and check the access rights on the files in the webapps directory.
 
reply
    Bookmark Topic Watch Topic
  • New Topic