Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuring Tomcat at DOS command Line

 
James Chegwidden
Author
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking at installing Tomcat for our students here at the Community College to teach JSP and Servlets.
I have run into the problem of configuring Tomcat on our Win 2000/XP machines. Due to security, students cannot change any of the enviroment variables or autoexec.bat files directly.
We use Java 1.4.2 and have tomcat 5.0.19 installed hard drive.
Some Questions:
1. First how can we let the students use tomcat and configuring tomcat usin the DOS command line? (I.E what commands to use, to set Java Home, changing port number, etc.)

2. Were are good tutorials on setting Tomcat via command line as a standalone machine? I have done seaches on this most books/website but can only find a few real good simple tutorials on this.
3. Finally and good recommendations on Tomcat Reference books.
Thanks
JC
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat is not really designed to be configured from the command line - there are just too many parameters. See server.xml for example.
You can set Environment variables that just apply to one Command Prompt window - they don't have to be global. You can see this being done in the startup.bat and catalina.bat files.
Is the goal to have one running Tomcat instance per student, or would one "web application" per student be enough?
Bill
 
James Chegwidden
Author
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe one the second option would suffice.
Here is something I found that I tried to get to work:
set JAVA HOME=c:\j2sdk1.4.0_02
C:\jakarta-tomcat-5.0.19\bin>startup
Change port number:
C:\jakarta-tomcat-5.0.19\conf\server.xml
Does this look right?
 
Brahim Bakayoko
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by James Chegwidden:
I have run into the problem of configuring Tomcat on our Win 2000/XP machines. Due to security, students cannot change any of the enviroment variables or autoexec.bat files directly.
JC

I would suspect that your students would run into the same type of security issues even if editing the files from the command line, else you have to question the security mesures.
Anyway, you can use the DOS edit program (c:> edit) to edit the text files.
The program has a very nice and easy DOS menu interface.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A google search for "teaching servlets with tomcat" turned up lots of possibly useful references.
 
James Chegwidden
Author
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all of your help. I figured it out and works just fine. I did this weeks ago but forgot to tell all of you.

I now have created a step by step handout for my students to use.

JC.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic