Hi All,
I have downloaded the j2eesdk-1_4-dr-windows-eval.exe software.
Then I have written the following Servlet as my first servlet ever:
--------------------------------------------------------------------------
package hall;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("Hello World"
}
}
-----------------------------------------------------
I have compiled the above code and made HelloWorld.class in the directory D:<mydir>/hall/HelloWorld.class.
Then I packaged the class using deploytool (which came with the downloaded software) as web component. In doing so i specified the context root as /hall.
Now if I want to view the servlet using ' in IE it is giving the error
'HTTP Status 404-/hall.HelloWorld/'
'Requested resource( /hall.HelloWorld/)not available.'
But all the applications(e.g. hello) that are explained in the documentation of the software are visible from the browser following the instructions given in the documentation.
I am pretty new to Web technology.
Please help me! Where I am doing wrong.
Thanks a lot for your help
I have downloaded the j2eesdk-1_4-dr-windows-eval.exe software.
Then I have written the following Servlet as my first servlet ever:
--------------------------------------------------------------------------
package hall;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("Hello World"
}
}
-----------------------------------------------------
I have compiled the above code and made HelloWorld.class in the directory D:<mydir>/hall/HelloWorld.class.
Then I packaged the class using deploytool (which came with the downloaded software) as web component. In doing so i specified the context root as /hall.
Now if I want to view the servlet using ' in IE it is giving the error
'HTTP Status 404-/hall.HelloWorld/'
'Requested resource( /hall.HelloWorld/)not available.'
But all the applications(e.g. hello) that are explained in the documentation of the software are visible from the browser following the instructions given in the documentation.
I am pretty new to Web technology.
Please help me! Where I am doing wrong.
Thanks a lot for your help