I am working on jsp - servlets project. I came across a very interesting problem.
The project is following MVC pattern.In my model classes I am returning a resultset object (which I shouldn't,but due to some reason I have to do this. ). So the problem is I am catching the returned ResultSet's object in JSP. In JSP NullPointerException is coming.
Have you read the concept of MVC first.
JSP are suppose to be view, a presentation layer.
Why are you using a resultset here.
And What does the Object User stands for ?
If its bean how could it use resultset ?
To me it seems,even for a beginner, your code is highly irrelevant.
here is a simple version how it should be done
part of action code;
jsp code (you are using scriptlets its ancient history. try to learn jstl and other tags too not that hard to learn them
this should give you a rough idea about MVC and how it works
NOTE this is just a rough code not a working one..