The course is part of this learning path
This course takes an in-depth look at Java API for RESTful Web Services, otherwise known as JAX-RS. We also run through some example exam questions that will be useful for anyone who wants to take Oracle's Java EE exam.
- Understand the fundamentals of JAX-RS
- Learn about the main concepts and components of JAX-RS
This course is intended for anyone who already has basic knowledge of Java and now wants to learn about Java EE 6.
Basic knowledge of Java programming.
Hi. Now we have finished Web Tier Technologies topic. Now, we will start to solve some questions about this topic to make more practice. Let's begin with the first question. One. Which of the options is true about the client tier?
Three. How can a session in the application be notified when an HttpSession object has been added or removed from the session. A, through the javax.servlet.http.HttpSessionActivationListener interface. B, through the javax.servlet.http.HttpSessionRemovalListener interface. C, through the javax.servlet.http.HttpSessionBindingListener interface. D, through the javax.servlet.http.HttpSessionAdditionalListener interface. Answer, C. Four. If the client turns off cookies and your application is using session objects at the same time, which of the following options should be used for session tracking to be performed correctly? A, calling the responses encodeURL(URL) method on all URLs returned by a servlet. B, including the session ID in the URL. C, invoking the isRequestedSessionFromCookie() method of HttpServletRequest. D, invoking the isRequestedCookieFromSession() method of HttpServletRequest. Answer A, B, C. Five. Which of the following options is a potential security risk of URL rewriting?
D, the appropriate scope persists in the value object returned from the delegated job. Answer A, C, D. 13. Which of the following options is among the duties of the Controller/ViewDispatcher? A, the view sender decides which view component to send to the end user based on the resulting condition of the user's request. B, accesses the value object as the appropriate scope and creates the final view for the user. C, sending views to the end user. D, the appropriate scope persists in the value object returned from the delegated job. Answer A, B, C. 14. Which of the following options are the benefits of the EJB container? A, it makes it easy to send views to the end user. B, because enterprise cores are loosely coupled and portable components, the application assembler can build new applications from existing cores.
C, the EJB container provides enterprise cores with non useful services such as transaction management. D, Because the beans rather than the clients contain the application's business logic, the client developer can focus on the presentation of the client. Answer, B, C, D. 15. In Java EE 6, EJBs can be called asynchronously. A, true. B, false. Answer, A. 16. How do you get a reference to a corporate bean reference? A, JDBC look up. B, JNDI look up. C, dependency injection. D, LDAP look up. Answer, B, C. 17. Which of the following features should a local customer have when accessing the enterprise bean? A, it should run in the same application as the enterprise bean is accessing. B, can be a web component or other enterprise bean. C, for the local client, the location of the corporate bean it is accessing is not transparent. D, it cannot be a web service. Answer A, B, C. 18. Which of the following features should the remote client have when accessing the enterprise bean?
A, it may run on a different machine and a different JBM than the enterprise bean it is accessing. B, the enterprise bean must implement a business interface, that is, remote clients may not access an enterprise bean through a no interface view. C, it can be a web component, an application client or some other enterprises bean. D, it cannot be a web component or any other enterprise bean. Answer, A, B, C. 19, which of the following options is correct when a web service client accesses a Java EE application? A, the enterprise bean must implement a business interface, that is, remote clients may not access an enterprise bean through a no-interface view. B, message beans are not accessible by web service clients. C, the client can access a web service created with JAXWS. D, a web service client can call the business methods of a stateless session bean.
Answer, A, C, D. 20, Regarding the Java EE session core, which of the following statements is true? A, for a stateless session bean (SLSB), the interaction is contained in a single method call, and the process does not maintain the client state. B, a singleton session bean is initialized once per application and exists for the lifetime of the application. C, message session beans are not accessible by web service clients. D, for a stateful session bean (SFSB), the interaction may invoke many methods and processes can span multiple method requests, thus necessitating the maintaining of a client state. Answer, A, B, D. 21, regarding Java EE single session cores, which of the following options can considered correct? A, a single session is initiated only once per application. B, a singleton session bean exists for the life cycle of the application. C, a singleton session bean must be initialized on application startup. D, a singleton session bean exists in a pool of beans? Answer A, B, D. 22, regarding Java EE stateful session cores, which of the following options is considered true? A, stateful session beans are appropriate if a bean represents state.
B, stateful session kernels are available for the lifetime of the application. C, stateful session beans manage the workflow of the various enterprise beans for the customer. D, stateful session beans improve performance. Answer, A, C. 23, regarding message oriented kernels MDBs, which of the following options is correct? A, MDBs are stateless EJBs that asynchronously consume JMS messages. B, MDBs asynchronously consume JMS messages. C, MDBs are invoked directly by the client. D, MDBs exist for the lifetime of the application. Answer, A, B. 24, which of the following options is correct regarding server sending and client pulling? A, in client pull, an HTTP connection is kept open.
B, with server push, the browser displays the data and leaves the connection open. C, message session beans are not accessible by web service clients. D, in a client pull the mechanism may include a command that can set a timer during which time it will execute a call to the server for new data. Answer, B, D. 25, regarding browser access to server based asynchronous processes, which statements are true? A, with the idea of server push, the browser displays the data and leaves the connection open. B, with the idea of server push, the server sends new data synchronously. C, the way browsers present asynchronous programming to application logic is by events or callbacks. D, browsers provide a number of asynchronous APIs, such as the commonly used XHR (XMLHttpRequests or "Ajax") APIs, as well as IndexedDb,SQLite and HTML5, to name a few. Answer, A, C, D.
OAK Academy is made up of tech experts who have been in the sector for years and years and are deeply rooted in the tech world. They specialize in critical areas like cybersecurity, coding, IT, game development, app monetization, and mobile development.