Exams Attended

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

JSP Interview Questions and Answers

  Difficulty Level: AllBeginnerIntermediateExperienced/Expert

Ques 1. What is a JSP and what is it used for?

Ques 2. What is difference between custom JSP tags and beans?

Ques 3. What are the two kinds of comments in JSP and what's the difference between them ?

Ques 4. What is JSP technology?

Ques 5. What is JSP page?

Ques 6. What are the implicit objects?

Ques 7. How many JSP scripting elements and what are they?

Ques 8. Why are JSP pages the preferred API for creating a web-based client program?

Ques 9. Can we use the constructor, instead of init(), to initialize servlet?

Ques 10. How can a servlet refresh automatically if some new data has entered the database?

Ques 11. Is JSP technology extensible?

Ques 12. What is the ResourceBundle class in JSP?

Ques 13. What is the difference between a Scrollbar and a ScrollPane in JSP?

Ques 14. What is a Java package and how is it used?

Ques 15. What are the Object and Class classes used for?

Ques 16. How can a servlet refresh automatically if some new data has entered the database?

Ques 17. The code in a finally clause will never fail to execute, right?

Ques 18. How many JSP scripting elements are there and what are they?

Ques 19. In the Servlet 2.4 specification SingleThreadModel has been deprecated, why?

Ques 20. How do I include static files within a JSP page?

Ques 21. Why does JComponent have add() and remove() methods but Component does not? because JComponent is a subclass of Container, and can contain other components and jcomponents. How can I implement a thread-safe JSP page?

Ques 22. How can I enable session tracking for JSP pages if the browser has disabled cookies?

Ques 23. How do I prevent the output of my JSP or Servlet pages from being cached by the browser?

Ques 24. How do you restrict page errors display in the JSP page?

Ques 25. What is the difference between JSP and Servlets?

Ques 26. Difference between GET and POST.

Ques 27. What is a output comment?

Ques 28. What is a Hidden Comment?

Ques 29. How do I include static files within a JSP page?

Ques 30. What are the two kinds of comments in JSP and what’s the difference between them.

Ques 31. What is a Expression?

Ques 32. What is a Declaration?

Ques 33. What is a Scriptlet?

Ques 34. Why are JSP pages the preferred API for creating a web-based client program?

Ques 35. Difference between forward and sendRedirect?

Ques 36. What are the different scope valiues for the <jsp:useBean>?

Ques 37. Explain the life-cycle mehtods in JSP?

Ques 38. How do I prevent the output of my JSP or Servlet pages from being cached by the browser?

Ques 39. What is the difference between variable declared inside a declaration part and variable declared in scriplet part?

Ques 40. Is there a way to execute a JSP from the comandline or from my own application?

Ques 41. How does JSP handle run-time exceptions?

Ques 42. How can I implement a thread-safe JSP page? What are the advantages and Disadvantages of using it?

Ques 43. How do I use a scriptlet to initialize a newly instantiated bean?

Ques 44. How can I prevent the word “null” from appearing in my HTML input text fields when I populate them with a resultset that has null values?

Ques 45. What's a better approach for enabling thread-safe servlets and JSPs? SingleThreadModel Interface or Synchronization?

Ques 46. What is the difference between variable declared inside a declaration and variable declared in scriplet?

Ques 47. How is scripting disabled?

Ques 48. What is the difference between ServletContext and PageContext?

Ques 49. What is JSP Compiler and where are compiled JSP Java files?

©2022 WithoutBook