E.g. assume this model:
Customer (customerId, name, age, ...)
Address (customerId, type, street, city, ...)
PaymentOption (customerId, cardnumber, cardtype, ...)
Jayesh A Lalwani wrote:You have not initialized the circle member inside your shape. So, shape.getCircle returns null. When you try to call getName on shape.getCircle, you get a NPE.
You should inject the circle into the shape.
For starters, you should never handle a login via GET - it transfers parameters in the URL, and thus makes the password visible in all kinds of places where it should not be visible. Very bad.
Yeah. equals method is right. But, != comparison also wrong?Never compare strings using "==" or "!=", use the "equals" method instead
Now I want to store those username and age(in .html) somewhere and I want those information in welcome.jsp. Now, I'm storing all those in session itself(In doGet method(servlet)). I think, there may be still better and good way to store. Please can anyone suggest me, with proper explanation.
. I'm expecting that session is to be empty. Because, I dint store anything until that line. Please explain me this too.org.apache.catalina.session.StandardSessionFacade@69a8bf4f