IntelliJ Java IDE
The moose likes Servlets and the fly likes Jsp - to set an initial environment Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Jsp - to set an initial environment" Watch "Jsp - to set an initial environment" New topic
Author

Jsp - to set an initial environment

swati maken
Greenhorn

Joined: Jan 12, 2001
Posts: 14
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

Joined: Nov 14, 2000
Posts: 1952
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

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


Java Resources at www.wbrogden.com
swati maken
Greenhorn

Joined: Jan 12, 2001
Posts: 14
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

Joined: Oct 12, 2000
Posts: 1874
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

Joined: Jan 12, 2001
Posts: 14
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

Joined: Mar 05, 2001
Posts: 5
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).]


Milan Doshi
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
"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.

A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
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

Joined: Jan 12, 2001
Posts: 14
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
 
 
subject: Jsp - to set an initial environment
 
Threads others viewed
tomcat error, HttpConnectionHandler class not found
unable to open service Tomcat5
Tomcat startup
how to deploy servlet and jsp
Trying to execute a JSP on windows. How do I set up for it?

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture