INTRODUCTION TO JSP SCRIPTLETS
Syntax of JSP Scriptles are:
JSP Scriptlets begins with <% and
ends %> .We can embed any amount of java
code in the JSP Scriptlets. JSP Engine places these code in the _jspService()
method. Variables available to the JSP Scriptlets are:
Other variable available to the scriptlets are pageContext,
application,config and exception.
request represents the clients request and is a subclass of HttpServletRequest.
Use this variable to retrieve the data submitted along the
response is subclass of HttpServletResponse.
session represents the HTTP session object associated with the
out is an object of output stream and is used to send any output to
TO JSP EXPRESSIONS
Syntax of JSP Expressions are:
JSP Expressions start with
Syntax of JSP Scriptles are with <%= and
ends with %>. Between these this
you can put anything and that will converted to the String and that will
<%="Hello World!" %>
Above code will display 'Hello World!'.