Sie sind auf Seite 1von 4

www.atoztarget.com http://www.atoztarget.com/2014/01/jsp-interviewquestions-and-answers-pdf.

html
JSP Interview Questions and Answers pdf free download
The Below JAVA JSP Interview Questions and Answers for freshers, Experienced candidates for interview Preparation 1. What is a JSP and what is it used for? 2. What is difference between custom JSP tags and beans? 3. What are the two kinds of comments in JSP and what's the difference between them ? 4. What is JSP technology? 5. What is JSP page? 6. What are the implicit objects? 7. How many JSP scripting elements and what are they? 8. Why are JSP pages the preferred API for creating a web-based client program? 9. Is JSP technology extensible? 10. Can we use the constructor, instead of init(), to initialize servlet? 11. How can a servlet refresh automatically if some new data has entered the database? 12. The code in a finally clause will never fail to execute, right? 13. How many messaging models do JMS provide for and what are they? 14. What information is needed to create a TCP Socket? 15. What Class.forName will do while loading drivers? 16. How to Retrieve Warnings? 17. How many JSP scripting elements are there and what are they? 18. In the Servlet 2.4 specification SingleThreadModel has been deprecated, why? 19. What are stored procedures? How is it useful? 20. How do I include static files within a JSP page? 21. Why does JComponent have add() and remove() methods but Component does

not? 22. How do I prevent the output of my JSP or Servlet pages from being cached by the browser? 23. How do you restrict page errors display in the JSP page? 24. How can I enable session tracking for JSP pages if the browser has disabled cookies? 25. What JSP lifecycle methods can I override? 26. How do I perform browser redirection from a JSP page? 27. How does JSP handle run-time exceptions? 28. How do I use comments within a JSP page? 29. Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB? 30. How can I implement a thread-safe JSP page? 31. How can I declare methods within my JSP page? 32. Can I stop JSP execution while in the midst of processing a request? 33. Can a JSP page process HTML FORM data? 34. Is there a way to reference the "this" variable within a JSP page? 35. How do you pass control from one JSP page to another? 36. Is there a way I can set the inactivity lease period on a per-session basis? 37. How does a servlet communicate with a JSP page? 38. Can you make use of a ServletOutputStream object from within a JSP page? 39. How do I include static files within a JSP page? 40. Can a JSP page instantiate a serialized bean? 41. What is JSP? 42. How many messaging models do JMS provide for and what are they? 43. How do I mix JSP and SSI #include? 44. How do I mix JSP and SSI #include? What is the difference between include directive & jsp:include action? 45. How do you prevent the Creation of a Session in a JSP Page and why? What is the difference between include directive & jsp:include action? 46. How do I use a scriptlet to initialize a newly instantiated bean?

47. How can I set a cookie and delete a cookie from within a JSP page? 48. How do you connect to the database from JSP? 49. What is the page directive is used to prevent a JSP page from automatically creating a session? 50. How do you delete a Cookie within a JSP? 51. Can we implement an interface in a JSP? 52. What is the difference between ServletContext and PageContext? 53. What is the difference in using request.getRequestDispatcher() and context.getRequestDispatcher()? 54. How to pass information from JSP to included JSP? 55. How is JSP include directive different from JSP include action. ? 56. Can we override the jspInit(), _jspService() and jspDestroy() methods? 57. Why is _jspService() method starting with an '_' while other life cycle methods do not? 58. What happens when a page is statically included in another JSP page? 59. A JSP page, include.jsp, has a instance variable "int a", now this page is statically included in another JSP page, index.jsp, which has a instance variable "int a" declared. What happens when the index.jsp page is requested by the client? 60. Can you override jspInit() method? If yes, In which cases? 61. What is the difference between directive include and jsp include? 62. What is the difference between RequestDispatcher and sendRedirect? 63. How does JSP handle runtime exceptions? 64. How can my application get to know when a HttpSession is removed? 65. What Class.forName will do while loading drivers? 66. How to Retrieve Warnings? 67. How many JSP scripting elements are there and what are they? 68. In the Servlet 2.4 specification SingleThreadModel has been deprecated, why? 69. Is JSP technology extensible? 70. Can we use the constructor, instead of init(), to initialize servlet? 71. How can a servlet refresh automatically if some new data has entered the

database? 72. The code in a finally clause will never fail to execute, right?

Das könnte Ihnen auch gefallen