Important Java J2ee Interview Questions asked by CGI

  1. How do you declare a page as Error Page. What tag you include in a JSP page so that it goes to specified error page in case of an exception ?
  2. Difference between Include Directive & Include Tag ?
  3. Servlet is a java class. So, can there be a constructor in Servlet class or not ? Why ?
  4. What’s the difference between forward & include tags? What URL (absolute or relative) is used in RequestDispatcher forward?
  5. How to configure Data Source in WebSphere server ?
  6. Oracle Thin Driver comes under which type of Driver ?
  7. Is it possible to write methods in JSP ? If so, how ?
  8. Difference between JSP & Servlets ?
  9. Which type of EJB can use bean pooling ?
  10. How can you call an EJB from a JSP/Servlet ?
  11. Difference between Hashtable & HashMap ?
  12. By default, Hashtable is unordered. Then, how can you retrieve Hashtable elements in the same order as they are put inside?
  13. Explain Servelet life cycle ?
  14. How JSP handle runtime Exceptions?
  15. Why hibernate?, Why not JDBC?
  16. What is the importance of SessionFactory in Hibernate?
  17. Difference between merge() and Update() methods?
  18. What is Secondary level cache in hibernate?
  19. How to get the session object in jsp ?
  20. How to get the sessionfactory obj in hibernate ?
  21. What is the difference between exception and error?
  22. How to handle the runtime exception in jsp?
  23. Difference between method overloading and overriding ?
  24. Difference between java.util.date and java.sql.date ?
  25. What is the Difference between get() and load() in hibernate ?
  26. Difference between page and pagecontext in jsp ?
  27. What is the difference between doPost and doGet methods?
  28. What is application in jsp ?
  29. I have 1 to 100 elements in array unordered,one element missed find that one?
  30. Difference between equals() and hashcode()?images
  31. What is comparator ?
  32. We have equals() to compare two methods then why comparator again ?
  33. What is autowiring in spring ?
  34. We can get the container obj through Beanfactory and Applicationcontext what is the difference in both ?
  35. Difference between sting and string buffer class ?


Search:

Recent Posts