What is Jsp Technology?
● Enables separation of business logic from presentation
– Presentation is in the form of HTML or XML/XSLT
– Business logic is implemented as Java Beans or custom tags
– Better maintainability, reusability
● Extensible via custom tags
● Builds on Servlet technology
What is Jsp Page?
● A text-based document capable of returning dynamic content to a client browser
● Contains both static and dynamic content
– Static content: HTML, XML
– Dynamic content: programming code, and JavaBeans, custom tags
Should I Use Servlet or JSP?
● In practice, servlet and JSP are used together
– via MVC (Model, View, Controller) architecture
– Servlet handles Controller
– JSP handles View
What does Servlet Do?
● Receives client request (mostly in the form of HTTP request)
● Extract some information from the request
● Do content generation or business logic process (possibly by accessing database, invoking EJBs,etc)
● Create and send response to client (mostly in the form of HTTP response) or forward the request to
another servlet or JSP page
● Enables separation of business logic from presentation
– Presentation is in the form of HTML or XML/XSLT
– Business logic is implemented as Java Beans or custom tags
– Better maintainability, reusability
● Extensible via custom tags
● Builds on Servlet technology
What is Jsp Page?
● A text-based document capable of returning dynamic content to a client browser
● Contains both static and dynamic content
– Static content: HTML, XML
– Dynamic content: programming code, and JavaBeans, custom tags
Should I Use Servlet or JSP?
● In practice, servlet and JSP are used together
– via MVC (Model, View, Controller) architecture
– Servlet handles Controller
– JSP handles View
What does Servlet Do?
● Receives client request (mostly in the form of HTTP request)
● Extract some information from the request
● Do content generation or business logic process (possibly by accessing database, invoking EJBs,etc)
● Create and send response to client (mostly in the form of HTTP response) or forward the request to
another servlet or JSP page