But when i enter the info and click submit in JSP a blank page is appearing with URL as http://localhost:8081/Test/master/register/JdbcServlet
public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
}
<form name="input" method="post" action="JdbcServlet">
So i gave the form action tag in JSP as follows <form name="input" method="post" action="JdbcServlet">
my worry is not about the wrong path the server is going to.
I have given the servlet path as "com.pg.sebastian.sebastian.servlet.JdbcServlet" in web.xml but the URL after submitting the JSP page is http://localhost:8081/Test/master/register/JdbcServlet.
Also its giving a 404 error at http://localhost:8081/Test/master/register/JdbcServlet.
Prasad Krishnegowda wrote:you have to change in both sides, change the action attribute in the jsp and servlet-mapping in web.xml to /com/pg/sebastian/sebastian/servlet/JdbcServlet
com/pg/sebastian/sebastian/servlet/JdbcServlet in action of form (note there is no leading /).
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |