Top 150+ Solved Enterprise Computing With JAVA MCQ Questions Answer
Q. The method forward (request,response) will
a. return back to the same method from where the forward was invoked
b. not return back to the same method from where the forward was invoked and the web pages navigation continues
c. Both A and B are correct
d. None of the above
Q. What's the difference between servlets and applets? 1. Servlets executes on Servers, where as Applets executes on Browser 2. Servlets have no GUI, where as an Applet has GUI 3. Servlets creates static web pages, where as Applets creates dynamic web pages 4. Servlets can handle only a single request, where as Applet can handle multiple requests
a. 1,2,3 are correct
b. 1,2 are correct
c. 1,3 are correct
d. 1,2,3,4 are correct
Q. Which of the following are the session tracking techniques?
a. URL rewriting, using session object, using response object, using hidden fields
b. URL rewriting, using session object, using cookies, using hidden fields
c. URL rewriting, using servlet object, using response object, using cookies
d. URL rewriting, using request object, using response object, using session object
Q. The getSession() method with ‘true’ as its parameter [ getSession(true) ] it will return the appropriate session object when
a. the session is completed
b. the session object is passed to another method
c. the session does not exists
d. the session is existing
Q. RequestDispatcher object is used
a. to include other resources
b. to include an image
c. to include xml object
d. to include e-mailing response
Q. The include() method of RequestDispatcher
a. sends a request to another resource like servlet, jsp or html
b. includes resource of file like servlet, jsp or html
c. appends the request and response objects to the current servlet
d. None of the above
Q. To get the servlet environment information
a. ServletConfig object is used
b. ServletException object is used
c. ServletContext object is used
d. ServletContainer object is used
Q. The values of <servlet-name> and <servlet-class> in web.xml file
a. must be same
b. must not be same
c. may be same
d. None of the above
Q. What is the limit of data to be passed from HTML when doGet() method is used?
a. 4K
b. 8K
c. 2K
d. 1K
Q. In which advantage of servlet, Servlets are managed by JVM so no need to worry about memory leak, garbage collection etc.?
a. Better performance
b. Portability
c. Robust
d. Secure
Q. In the following statements identify the disadvantages of CGI?
a. If number of clients increases, it takes more time for sending response
b. For each request, it starts a process and Web server is limited to start processes
c. It uses platform dependent language e.g. C, C++, perl
d. All mentioned above
Q. In HTTP Request Which Asks for the loopback of the request message, for testing or troubleshooting?
a. PUT
b. OPTIONS
c. DELETE
d. TRACE
Q. In HTTP Request method Get request is secured because data is exposed in URL bar?
a. True
b. False
c. all
d. none
Q. In the HTTP Request method which is non-idempotent?
a. GET
b. POST
c. BOTH A & B
d. None of the above