Per your previous post (regarding sendRedirect) seems your using sendRedirect here.
Anyways to make this happen what method of the HTTPServlet did you override??
Seems you have overridden the doPost() method.
Is that right???
Try puting the Buisines logic in a new method and call this new method from both doGet() and doPost().
First of all create a new method with request and response as the parameters and call that method from both doGet and doPost, this will avoid the error
HTTP Status 405 - HTTP method GET is not supported by this URL
Next step is, try to use HttpSession, so if the session is null, you can redirect to the login page, else if you want to retain your existing logic check that username from the request is null or not, if null then redirect it to login page.
Thanking the green horns sincerely,
I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database