<html> <body> <% out.println(<style="color: #ff0000;">10<style="color: #000000;">10); %> </body> </html>All the generated Servlets implement JSP page interface.Servlet interface a JspPage interface ( jspInit() & jspDestroy() ) a HttpJspPage interface ( _jspService() ) In JSP,
HTML | JSP |
---|---|
HTML is use to develope static pages | JSP is a technology to develop web applications. |
HTML needs html interpreter for execution | JSP needs JSP page compiler and JSP container for execution |
HTML program generates static pages. | Exception thrown by typeid function. |
bad_function_call | JSP program can generate both static and dynamic pages. |
HTML is used for both java and non-java web applications. | JSP is used only for java web applications |