Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Basic Question on JSP, servlets

 
Divya Rajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I was trying for the past few days to start learning JSP and servlets. But i am not successful. I don't know exactly the sequence of steps to be followed in installing the servers required and the ClassPaths to be set. The books i have do not explain it properly. Can anyone please help me by explaining me how to get started?
thank you very much
Divya

------------------
 
Manjunath Subramanian
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello Divya,
I suggest you start with
1)The book "Professional JSP" from wrox and
2)JavaWebServer 2.0 as your webserver.
TO START THE WEBSERVER :
Get into the bin directory under JavaWebserver2.0 and type the
command "httpd" like this..
c:\JavaWebserver2.0\bin>httpd
This should start the webserver where the webservices listen at
port 8080 and the administration at port 9090.
To work on servlets and jsp's place these files in either
JavaWebserver2.0/public_html folder (or) in
JavaWebserver2.0/examples/jsp(or)servlet folder.
If you are putting your files in the public_html directory
then to execute it, type the following URL in the address bar
of IE/NETSCAPE.. http://localhost:8080/servlet/MyServlet (or)
if it is a JSP.. http://localhost:8080/MyJSP
If you are putting your files in the examples/servlets (or) jsp directory
then to execute it, type the following URL in the address bar
of IE/NETSCAPE.. http://localhost:8080/examples/servlets/MyServlet (or)
if it is a JSP.. http://localhost:8080/examples/jsp/MyJSP.
To compile servlet java files set your classpath to
c:\javawebserver2.0\lib\servlet.jar.You will find other jars
also conventionally placed under the lib directory.
Hope this helps,
Manjunath
 
Paramagurusamy Balasubramanian
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

Manjunath's suggestion is very good.
Also you can follow the book "Java Servlets" by James Goodwill to start with servlets.It is good for beginners.It explains about webservers especially Java Web Server(JWS).Also It gives step by step procedure of JWS including configuration.
Hope this book will help you to know about servlets..
Best Regards,
Paramaguru
 
Divya Rajan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks manjunath and parama guru.
Can you please suggest me where i can download the Java web server. Sun web site does not have it.

thanks,
Divya
 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi divya,
well its better to start with tomcat , rather than JWS.
well tomcat is as easy as working with jws!!! u will find tomcat at www.apache.org
 
kkchandu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Divya,
I suggest u to go for tomcat,rather than JWS.
U can download tomcat at
http://java.sun.com/products/jsp/download.html
Best Regards,
Chandu

------------------
Chandu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic