One more sir, is JSP similar to HTML but it is run under JVM?
No, JSP
produces HTML. To understand what JSP is, please read
this article.
chure abcede wrote:Now im confused again, so what should I code in JSP?
Nothing. Putting Java code into a JSP has been obsolete for 12 years. Please see
this JspFaq entry.
and where should my code like db connection and methods be placed ?
In the model classes. Please see
this article for information on properly structuring web applications.
I sounds as if you need to read some books or tutorials to understand the basics of programming web applications. Be sure that the JSP resource focuses on JSTL and EL, and not on obsolete Java scriptlets.