Hi,
I need some help with running
servlets on my system.
Currently i have java1.2.1 running on my system.I also have jsdk2.0 installed.I dont have any problem with running the servletrunner from C:\jsdk2.0\bin.
My problem is i have a correct code in my examples class.
The error it is giving is that
Package javax.servlet not found in import.
Package javax.servlet.http not found in import.
Superclass HttpServlet of class MyServlet2 is not found.
i have the javax,servlet,http folders(one within another respectively) in a folder called src in jsdk2.0
Even adding C:\jsdk2.0\src to my path in autoexec.bat file is not helping.
What shd i do.
In case if there is any error in my code,please check it.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class MyServlet2 extends HttpServlet
{
PrintWriter out;
public void service(HttpServletRequest req,HttpServletResponse res) throws IOException,ServletException
{
res.setContentType("text/html");
out=res.getWriter();
out.println("<html><body bgcolor=\"#ffffcc\" text=\"#660066\" background=\"c:/pictures/csoup.gif\">");
out.println("<h1>Angels are in Heaven but their errands are around us</h1>");
out.println("<img src=\"c:/pictures/Firework.jpg\" align=right></img>");
}
}
Thanks a lot.
Aparanji.