Hi,iam new to servlets.Iam practicing servlets in websphere.To run the following program, iam using url = http://localhost:8080/servlet/hello to run the program. While running this program through url, iam getting a dialogbox "connect to localhost" which has username and password. I didn't understand. Iam not getting output of the program. How i get the output. program: import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Hello extends HttpServlet { public void doget(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { PrintWriter out=null; res.setContentType("text/html"); out=res.getWriter(); out.println("<html>"); out.println("<head><title>Sample</title></head>"); out.println("<body>"); out.println("<BIG>Hello World</BIG>"); out.println("</body>"); out.println("</html>"); } }
"Lakshmi"- Welcome to the JavaRanch! Please adjust your displayed name to meet the JavaRanch Naming Policy. You can change it here. Thanks! and welcome to the JavaRanch! Mark