Programming Tutorials

What is JSP Scriptlet?

By: Karthik in Interview Tutorials on 2012-06-16  

Answer: JSP Scriptlet is jsp tag which is used to enclose java code in the JSP pages. Scriptlets begins with <% tag and ends with %> tag. Java code written inside scriptlet executes every time the JSP is invoked.

Example:

        <% 
        //java codes 
         String userName=null; 
         userName=request.getParameter("userName"); 
         %>





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

Question: What is a Hidden Comment in JSP?

Interview Question: What is abstract schema?

What types of comments are available in the JSP?

Tell me something about J2EE component?

Interview Question: Do ActionForms have to be true JavaBeans?

The output of System.out.println(5<<2) in Java

What is the difference between Session Bean and Entity Bean?

Differentiate between .ear, .jar and .war files.

Interview Question: Who wrote Struts?

What is the difference between jsp:include page and @ include file?

What is the difference between JTS and JTA?

What is Collection API?

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

What is the difference between jsp:forward and response.sendRedirect(url)

Interview Question: How is the MVC design pattern used in Struts framework?

Latest Articles (in Interview)