This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package not found error on running servlet !

 
Ghazala Islam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I compile the following servlet in jdk1.3/bin directory
its giving error 'Package javax.servelet does not exist'
and same error for all three import commands.Where is the problem?
The servelet is:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld2 extends HttpServlet {
/* public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<head>");
out.println("<title>Hello World!</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Hello World!</h1>");
out.println("</body>");
out.println("</html>");
}*/
}
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to download the servlet packages from sun's website.
Bosun
 
Sagar Surana
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

u have to set the classpath in ur autoexec.bat
set classpath=x:\<server_root>\lib\servlet.jar
if ur using java web server
where x = drive in which u have installed java web server
<server_root> = directory in which web server is installed

------------------
Sagar Surana
( +ve attitude)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic