This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I wrote this html file <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Login</title> </head>
<body> <h1>Login</h1>
Please enter your username and password <form action="/Ch05/Login" method="POST"> <p><input type="text" name="username" length="40"> <p><input type="password" name="password" length="40"> <p><input type="submit" value="Submit" > </form> </body> </html>
and the java class which it calls is package web; import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
public class Login extends HttpServlet { public void dopost(HttpServletRequest request, HttpServletResponse response) { String username = request.getParameter("username"); try { response.setContentType("text/html"); PrintWriter writer = response.getWriter(); writer.println("<html><body>"); writer.println("Thank You, "+ username + ". You are now logged into the system."); writer.println("</body></html>"); writer.close(); }catch (Exception e) { e.printStackTrace(); } } } but when I am deploying it it giving the error as
"HTTP method POST is not supported by this URL" can somebody explain this?
Ok...So do i need to redeploy after changing that/
Abhijeet Thacker
Greenhorn
Joined: Jan 15, 2005
Posts: 16
posted
0
I hope that you have already got the answer of your last question. Just to clarify u need to redeploy your application if you make ANY change in ur classes. This is not the case with jsp files or html files.
hth
Always code as if person who is going to maintain your code is a maniac serial killer and knows where you live