top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the logic behind a scriptlet in JSP?

0 votes
422 views
What is the logic behind a scriptlet in JSP?
posted Nov 7, 2017 by Frank Lee

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

A scriptlet holds the executable Java code which runs whenever the JSP gets loaded. The scriptlet passes its code to the service() method while the JSP is getting compiled to a servlet. So all the scriptlet variables and methods become local to the service() method. A scriptlet is coded between the <% and %> tags and the container call it while processing the request.

answer Nov 8, 2017 by Jon Deck
...