import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ForwardServlet extends HttpServlet
{
public void doPost (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
getServletContext().getRequestDispatcher("login.html").forward(req, res);
}
}
The html file which call's this
servlet <html>
<body bgcolor="#ccccff">
<form action="http://localhost:8080/servlet/ForwardServlet" method="post"/>
<input type="submit" value="OK"/>
</body>
</html>
The init method is called,but an error page is displayed.I'm using jsdk2.0 to test.Plz help
I also tried
http://localhost:8080/servlet/ForwardServlet,but error page with init being called.