A
ajay.partoti
I am using: j2sdk1.4.1
with j2sdkee1.4(with application server)
The program code is:
html file code:
<html>
<body>
<form method="post"
action="http://localhost:8080/check/servlet/GetServlet">
<input type="text" name="ajay">
<input type="submit" name="submit">
</form>
</body>
</html>
Servlet code:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class GetServlet extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{
String s = req.getParameter("ajay");
PrintWriter out = res.getWriter();
res.setContentType("text/html");
out.println("<html><body>" + "HI" + s + "</body></html>");
out.close();
}
}
But the above code is not working after proper deployment
It gives servlet path error.
that the resource GetServlet is not found under /check/GetServlet.
I don't know what the problem is?
Please help!
with j2sdkee1.4(with application server)
The program code is:
html file code:
<html>
<body>
<form method="post"
action="http://localhost:8080/check/servlet/GetServlet">
<input type="text" name="ajay">
<input type="submit" name="submit">
</form>
</body>
</html>
Servlet code:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class GetServlet extends HttpServlet
{
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{
String s = req.getParameter("ajay");
PrintWriter out = res.getWriter();
res.setContentType("text/html");
out.println("<html><body>" + "HI" + s + "</body></html>");
out.close();
}
}
But the above code is not working after proper deployment
It gives servlet path error.
that the resource GetServlet is not found under /check/GetServlet.
I don't know what the problem is?
Please help!