This week's giveaways are in the MongoDB and Jobs Discussion forums. We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line! See this thread and this one for details.
I am using JSDK2.1. What classpath shall I set to compile my servlet programs. Please help me in this regard. ------------------ Susa
sai
Greenhorn
Joined: Mar 01, 2000
Posts: 23
posted
0
Originally posted by Soudarsanan: [B]I am using JSDK2.1. What classpath shall I set to compile my servlet programs. i hope that u hava path for jdk1.2.2 set path = %path%;c:\jsdk2.1\src; set classpath = %classpath%;c:\jsdk2.1\src;c:\javawebserver2.0\lib;
sai
Greenhorn
Joined: Mar 01, 2000
Posts: 23
posted
0
Originally posted by Soudarsanan: [B]I am using JSDK2.1. What classpath shall I set to compile my servlet programs. i hope that u hava path for jdk1.2.2 set path = %path%;c:\jsdk2.1\src; set classpath = %classpath%;c:\jsdk2.1\src;c:\javawebserver2.0\lib; if any problem mail me gksai10@yahoo.com
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
I am unable to compile my program even after adding those classpaths. The following is the code import java.io.*; import javax.servlet.*; public class FirstSer extends GenericServlet{ public void init(javax.servlet.ServletConfig sc) throws ServletException{ super.init(sc); } public void service(ServletRequest req, ServletResponse res){ try { PrintWriter pw = res.getWriter(); res.setContentType("text/HTML"); pw.println("hello this is my first servlet ..."); pw.flush(); } catch(Exception e){ } } public void destroy(){ super.destroy(); } } i get the following error when i compile FirstSer.java:2: Package javax.servlet not found in import. import javax.servlet.*; ^ FirstSer.java:4: Superclass GenericServlet of class FirstSer not found. public class FirstSer extends GenericServlet{ ^ 2 errors Please help me