Vous êtes sur la page 1sur 5

Amity School of Engineering and Technology Amity University UP

Advance Java Programming Tutorial Sheets


Tutorial Sheet 2 1 2 3 4 5 6 7 8 9 10 What is Remote Method Invocation? What are the advantages and disadvantages of using RMI over socket Explain RMI Architecture in detail? How many types of protocol implementations does RMI have? Explain the steps to create RMI application? What is the role of Stub and Skelton in RMI? What is the difference between Marshaling and Unmarshalling? Explain RMI Registry?. What is the functionality of Remote Reference Layer? What is the purpose of the following methods provided by the RMI bind() lookup() list() rebind() unbind() programming?

Naming class?

Tutorial Sheet 3 1. What are the steps involved in establishing a JDBC connection? 2. What will Class.forName do while loading drivers? 3. How can you make the connection? 4. How can you create JDBC statements and what are they? 5. How can you retrieve data from the ResultSet? 6. What are the different types of Statements? 7. How can you use PreparedStatement? 8 What does setAutoCommit do? 9. How do you call a stored procedure from JDBC? 10 How can you move the cursor in scrollable result sets? How to Make Updates to updatable Result Sets? Tutorial Sheet 4 1. Explain the life cycle methods of a Servlet. 2. What if the static modifier is removed from the signature of the main method? 3. Explain the directory structure of a web application. 4. What are the common mechanisms used for session tracking? 5. Explain how the concept of Cookies is used in session management? 6. What is Session ID? 7. Explain ServletContext? 8. What is pre-initialization of a servlet? 9. What is the difference between Difference between doGet() and doPost()? 10. What is the difference between HttpServlet and GenericServlet? Tutorial Sheet 5 1. What is the difference between ServletContext and ServletConfig? 2. Write a servlet program using database connectivity.

3. What is a output comment and Hidden comment? 4. What is an Expression in JSP? 5. What is a Declaration in JSP? 6. What is a Scriptlet and How to use it? 7. What are implicit objects? List them? Explain each object with example? 8. Difference between forward() and sendRedirect() method? 9. What are the different scope values for the <jsp:useBean>? 10. Explain the life-cycle methods in JSP?

Tutorial Sheet 6 1. What's the difference between an import and include directive, and also the difference between include directive and include action? 2. How can i connect from jsp to servlet page? 3. What is the difference between JSP ans servlet life cycle? 4. Explain the useBean Tag with the help of an example? 5. How do I prevent the output of my JSP or Servlet pages from being cached by the browser? 6. How does JSP handle run-time exceptions occurred in the program? 7. How can I implement a thread-safe JSP page? What are the advantages and Disadvantages of using it? 8. How do I use a scriptlet to initialize a newly instantiated bean? 9. How can I prevent the word "null" from appearing in my HTML input text fields ? 10. When I populate them with a resultset that has null values?

Tutorial Sheet 7 1. What's a better approach for enabling thread-safe servlets and JSPs SingleThreadModel Interface or Synchronization? 2. How can I enable session tracking for JSP pages if the browser has disabled cookies? 3. What is jar file? How to create jar file in java? 4. What are JSP Actions? How do you pass data from JSP to servlet? 5. What is difference between Request scope and page scope? 6. Can JSP and Servlet share same Session and Beans? 7. What are the important steps in using JDBC in JSP? 8. How does variable scope work in JSP? 9. What do the differing levels of bean storage (page, session, app) mean? 10. How can we move from one JSP page to another JSP page?

Tutorial Sheet 8 1. What is the difference between getAttribute() anf getParameter() methods? 2. What is the difference application server and web server? 3. What do you mean by Enterprise Java Bean? 4. How EJB Invocation happens? 5. The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes? 6. What are the different kinds of enterprise beans?What is Session Bean? Explain the lifecycle of stateless and stateful session bean? 7. What is Entity Bean? Explain the lifecycle of Container-Managed Persistent (CMP) bean and Bean-Managed Persistent(BMP) 8. What are the methods of Entity Bean? 9. What is the difference between Container-Managed Persistent (CMP) bean and Bean-Managed Persistent(BMP) ? 10. What are the callback methods in Entity beans?

Tutorial Sheet 9 1. What is software architecture of EJB? 2. When should we use entity bean and session bean? 3. 4 5 6 7 8 What is the difference between ejb and servlet/jsp Can Entity Beans have noCreate() methods? Can the primary key in the entity bean be a Java primitive type such as int? Can you control when passivation occurs? What is EJB QL? Brief description about local interfaces? What is the difference between Message Driven Beans and Stateless Session beans?

9. How can I call one EJB from inside of another EJB? What is an EJB Context? 10. The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes? Tutorial Sheet 10 1. What is Struts? 2. What is Jakarta Struts Framework? 3. What is ActionServlet? 4. How you will make available any Message Resources Definitions file to the Struts Framework Environment? 5. What is Action Class? 6. What is ActionForm? 7. What is Struts Validator Framework? 8. Give the Details of XML files used in Validator Framework? 9. How you will display validation fail errors on jsp page? 10. How you will enable front-end validation based on the xml in validation.xml?