aspose file tools*
The moose likes Servlets and the fly likes how to tomcat?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to tomcat??" Watch "how to tomcat??" New topic
Author

how to tomcat??

shitiz mathur
Greenhorn

Joined: Apr 03, 2001
Posts: 8
hi,
i am new to tomcat and downloaded the jakarta-tomcat-3.2.1.1.zip file only after hearing from this site's discussions.
i have windows NT 4.0 and wish to use above tomcat. could you kindly guide me please. i would be thankful if you give me the exact procedure.
sachin dabhade
Ranch Hand

Joined: Mar 10, 2001
Posts: 73
hi,
you first unzip the file and place in on say c:\
you have c:\tomcat
you have a bin directory in which you have to edit startup.bat
open it in notepad and write the following in it
SET JAVA_HOME="C:\JDK1.3"(I SUPPOSE YOU HAVE JDK1.3 OR ANY VERSION SAVED ON C DRIVE)
THATS ALL
you have to create a folder webapps/examples in tomcat directory
which is default place for your jsp/servlet examples
you can create the subdirectories in example directory
if you have to use your own directory,
you have to edit
server.xml in conf directory and add you directory path in the <context></context>

eg:add the following in servlet.xml
<Context path="/jsp"
docBase="c:/sachin_d/My Site"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
then you can place your jsp in mysite directory as mapped above

hope this help you and hope you
mail me if it really help you
sachin
sachin_dabhade@yahoo.com
Malu Sivasankar
Greenhorn

Joined: Aug 02, 2000
Posts: 14
Also try this...
How to make your first JSP page work on Tomcat?
shitiz mathur
Greenhorn

Joined: Apr 03, 2001
Posts: 8
thanks sachin dabhade and Malu Sivasankar for this. now that i have done what you have said, after entering startup.bat on the command prompt, along with a host of echos, at the end of them i am getting
Starting tomcat in new window
after this the new window opens and stays there for sometime and then vanishes! please guide me furthur as to what to do.
sachin dabhade
Ranch Hand

Joined: Mar 10, 2001
Posts: 73
uninstall all other servers from your machine.
it may help you.
it happened with me as well at start.i did so and got out of it.
try it out.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
shitiz:
before you uninstall other servers, could you pl. let us
know what output you get from tomcat?
any exceptions, messages etc any further clues?
regds.
- satya

ps:
Sachin: While something you did worked for you, I think its too
much to say "Uninstall everything else". Personally, I wouldn't
agree to this idea.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
shitiz mathur
Greenhorn

Joined: Apr 03, 2001
Posts: 8
hi,
many thanks for your advices friends because of which i have the cat running now. i have been able to see its face by typing in http://127.0.0.1:8080 and the 'default tomcat home page' has appeared. actually i had included " in my JAVA_HOME path in startup.bat.
anyway, now that it is running i compiled the Hello.java from among its examples and placed it in directory \webapps\examples\servlets\. but its not running!!! error is - "The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings."
Kindly guide me furthur.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
whats the URL you used?
- satya
shitiz mathur
Greenhorn

Joined: Apr 03, 2001
Posts: 8
hi,
i have shifted all my servlet .class files in the directory
webapps\examples\Myintra\respective_directories. also i have set a context in server.xml in the name "/myintra" and mapped it to the directory Myintra as shown below
<Context path="/myintra"
docBase="webapps/examples/Myintra"
crossContext="false"
debug="0"
reloadable="true"
defaultSessionTimeOut="30"
isWARExpanded="true"
isWARValidated="false"
isInvokerEnabled="true"
isWorkDirPersistent="false">
</Context>

this is necessary for my project tree structure. what do i do next to get my servlets running??? frankly speaking i do not know the meanings of the above variables also!! please help me out.
shitiz
Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Hi, can you help me to open up start.bat in notepad? I kept on getting a DOS window when I tried to open it.
shitiz mathur
Greenhorn

Joined: Apr 03, 2001
Posts: 8
hi cameron,
i think the file that you are wanting is startup.bat in the bin directory, instead of start.bat
in case i am correct, open notepad window and 'open' the file in it.
on DOS prompt .bat files are run and not opened for editing.

in case you get going try guiding me to starting my servlets on tomcat. my above problem still holds!
happy tomcatting
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to tomcat??