Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jsp - to set an initial environment

 
swati maken
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is that I have not able to set an initial environment required for jsp. As far as I have understood, pl. do correct me if I am wrong, we reqire to install Tomcat which act as jsp engine to communicate between client side and server side.
Now I will explain you step by step what I have done till now:
1)I downloaded tomcat from the net.
2)Unzipped the same in dir. where my jdk is installed (in my case it is d:\).
3)Then I set the path, classpath and Java_home and Tomcat_home also.
4)Now when i click on startup.bat in the bin dir. a window come on the screen but vanishes of in a second.
Now I am not able to figure out the problem and rectify the same.This I am talking about win NT platform .
Then I tried the same steps on win 98 there also I am finding the same problem,there I have increased my initial environment on dos window, but here the window does not vanishes but it displays 'Bad command or file name'.On both of these platform I have installed nothing else except Tomcat.
Please help me out, and do tell me if anything else is required to install or if we have to make any other changes in any of the files in tomcat directory.
Waiting for ur help.
Swati
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through this step-by-step work sheet will definitely help you to start
How to make your first JSP page work on Tomcat?
Thanks!
Roseanne
Join our SCJD Study Group when certified
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing to do is to run the startup batch file from a MS DOS command prompt window, NOT by clicking on it. Change directories so that the command prompt shows
C:\tomcat\bin>
and type Startup to run the batch file.
That way you can see the actual error messages.
Assuming you have a Java JDK installed, you should be able to run the Tomcat example servlets easily.
Bill

------------------
author of:
 
swati maken
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnaks for ur reply,
I have tried these steps but still I am getting the problem.
My classpath looks like :
----------
SET JAVA_HOME=d:\jdk;
SET TOMCAT_HOME=d:\tomcat\jakarta-tomcat;
SET PATH=%PATH%;d:\tomcat\jakarta-tomcat\bin;
SET CLASSPATH = %classpath%;d:\jdk\bin;
SET CLASSPATH=%CLASSPATH%;d:\jdk\lib\tools.jar;
SET CLASSPATH=%CLASSPATH%;d:\tomcat\jakarta-tomcat\lib\servlet.jar ;
--------------
Please help me out and tell me if I require any thing else to install tomcat.
Please can anybody tell me the alternative for tomcat and how to install it what changes r to be made at the initial stage.
Waiting for ur reply.
Swati.
 
shailesh sonavadekar
Ranch Hand
Posts: 1874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swati , what error actually you are getting ? Are you getting out of environment space error? Have you gone through the docs ?
Tell what the error you are getting ? Then only , actual answer can be given ?
Another alternative is to dowanload jswdk from Sun site & use it.
but , I feel you should use tomcat as the servlet - jsp engine.
Your Friendly Bartender
Shailesh
 
swati maken
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello shailesh, thanks for ur reply.
The exact error which I get is :
"the name specified is not recognised as an internal or external command, operable program or batch file"
please help me out in solving my problem.
waiting for ur reply.
Swati
 
Milan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Swati,
I feel that this is due to wrong PATH setting!
Please note you do not set path by writting SET PATH=....(As you have mentioned) but only path=%path%;....
Hence I feel that ypou better set the path as follows and then try:
PATH=%PATH%;d:\tomcat\jakarta-tomcat\jar files;
Hope it helps.Further if you are using NT Please change the Path by going in the Environment of system properties in MyComputer.
Regards,
Milan Doshi

[This message has been edited by Milan (edited March 06, 2001).]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Milan",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Posts which contravene the naming convention are not eligible to win books! Please choose a new name which meets the requirements.

Thanks.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is very important for all use of Java that you understand the difference between PATH and CLASSPATH. PATH is used to locate executable programs (the "java" interpreter, the "jar" tool, your favourite editor etc.) CLASSPATH is used by the Java interpreter to locate Java class files.
Directories with executable in them (such as d:\jdk\bin) should never appear in the CLASSPATH but only in the PATH.
Directories with Java classes in them should only appear in the CLASSPATH.
Jar files should either appear in the CLASSPATH or be placed in the lib/ext directory of your Java Runtime Environment, whch is equivalent to placing in the classpath.
 
swati maken
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur replies,
I have followed the steps which u have told me but even then also it is showing me the same error.
Please can anybody help me in finding the solution for tomcat.
I have tried this jsp in java web server but there also it is not working properly. I have written a very simple program for jsp, but the error is that it is not showing the output for the code which is written in "<% %>" tags. So please can anybody help me out in finding the solution for my problem.
waiting for ur replies.
Swati
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic