aspose file tools*
The moose likes Tomcat and the fly likes Configuring Tomcat at DOS command Line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuring Tomcat at DOS command Line" Watch "Configuring Tomcat at DOS command Line" New topic
Author

Configuring Tomcat at DOS command Line

James Chegwidden
Author
Ranch Hand

Joined: Oct 06, 2002
Posts: 201
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


Author and Instructor, my book
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12785
    
    5
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

Joined: Oct 06, 2002
Posts: 201
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

Joined: Aug 29, 2003
Posts: 155
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.


SCJP, SCWCD, SCBCD, IBM CSD WebSphere v5, <br />A+, MCP 2000 and 2000 server, CST, and few incompleted certification tracks.<br /> <br />Ivory Coast<br /> <br />Analyze your web Request/Response @ <a href="http://webtools.servehttp.com" target="_blank" rel="nofollow">http://webtools.servehttp.com</a> down for a while...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12785
    
    5
A google search for "teaching servlets with tomcat" turned up lots of possibly useful references.
James Chegwidden
Author
Ranch Hand

Joined: Oct 06, 2002
Posts: 201
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Configuring Tomcat at DOS command Line