Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes How to work with JSDK..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to work with JSDK....." Watch "How to work with JSDK....." New topic
Author

How to work with JSDK.....

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Jan 30, 2000
Posts: 3222
    
    5
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>

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Jan 30, 2000
Posts: 3222
    
    5
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

Joined: Jan 30, 2000
Posts: 3222
    
    5
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\
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to work with JSDK.....
 
Similar Threads
Default Java Packages
servlets side include
Error: Package javax.servlet not found
JSDK...
Running servlets