Adblocker Detected
Quizack provides Online Quiz and Practice MCQs for Free. Please disable your Ad-Blocker so we can earn from ads and keep this project alive.
1. Which statement apply to redirecting a HTTP request to another URL?
2. How do you create the Parameter buttons the toolbar for component com_hello?
3. Which method must you use to deny access from an external direct call?
4. What is the role of the template metadata file in the system?
5. Why does Joomla use templateDetails.xml files?
6. From which package are the classes (i.e JSite, JAdministrator and JInstallation) which make up the Joomla CMS application extended?
7. Which interface and method name should be used to retrieve HTTP request header information?
8. Assume the custom tag is GLOOP and the prefix is TWONG. Which is the syntax for an empty custom tag?
9. How would you use a bean in a JSP page?
10. Which option is a valid declaration?
11. Assuming the tag library is in place and the tag handler is correct, which is the correct way to use a custom tag in a JSP page?
12. What is the WebApp deployment descriptor element name for the Servlet Context Initialization Parameters?
13. Consider the following statement: PreparedStatement ps=con.prepareStatement('INSERT INTO ORDER (CUSTOMER_ID ,PRICE) VALUES(?,?)'); Which of the following should come after this statement?
14. After executing the following code, resultvar contains false. What should the next step be? boolean resultvar=stmt.execute(sql);
15. Which is not a JSP implicit object?
16. Which statement is true regarding the structure of a WebArchive file?
17. Which statement is true regarding the HTTP GET method?
18. Which statement is best associated with the HTTPPOST method?
19. Which interface and method name should be used to acquire a text stream for the response?
20. With regard to the servletcontextlistener interface, which methods is valid?
21. Which statement is true regarding ServletContext Initialization Parameters in the deployment descriptor?
22. With regard to the destroy lifecycle method, identify the correct statements about its purpose or about how and when it is invoked.
23. Read the following code snippet: 1 2 <%=23*counter %> 3 Congratulations! Which is the correct way to complete the above code snippet?
24. Which design pattern did technical designers of JSP use to provide centralized dispatching of requests via a controller servlet?
25. Which method is called by the servlet container just after the servlet is removed from service?
26. Which is the listener interface for servlet context attributes?
27. Which is a JSP implicit object?
28. Which is the name of the cookie used by Servlet Containers to maintain session information?
29. Which design pattern reduces network traffic by acting as a caching proxy of a remote object?
30. Which design pattern is used to decouple presentation from core data access functionality?
31. With regard to the service() lifecycle method, identify two correct statements about its purpose or about how and when it is invoked.
32. Which is used by Servlet Containers to maintain session information?
33. Which JSP action retrieves the value of a property from a properly declared JavaBean in a JSP page?
34. If cookies are turned off on the client, which two methods still work with the session ID?
35. What output will be sent to the browser by the following code snippet? -->
36. What does the container do with the following code snippet?
37. Assuming the servlet method for handling HTTPGET requests is doGet(HttpServletRequest req, HTTPServletResponse res), how do you get a request parameter in that servlet?
38. Which method in the HttpServlet class corresponds to the HTTPPUT method?
39. Which interface provides access to request scoped attributes?
40. What is Template Data?
41. Which option is a valid expression?
42. Suppose you had a servlet that simply returned an error message because that resource was forbidden to that user. Read the following code snippet: 1.public void service(HttpServletRequestrequest, 2.HttpServletResponseresponse) 3.throws ServletException, IOException 4. { 5. 6. } What code would you type on line 5 to return an error message to the requesting client?
43. What is the file name of the WebApp deployment descriptor?
44. Which statement is true regarding a servlet context listener?
45. Which object is the best choice to share information between pages for a single user?
46. Read the following code snippet and answer the question based upon it: http://www.yourcompany.com/you TagLibrary /WEB-INF/yourTagLibrary.tld From the statements given below, which one applies to the code snippet?
47. Which method in the HttpServlet class corresponds to the HTTPPOST method?
48. Which interface can make a servlet thread safe?
49. In which directory do you place servlet class files?
50. Which interface can make a servlet thread safe?
51. When using HTML forms which of the following is true for POST method?
52. What is the likely outcome from running the code below? protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher dispatcher = getServletContext().getNamedDispatcher('/ServletB'); dispatcher.forward(request, response); }
53. When comparing servlet initialisation parameters to context intialisation parameters, which is true among the following?
54. What is true about the life cycle of a servlet?
55. jsp:include page='/servlet/MyServlet' flush='true'/
56. How can you make the JSP class implement the SingleThreadModel interface?
57. javax.servlet.jsp.JspPage extends which of the following interfaces?
58. Which is an INVALID attribute for tag directive?
59. What is the limit of data to be passed from HTML when doGet() method is used?
60. Where in JSP page source can EL functions be used?
61. Which object scope is defined as follows : Objects with this scope are accessible from pages processing requests in the same application as the one in which they were created?
62. Which is not a valid java bean (POJO) scope in JSP?
63. Which is a non-idempotent HTTP method
64. Why do you get this error? NoClassDefFoundError: org.apache.commons.lang.StringUtils. 1. The given class could not be found. 2. The given class could be found, but something went wrong when initializing it 3. None of them
65. Which is valid about 'page' JSP directive?
66. A programmer needs to update a live, running servlet’s initialization parameters so that the web application will begin to use the new parameters immediately. In order to accomplish this, which must be true (although not necessarily sufficient)? 1. The container must destroy and then reinitialize the servlet 2. The servlet’s constructor must retrieve the updated DD parameter from the servlet’s ServletConfig object 3. For each parameter, the DD must have a separate <init-param> tag 4. For each parameter, you must modify a DD tag that specifies the name of the servlet, the name of the parameters, and the new value of the parameter.
67. JSP implicit object 'application' is an object of which of the following class?
68. The http GET, PUT, and DELETE verbs are idempotent. What does the term 'idempotent' stand for?
69. Given a servlet containing the following code, what is the outcome of attempting to compile and run the servlet? ServletContext context = getServletContext(); String s = context.getAttribute('javax.servlet.context.tempdir');
70. JSP implicit object 'exception' is an object of which of the following classes?
71. Which method is called before the page service any requests?
72. Given: 1. <%@ taglib prefix=”c” uri=”http://java.sun.com/jsp/jstl/core” %> 2. <%@ taglib prefix = “tables” uri= http://www.javaranch.com/tables %> 3. <%@ taglib prefix = “jsp” tagdir=”/WEB_INF/tags” %> 4. <%@ taglib uri=”UtilityFunctions” prefix=”util” %> What about the above taglib directives would cause the JSP to not function?
73. What results from a call to the getInitParameterNames() method on ServletContext when there are no context parameters set up in the deployment descriptor?
74. JSP implicit object 'out' is an object of which of the following classes?
75. Which HTTP method sends the same response as request?
76. Considering the following Servlet code, choose the statement which is true: package com.nullhaus; import javax.servlet.annotation.*; import javax.servlet.http.*; @WebServlet('nullHausServlet') public class NullServlet extends HttpServlet { }
77. By default, the servlet API uses a ______ to store a session ID.
78. Which statements are true: a. The element (subelement of ) set to “false” forces the container to make the servlet unreachable for request to the defined url-pattern, b. The element (subelement of ) set to “false” forces the container to make the request for the servlet respond with HTTP Code 503 (Service unavailable), c. The web fragment is merged into the final Deployment Descriptor after the web fragment related annotations are processed, d. All web fragments are processed together (in a batch) and all are merged into the final Deployment Descriptor before the web fragments’ related annotations are processed.
79. Which methods are needed to get the complete and exact URL that causes the call to arrive at the servlet? 1. getRequestURL() 2. getQueryString() 3. Both of them 4. None of them
80. Which is an INVALID implicit EL objects?
81. Which one is not a part of the JSTL library group?
82. Which method can be used to get initialization and startup parameters of a servlet?
83. Which is not a valid standard method called as part of the JSP life cycle by the container?
84. Which classe has an implementation of getSession method that returns an HttpSession object?
85. Which is not a 'page' directive attribute?
86. Which types can be used in conjunction with HttpServletResponse methods to stream output data?
87. Objects which when compiled down are contained in (a) ____ file.
88. Once the JSP has been requested and the page is loaded and initialized, the JSP engine calls the:
89. Which is not a valid implicit object in a JSP?
90. Which method is abstract in HttpServlet?
91. Which statement correctly describe attribute 'buffer'?
92. How can you call a servlet to autofill a dropdown list which depends on selection from previous 2 dropdown lists? 1. Print all possible values of the 2nd and 3rd dropdown out as a Javascript object 2. Make use of XMLHttpRequest in Javascript to fire an asynchronous request to a servlet during the onchange event 3. Both of them 4. None of them
93. When might a JSP get translated (Choose all that apply)? a. When the application is started b. When the developer compiles code in the src folder c. The first time a user requests the JSP d. After jspdestroy() is called, it gets retranslated
94. Which is a valid JSP expression?
95. Which provide a handle to access page directive attributes in the scripting environment?
96. The Web container creates JSP implicit objects like...
97. If req is a reference to an HttpServletRequest and there is no current session, what is true about req.getSession() ?
98. Which is a Scriplet?
99. Which root element provides the global configuration information for the JSP files in a Web application?
100. Which action is a specialized tag that generates the appropriate or tag to load the Java Plug-in software? 1(current)2» Related MCQ's LAMP Linux Microsoft MVC Framework Microsoft SQL Server Microsoft Silverlight MongoDB ADVERTISEMENT Related MCQ's .NET Framework Eclipse Android Kotlin Go (Programming Language) Windows 10 ADVERTISEMENT
LAMP
Linux
Microsoft MVC Framework
Microsoft SQL Server
Microsoft Silverlight
MongoDB
Related MCQ's