Originally posted by Lala Asif Allana:
...
i m writing like this <form action="/loginservlet" method=POST>
Asif.
First, as Bear has asked, show us what you're using for a mapping in your deployment descriptor.
One you have a mapping that you know works (
test by typing the URL into your browser's address window) then test your form action attribute.
I can say that building a relative link the way that you did is almost always wrong for a
Java Web App. Your link will only work if your app is the default or root app in your container. Either make your link completely relative by removing the preceding slash (also not the best way) or, read the context path from the request object to build your link so that it is relative to the root of your web application.
Example:
Or if you're not using a
JSP 2.0 compliant container: