Hi guys,
I was reading several forums about this error, but still dont get it and i still cant fix the issue.
This is my web.xml
So when i access for the first time, a login page will be open.. I log in properly,
This is my url when I run my project:
http://localhost:8080/Company/
When i log in properly my url change to: localhost:8080/Company/DBservlet <-- this is my welcome.jsp
But if someone copy this url(localhost:8080/Company/DBservlet) recieve the following:
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for
servlet [DBservlet] in context with path [/Company] threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
If they put this url localhost:8080/Company/DBservlet need to redirect to login.jsp or this url
http://localhost:8080/Company/, so they can log in properly.
This is my servlet code:
Any opinion is welcome.
Thanks & Regards,
-M