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

How to work with JSDK.....

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone help me to work with JSDK 2.1
My question is after compiling the class how do i run the program? In the DOS prompt, i start the server, after that what should i do to run the file?
Another question is where can i find the Servlet API to download?
Thanks,
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have only a few days experience with Servlets, so that should put me at the intermediate level... Ha ha!
But with HTTP servlets, you need to create an HTML file that will invoke the servlet. IMHO, the most representative HTML would be a FORM with INPUT TYPE=TEXT... type of structure:
<FORM ACTION="/servlet/HiYou" METHOD="post">
<INPUT TYPE="text" NAME="name" SIZE="20">
<INPUT TYPE="submit" VALUE="Submit">
</FORM>
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tony for the info. I will try.
I don't understand how to set the classpath for JSDK 2.1, whenever i compile i get error messages saying HttpServlet, servlet.. not found. Please let me know how to set the classpath.
So after i compile should i create an html file and open that html file in the browser?
please correct me.
Thanks,
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
servlet.jar hast to be in the CLASSPATH.
In WinDoze, it's
c:\jsdk2.1\servlet.jar
(if C is your drive) that has to be added to the CLASSPATH.
[This message has been edited by Tony Alicea (edited March 16, 2000).]
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HTML pages have to be in
c:\jsdk2.1\webpages
and the servlets have to be in
c:\jsdk2.1\webpages\WEB-INF\servlets\
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic