I m just practicing and came across this about jsp:forward. I wrote few beans (employee.java, person.java)...Those are fine.
In Index file (index.jsp) , request.getParameter("empID") is null here as I hoped it would be.
After clicking submit button, it goes to chosing.jsp.
In index.jsp, if I do not enter any data in the forms, then I hoped that I will get null for empID. However I do not.
I even tried using different empID values such as 111 and checked empID. But it is not working.
In short, it is not forwarding as I hoped it would.
ok here welcome.jsp
Why does it not come here when I do not put any inputs or use 111 for empID? Another.jsp
I assumed that I would get null string. The assumption was wrong
I always forget about it too.
Secondly, I forgot about == and .equals
You'll never forget it again now
Thanks. But how do I check to make sure that the user has atleast inputed a value ? The value can be anything other than whitespace. How Do I do this?
request.getParameter("empID").equals (" ") only checks for one whitespace. I want to make sure that doesnt matter how many whitespaces the user puts, I still check to make sure there is something else other than whitespace?