I have a problem with my programm
my program is: <form action=TestUser3 METHOD="post">
<input type="radio" name="kaspomat" value="a1" >
radio button 1
<input type="radio" name="kaspomat" value="a10" >
radio button 2
and
servlet: */
public void doPost(HttpServletRequest request1, HttpServletResponse response1) throws ServletException, IOException {{
try {
super.doPost(request1, response1);
} catch (ServletException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
doPost1(request1, response1, null);
void doPost1 (HttpServletRequest request1, HttpServletResponse response1, Object object)throws ServletException,IOException {
try {
if(request1.getParameter("radios") != null) {
if(request1.getParameter("radios").equals("a1")) {
javax.servlet.RequestDispatcher rd = this.getServletContext().getRequestDispatcher("/indexa1.jsp");
rd.forward(request1, response1);
}
if(request1.getParameter("radios").equals("a10")) {
response1.sendRedirect("http://www.ynet.il");
}
when I run this programm I get: HTTP Status 405 - HTTP method POST is not supported by this URL
please someone can tell me why it happen? what the problem with my program?