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?

What do you understand by a container in J2EE?

What types of comments are available in the JSP?

What are the services provided by a J2EE container?

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

Interview Question: What is Deployment descriptor?

Interview Question: Why does EJB needs two interfaces(Home and Remote Interface)?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

Tell me something about J2EE component?

What do you understand by a J2EE module?

Question: How would you go about analyzing performance of an application?

Question: Difference between forward and sendRedirect in JSP?

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

Interview Question: What is abstract schema?

Interview Question: What is Message Driven Bean?

Latest Articles (in Interview)