This can be stored in a file helloworld1.jsp. Actually, JSP's are compiled in to servlets that implement the functionality described above. A Basic Premise Use JSP's for presentation . Keep all the business logic in the business objects.
Components is a stand-along object representing a collection of properties and behaviors.
For JSP's, components written as Java Beans are accessed via HTML-like tags. Scripting Elements Declarations Variables and methods defined in declarations become fields and methods of the servlet class into which the JSP is translated.