i have few doubt regarding sendRedirect(String location) in httpresponse.
1)can the location value be an url mapping i.e, like response.sendRedirect("/addAmount") else should it be only sendRedirect("loginhome.html") or sendRedirect("loginhome.jsp")
2)What is meant by relative path ("/") what happens if i dont give relative path ?
please explain me clearly since i am new to servlets technology.
The confusion can be cut by just following the best practice of using server-relative URLs (those that start with the context path) for redirects to resources within the same web app. For external resources, use the full absolute URL. Easy.