jsp

49
Q1. Which of the following Java EE containers manages the execution of JSP page and servlet components for Java EE applications? m 1, EJB container m 2, Web container m 3, Application client container m 4, Applet container m 2 Q2. Which of the following Java EE containers manages the execution of enterprise beans for Java EE applications? M 1, EJB container m 2, Web container m 3, Application client container m 4, Applet container m 1 Q3. Which of the following is a collection of HTML pages and other media files that contains all the content that is visible to the user on a given web server? M 1, Web application m 2, Web site m 3, URL m 4, HTTP m 2 Q4. Which of the following is a canonical name that locates a specific resource on the Internet? m 1, Web application m 2, Web site m 3, URL m 4, HTTP m 3 Q5. Which of the following is referred to as a stateless protocol and supports only one request per connection? m 1, Web application m 2, Web site m 3, URL m 4, HTTP m 4 Q6. You have to design a web application for a car manufacturing company. The processing of the client request is to be done as a separate OS shell on the server. Which of following should you use for the server-side programming? M 1, CGI m 2, Servlet m 3, JSP m 4, HTML m 1

Transcript of jsp

Page 1: jsp

Q1. Which of the following Java EE containers manages the execution of JSP page and servlet components for Java EE applications? m1, EJB container m2, Web container m3, Application client container m4, Applet container m 2

Q2. Which of the following Java EE containers manages the execution of enterprise beans for Java EE applications? M1, EJB container m2, Web container m3, Application client container m4, Applet container m 1

Q3. Which of the following is a collection of HTML pages and other media files that contains all the content that is visible to the user on a given web server? M1, Web application m2, Web site m3, URL m4, HTTP m 2

Q4. Which of the following is a canonical name that locates a specific resource on the Internet? m1, Web application m2, Web site m3, URL m4, HTTP m 3

Q5. Which of the following is referred to as a stateless protocol and supports only one request per connection? m1, Web application m2, Web site m3, URL m4, HTTP m 4

Q6. You have to design a web application for a car manufacturing company. The processing of the client request is to be done as a separate OS shell on the server. Which of following should you use for the server-side programming? M1, CGI m2, Servlet m3, JSP m4, HTML m 1

Q7. You have to design a web application for a car manufacturing company. You decided to use the Model 2 architecture to design the web application. Which of the following will act as the controller that verifies form data and updates the model with the form?1, Servlet m2, JSP page m3, Java technology classes m4, HTML m 1

Page 2: jsp

Q8. You have to design a web application for a car manufacturing company. You decided to use the Model 2 architecture to design the web application. Which of the following will act as the view that renders the HTML response by retrieving data from the model n?1, Servlet m2, JSP page m3, Java technology classes’ m4, HTML m 2

Q9. In the J2EE platform the different components are allocated different responsibilities. These responsibilities include carrying out specific actions or viewing static content in a well formatted way without using custom tags. Of all the components available.1,JSP m2,EJB m3,Servlet m4,RMI m 3

Q10. You need to develop an application for a client. The application should have the following features:1. Should be able to run on any web server.2. Should be accessible from any web browser.3. Should allow a degree of separation between the static and dynamic

1,EJB m2,HTML m3,JSP m4,ASP m 3

Q11. Assertion: JSP supports features of servlets, such as platform independence, creation of database-driven Web applications, and server side programming capabilities, etc.Reason: A JSP page after compilation generates a servletWhich of the following option.1,BOTH the assertion and reason are TRUE statements and the reason is the correct explanation of the assertion. M2,BOTH the assertion and reason are TRUE statements, but the reason IS NOT a correct explanation of the assertion. M3, The assertion is TRUE but the reason is a FALSE statement. M4, The assertion is FALSE hence the reason DOES NOT apply. M 1

Q12. You are using the MVC paradigm to divide the application into three distinct roles that have well defined responsibilities towards each other. One of the elements contains the parts of the application that can be rendered on any device and can be perceive1, Model element m2, View element m3, Controller element m4, A combination of these elements m 2

Q13. In the J2EE platform, the model, view and controller responsibilities are allotted to the different elements. One of the elements is usually a servlet. The servlet delegates the helper classes to carry out specific actions, rather than addressing them 1,Controller m2,View m3,Model m4,Component m 1

Page 3: jsp

Q14. Smithline is a large chain of supermarket. The management of Smithline identifies that they had exceeded their budget. The management wants to make a fresh short term budget, which would cover the value exceeded. Identify who will take the responsibility 1, Strategic management m2, Middle management m3, Both operational and strategic management m4, Operational management m 2

Q15. M&N Garments is planning to modify the process of selling their garments online. In this regard, they need to design a blueprint of the Web application. Identify who will get the responsibility of designing the Web application? M1, Chief Executive Officer m2, Senior Management m3, Architects m4, Enterprise Engineers m 3

Q16. James owns a restaurant with five waiters, three chefs, and two cleaners. The waiters collect orders and conveys the same to the chefs. Then the chefs prepare the food and the waiters serve the food. Finally the waiter collects the bill. The cleaners ensu1, Adaptive organizations m2, Simple organizations m3, Nonadaptive organizations m4, Complex organizations m 2

Q17. Allianz Corporation started a new insurance scheme which would provide accidental coverage to the people insured under this scheme. Allianz is a ____________ . m1, Manufacturing-based organization m2, Service-based organization m3, Complex organization m4, Simple organization m 2

Q18. Nicole manages a social service centre. Her __________ provides education and food to the poor children free of cost. M1, Adaptive organization m2, Simple organization m3, Non-profit-based organization m4, Service-based organization m 3

Q19. Which of the following prevent unauthorized modification, destruction, or disclosure of the data in an enterprise? M1, Data warehouse m2, Data mart m3, Network security layers m4, Front-end interface design tools m 3

Q20. Which of the following provides an integrated solution to plan, schedule, and control pre-sales and post-sales activities in an organization? M1, Enterprise Resource Planning m2, Customer Relationship Management m3, Supply Chain Management m4, Transaction Processing Systems m 2

Page 4: jsp

Q21. Which of the following business process plans, manages, and review performance of the employees? M1, Finance and Accounting m2, Sales and Marketing m3, Manufacturing and Production m4, Human Resource m 4

Q22. In which stage of Business Process Management, the business process experts review the problem areas and evaluate the end-to-end processes of the organization? M1, Monitoring m2, Analyzing m3, Improving m4, Implementing m 2

Q23. Which of the following supports what-if analysis? M1, Supply Chain Management System m2, Enterprise Resource Planning Systems m3, Management Information Systems m4, Decision Support Systems m 4

Q24. Omeg, a mobile manufacturing organization, is planning to export their mobile phones in Asian market. To export their mobile phones, the senior management at Omeg needs to know about the Asian market. Which of the following systems can be used to fulfill?1, Transaction Processing Systems m2, Business Intelligence Systems m3, Management Information Systems m4, Customer Relationship Management System m 2

Q25. GGN Construction wants to keep track of the valuation of their property and its depreciation. Which of the following business process would help the management to perform this activity? M1, Sales and marketing m2, Finance and accounting m3, Manufacturing and production m4, Human resource m 2

Q26. JK Public School always receives complaints that their admission process is very complex and time consuming. In this process, initailly the student fills the form and then they attend the interview. After interview they submit the mark sheets. Then the stu1, Continuous process improvement m2, Continuous performance improvement m3, Business process reengineering m4, Business performance reengineering m 1

Q27. Sundew's manufacturing unit is having problem in production as suppliers failed to sent the raw materials. They immediately need raw materials. Which support business process will help Sundew in this situation? M1, Purchase and procurement m2, Human resource m3, IT support m4, Infrastructure development m 1

Page 5: jsp

Q28. Smithline, a large chain of supermarket has automated systems for each of their divisions. However, the management is unable to retrieve data from multiple systems simultaneously. Identify which of the following technology components for providing data ca1, Enterprise resource planning m2, Transaction processing systems m3, Supply chain management m4, Customer relationship management m 1

Q29. Omeg is launching a mobile phone. The management of Omeg is sure that the customers would like the design and style of the phone. In addition, a large number of salespersons were recruited to explain the features of the phone to the customers. Which key a1, Intangible m2, Perishable m3, Workforce intensive m4, Both perishable and intangible m 3

Q30. A salesperson delivers the products to his customer. During delivery of the product, which two databases need to be updated simultaneously? M1, Invoice and Inventory database m2, Invoice and Order detail database m3, Inventory and Order detail database m4, Quotation and Inventory database m 1

Q31. Ace Beauty Products is planning to launch a new body lotion in the market. Therefore, they want to identify the likes and dislikes of the customers. Identify the factor of segmentation that is being focused in the preceding situation? M1, Profile m2, Demographics m3, Psychographic m4, Buying decisions m 3

Q32. Jane Cosmetics launched a perfume in the market because the customers have been demanding that type of perfume for quite long. Identify which of the following is used to develop huge demand for the product in the market? M1, Push marketing m2, Target market identification m3, Market segmentation m4, Pull marketing m 4

Q33. When a sale transaction happens, a number of documents are exchanged between the buyer and seller. Identify the correct sequence in which the documents are exchanged? m1, I) Quotation II) Purchase Order III) Invoice m2, I) Invoice II) Quotation III) Purchase Order m3, I) Invoice II) Purchase order III) Quotation m4, I) Quotation II) Invoice III) Purchase Order m 1

Page 6: jsp

Q34. Mandy needs to design a web application for his organization. He decides to use the servlet in the web application to respond to an HTTP request from the client. How can he create a servlet for the web application? M1, By extending the servlet class with the HttpServlet class. m2, By extending the servlet class with the ListLeagueServlet class. m3, By extending the servlet class with the HttpServletRequest interface. m4, By extending the servlet class with the HttpServletResponse interface. M 1

Q35. Mandy needs to design a web application for his organization. He decides to use the servlet in the web application to respond to an HTTP request from the client. He has to make sure that the response sent from the server to the browser is intended for a s1, response.setContentType("text/html"); m2, response.setHeader("Cache-Control", "no-cache"); m3, response.setHeader("Cache-Control", "private"); m4, response.setHeader("Cache-Control", "cache"); m 3

Q36. Mandy needs to design a web application for his organization. He decides to use the servlet in the web application to respond to an HTTP request from the client. He has to make sure that the browser should not reuse the response for a subsequent request w1, response.setContentType("text/html"); m2, response.setHeader("Cache-Control", "no-cache"); m3, response.setHeader("Cache-Control", "private"); m4, response.setHeader("Cache-Control", "cache"); m 2

Q37. Mandy needs to design a web application for his organization. He decides to use the servlet in the web application to respond to an HTTP request from the client. He first creates a form, create_form.do, to accept input from the user. He needs to make sure1, <form action='create_form.do' method='POST'> m2, <form action='create_form.do' method='GET'> m3, <form method='create_form.do' action='POST'> m4, <form method='create_form.do' action='GET'> m 2

Q38. Which of the following HTTP methods is identical to the GET except that it does not return a message-body, only the headers? M1, HEAD m2, OPTIONS m3, TRACE m4, CONNECT m 1

Q39. Which of the following HTTP methods request for the communication options available on the request/response chain? M1, HEAD m2, OPTIONS m3, TRACE m4, CONNECT m 2

Q40. Which of the following HTTP methods request for the server to invoke an application-layer loop-back of the request message? M1, HEAD m2, OPTIONS m3, TRACE m4, CONNECT m 3

Page 7: jsp

Q41. Which of the following HTTP methods is reserved for use with a proxy that can switch to being a tunnel? M1, HEAD m2, OPTIONS m3, TRACE m4, CONNECT m 4

Q42. Which of the following HTTP methods request for the server to store the entity enclosed in the body of the HTTP message? M1, HEAD m2, OPTIONS m3, TRACE m4, PUT m 4

Q43. Steve has developed an application. The servlet has two fields on the home page. This home page accepts the username and password. The servlet needs to validate the user name and password after these values are submitted to the servlet. Steve is not able 1,HttpServletResponse interface m2,HttpServletRequest interface m3,ServletConfig class m4,HttpServlet class m 2

Q44. Consider the following code snippet:import javax.servlet.*;import javax.servlet.http.*;import java.io.*;import java.util.*;

public class UserCount extends HttpServlet{ static int c; public void init(ServletConfig cn) throws Servl1,3 m2,2 m3,4 m4,1 m 3

Q45. Assertion: A change made to any code requires recompilation of the servlet. Reason: Servlets tie up files (an HTML file for the static content and a Java file for the dynamic content) to independently handle the static presentation logic and the dynamic1,BOTH the assertion and reason are TRUE statements and the reason IS the correct explanation of the assertion. m2,BOTH the assertion and reason are TRUE statements, but the reason IS NOT a correct explanation of the assertion. m3,The assertion is TRUE but the reason is a FALSE statement. m4,The assertion is FALSE hence the reason DOES NOT apply. M 1

Q46. You are working on an application that has multiple components. The control needs to be transferred from one component to another component. The invoking component should not be able to produce any output of its own. Which method from the RequestDispatche1,request m2,include m3,response m4,forward m 4

Page 8: jsp

Q47. Consider the following code snippet:Code for UserInterface: <html> <head></head> <body> <form method="post" action="/Servlet/validate"> Login:<input type="text" name="t1"> Password:<input type="text" name="t2"> <input ty1,Welcome to the web site. m2,Invalid Password. m3,No such User. m4,The code will not compile successfully. M 3

Q48. You, being a software developer, needs to develop a web application for your organization. You decided to use servlets to create the web application. After you have created the servlet, you now need to clean up the resources that your servlet has initialize1, By overriding the service method in the servlet class. m2, By overriding the init method in the servlet class. m3, By overriding the destroy method in the servlet class. m4, By overriding the doGet method in the servlet class. M 3

Q49. You, being a software developer, needs to develop a web application for your organization. You decided to use servlets to create the web application. While you are creating the servlet, you feel the need to write the code for the initialization of the ser1, By overriding the service method in the servlet class. m2, By overriding the init method in the servlet class. m3, By overriding the destroy method in the servlet class. m4, By overriding the doGet method in the servlet class. M 2

Q50. You have created a soccer league web application using servlets. After the web application has been created, you run the add_league servlet using the following address:

http://localhost:8080/soccer/admin/add_league.view

What should the corresponding code1, <servlet-mapping><servlet-name>AddLeagueForm</servlet-name><url-pattern>/localhost:8080/add_league.view</url-pattern></servlet-mapping> m2, <servlet-mapping><servlet-name>AddLeagueForm</servlet-name><url-pattern>/localhost/add_league.view</url-pattern></servlet-mapping> m3, <servlet-mapping><servlet-name>AddLeagueForm</servlet-name><url-pattern>http/add_league.view</url-pattern></servlet-mapping> m4, <servlet-mapping><servlet-name>AddLeagueForm</servlet-name><url-pattern>/admin/add_league.view</url-pattern></servlet-mapping> m 4

Page 9: jsp

Q51. You have created the AddLeagueForm servlet that includes a single initialization parameter called seasons-list with the value Spring, Summer, Autumn, Winter. This configuration object is passed to the servlet instance by way of the init method, which is s1, <servlet><servlet-name>AddLeagueForm</servlet-name><servlet-class>sl314.view.AddLeagueFormServlet</servlet-class><param-name>seasons-list</param-name><param-value>Spring, Summer,Autumn,Winter</param-value></init-param></servlet> m2, <servlet><servlet-name>AddLeagueForm</servlet-name><servlet-class>sl314.view.AddLeagueFormServlet</servlet-class><param-name>seasons-list</param-name><param-value>Spring, Summer,Autumn,Winter</param-value></servlet> m3, <servlet><servlet-name>AddLeagueForm</servlet-name><servlet-class>sl314.view.AddLeagueFormServlet</servlet-class><init-param><param-name>seasons-list</param-name><param-value>Spring, Summer,Autumn,Winter</param-value></init-param></servlet> m4, <servlet><servlet-name>AddLeagueForm</servlet-name><servlet-class>sl314.view.AddLeagueFormServlet</servlet-class><init-param><param-value>Spring, Summer, Autumn, Winter</param-value></init-param></servlet> m 3

Q52. The life cycle of the servlet involves loading the servlet class and then creating the servlet instance. What will the third step of the servlet life cycle? M1, Calling the service method m2, Calling the init method m3, Calling the destroy method m4, Calling the servlet method m 2

Q53. The life cycle of the servlet involves loading the servlet class, creating the servlet instance and then initializing the servlet component. What will the next step of the servlet life cycle? M1, Calling the service method m2, Calling the init method m3, Calling the destroy method m4, Calling the servlet method m 1

Q54. The life cycle of the servlet involves loading the servlet class and then creating the servlet instance. After the servlet instance is created, the web container creates a unique object that contains any initialization parameters that were specified in th1, Servlet m2, ServletConfig m3, ServletContext m4, ServletContextListener m 2

Page 10: jsp

Q55. You are creating a web application using servlets. The application requires that application-specific data is shared across independent web components. Which object can be used to implement this? M1, Servlet m2, ServletConfig m3, ServletContext m4, ServletContextListener m 3

Q56. You are creating a web application using servlets. You need to ensure that the shared application data must be in-memory before any HTTP requests are executed on the web application. Which object can be used to perform this initialization? M1, Servlet m2, ServletConfig m3, ServletContext m4, ServletContextListener m 4

Q57. You, being a software developer, needs to develop a web application for your organization. You decided to use servlets to create the web application. You created a form, AddEmpFormServlet.java to add the details of the new employees and complied it. The c1, <servlet><servlet-name>AddEmpForm</servlet-name><servlet-class>view.AddEmpFormServlet</servlet-class></servlet> m2, <servlet><servlet-name>AddEmpForm</servlet-name><servlet-class>AddEmpFormServlet</servlet-class></servlet> m3, <servlet><servlet-name>AddEmpForm</servlet-name><servlet-class>classes.view.AddEmpFormServlet</servlet-class></servlet> m4, <servlet><servlet-name>AddEmpForm</servlet-name><servlet-class>WEB-INF.view.AddEmpFormServlet</servlet-class></servlet> m 1

Q58. Which of the following methods is used to store the context-scoped attributes in the ServletContext object? M1, init(ServletConfig) m2, setAttribute m3, getInitParameter m4, ContextInitialized m 2

Q59. Which of the following method is used to retrieve the servlet's initialization parameters? M1, init(ServletConfig) m2, setAttribute m3, getInitParameter m4, ContextInitialized m 3

Q60. Which of the following method is used to retrieve the attributes from the ServletContext object? M1, init(ServletConfig) m2, getAttribute m3, getInitParameter m4, ContextInitialized m 2

Page 11: jsp

Q61. Which of the following is the run time representation of the web application? M1, init m2, service m3, ServletContext m4, Servlet m 3

Q62. Which of the following methods is issued a unique request and response object by the web container for each HTTP request mapped to a given servlet? M1, init m2, service m3, ServletContext m4, Servlet m 2

Q63. While developing a web application using Struts, you configured Struts ActionServlet in the web.xml deployment descriptor. The ActionServlet uses an initialization parameter, called config, to specify the path to the Struts configuration file. For this,1, <init-param><param-name>config</param-name><param-value>/WEB-INF/struts-config.xml</param-value></init-param> m2, <init-param><param-name>config</param-name><param-value>/WEB-INF</param-value></init-param> m3, <init-param><name>config</name><param-value>/WEB-INF/struts-config.xml</param-value></init-param> m4, <init-param><param-name>config</param-name><param-value>struts-config.xml</param-value></init-param> m 1

Q64. While developing a web application using Struts, you are required to configure the Struts ActionServlet in the web.xml deployment descriptor. The ActionServlet is given the name FrontController. To define the FrontController servlet, the following code i1, <name>FrontController<name><servlet-class>org.apache.struts.action</servlet-class> m2, <servlet-name>FrontController</servlet-name><servlet-class>org.apache.struts.action.ActionServlet</servlet-class> m3, <servlet-name>FrontController</servlet-name><servlet-class>struts.action.ActionServlet<servlet-class> m4, <servlet-name>FrontController<servlet-name><class>org.apache.struts.action.ActionServlet<class> m 2

Page 12: jsp

Q65. While developing a web application using Struts, you configured the Struts ActionServlet in the web.xml deployment descriptor. The ActionServlet is given the name FrontController. You are also required to configure the URL pattern that maps to the Action1, <servlet-mapping><servlet-name>Action</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping> m2, <servlet-mapping><servlet-name>FrontController</servlet-name><url-pattern>.do<url-pattern></servlet-mapping> m3, <servlet-mapping><servlet-name>FrontController</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping> m4, <servlet-mapping><servlet-name>Action</servlet-name><url-pattern>.do</url-pattern></servlet-mapping> m 3

Q66. While developing a web application using Struts, you are required to configure the Struts configuration file, struts-config.xml. You have to declare two forward entries, success and error within the /add_dvd action. For this purpose, the following code i1, <action-mappings> <action path="/add_dvd" type="com.dvd.controller.AddDVDAction"> <forward name="error" path="/add_dvd.view"/> </action></action-mappings> m2, <action-mappings> <action path="/add_dvd"> <forward name="success" path="/success.view"/> <forward name="error" path="/add_dvd.view"/> </action></action-mappings> m3, <action-mappings> <action path="/add_dvd" type="com.dvd.controller.AddDVDAction"> </action></action-mappings> m4, <action-mappings> <action path="/add_dvd" type="com.dvd.controller.AddDVDAction"> <forward name="success" path="/success.view"/> <forward name="error" path="/add_dvd.view"/> </action></action-mappings> m 4

Page 13: jsp

Q67. While developing a web application using Struts, you are required to configure the Struts configuration file, struts-config.xml. You have to declare two forward entries, success and error within the /admin/add_league action. For this purpose, the following1, <action-mappings> <action path="/admin/add_league" type="sl314.controller.AddLeagueAction"><forward name="success" path="/admin/success.view"/><forward name="error" path="/admin/add_league.view"/> </action></action-mappings> m2, <action-mappings> <action path="/admin/add_league"><forward name="success" path="/admin/success.view"/><forward name="error" path="/admin/add_league.view"/> </action></action-mappings> m3, <action-mappings> <action path="add_league" type="sl314.controller.AddLeagueAction"><forward name="success" path="/admin/success.view"/><forward name="error" path="/admin/add_league.view"/> </action></action-mappings> m4, <action-mappings> <action path="/add_league" type="sl314.controller.AddLeagueAction"><forward name="success" path="/admin/success.view"><forward name="error" path="/admin/add_league.view"> </action></action-mappings> m 1

Q68. James is developing a web application using Struts framework. For this, he needs to configure the Struts ActionServlet in a file. Which of the following files is used to configure the Struts infrastructure controller? M1, web.xml m2, list_leagues.do m3, struts-config.xml m4, form.do m 1

Q69. James is developing a web application using Struts framework. For this, he needs to configure all of the application-specific classes in a file. Which of the following files is used to configure the action mappings? M1, web.xml m2, list_leagues.do m3, struts-config.xml m4, form.do m 3

Q70. James is developing a web application using Struts framework. For this, he needs to configure all of the application-specific classes in the struts-config.xml file. Which of the following is the primary subtag to the root tag of this file? M1, action-mappings m2, forward m3, action m4, struts-config m 1

Page 14: jsp

Q71. James is developing a web application using Struts framework. For this, he needs to configure all of the application-specific classes in the struts-config.xml file. Which of the following tag in this file specifies one action class and has two primary att1, action-mappings m2, forward m3, action m4, struts-config m 3

Q72. James is developing a web application using Struts framework. For this, he needs to configure all of the application-specific classes in the struts-config.xml file. Which of the following tag in this file configures the set of view mappings between the sy?1, action-mappings m2, forward m3, action m4, struts-config m 2

Q73. While developing a web application using Struts, you need to create a Struts controller. For this, you are required to extend the Struts Action base and implement the execute method. Which of the following arguments of execute method is a representation o1, ActionMapping m2, ActionForward m3, ActionForm m4, Action m 1

Q74. While developing a web application using Struts, you need to create a Struts controller. For this, you are required to extend the Struts Action base and implement the execute method. Which of the following is the first argument of the execute method and i1, ActionMapping m2, ActionForward m3, ActionForm m4, Action m 1

Q75. While developing a web application using Struts, you need to create a Struts controller. For this, you are required to extend the Struts Action base and implement the execute method. Which of the following object is the return value of the execute method?1, ActionMapping m2, ActionForward m3, ActionForm m4, Action m 2

Q76. While developing a web application using Struts, you need to create a Struts controller. For this, you are required to extend the Struts Action base and implement the execute method. Which of the following is the second argument of the execute method and 1, ActionMapping m2, ActionForward m3, ActionForm m4, Action m 3

Q77. While developing a web application using Struts, you need to create a Struts controller. For this, you are required to extend the Struts Action base and implement the execute method. Which of the following is the third argument of the execute method and i1, ActionMapping m2, ActionForward m3, HttpServletRequest m4, HttpServletResponse m 3

Page 15: jsp

Q78. Which of the following tag is NOT a part of the web.xml file? M1, servlet m2, action m3, param-name m4, param-value m 2

Q79. Which of the following tag is NOT a part of the struts-config file? M1, action m2, forward m3, action-mappings m4, servlet-name m 4

Q80. Which of the following directory is used to install struts library file? M1, /WEB-INF/lib/ m2, /WEB-INF/ m3, /WEB-INF/web/ m4, /WEB-INF/model/ m 1

Q81. Which of the following is NOT a part of the Analysis Model components? M1, Boundary m2, Service m3, Entity m4, Action m 4

Q82. Which of the following tag is used to specify the initialization parameters in the web.xml file? M1, init-param m2, servlet m3, servlet-mapping m4, url-pattern m 1

Q83. You are developing a web application using Servlets. You have to use filters so that the web container intercepts the incoming requests before it is forwarded to the servlet. Which of the following interface or class do you need to implement or extend which1, FilterConfig m2, Filter m3, FilterChain m4, PerformanceFilter m 2

Q84. You are developing a web application using Servlets. You have to use filters so that the web container intercepts the incoming requests before it is forwarded to the servlet. Which of the following methods is called once when the container instantiates a 1, init m2, doFilter m3, destroy m4, doGet m 1

Q85. You are developing a web application using Servlets. You have to use filters so that the web container intercepts the incoming requests before it is forwarded to the servlet. Which of the following method of the filter is passed a FilterConfig object and.1, init m2, doFilter m3, destroy m4, doGet m 1

Page 16: jsp

Q86. You are developing a web application using Servlets. You have to use filters so that the web container intercepts the incoming requests before it is forwarded to the servlet. Which of the following method is called for every request intercepted by the file?1, init m2, doFilter m3, destroy m4, doGet m 2

Q87. You are developing a web application using Servlets. You have to use filters so that the web container intercepts the incoming requests before it is forwarded to the servlet. Which of the following method is equivalent of a servlet's service method and is1, init m2, doFilter m3, destroy m4, doGet m 2

Q88. Mark is developing a web based application. The home page is a servlet that accepts the user name and password. Mark does not want the user to enter the username every time he logs into the website. He wants to find a way to store the value on the user's 1, getCookie m2, addCookie m3, addSession m4, getSession m 2

Q89. Consider the code for filter mapping in web application deployment descriptor file.

<servlet-mapping><servlet-name>MyController</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping>

1)<filter-mapping><filter-name>First</filter-name><servl

1,First>Second>Third>Fourth m2,Third>Fourth>First>Second m3,Fourth>Third>Second>First m4,Second>First>Fourth>Third m 2

Page 17: jsp

Q90. A code for filter mapping has to be written for a filter called Login Filter for components in such a manner that it should be applied to component whenever an error occurs . Predict the code for filter mapping to perform the required task from the following.1,<filter-mapping><filter-name>LoginFilter</filter-name><dispatcher>ERROR</dispatcher></filter-mapping> m2,<filter-mapping><filter-name>LoginFilter</filter-name><url-pattern>*.do</url-pattern><dispatcher>ERROR<dispatcher></filter-mapping> m3,<filter-mapping><filter-name>LoginFilter</filter-name><dispatcher>ERROR</dispatcher><url-pattern>*.do</url-pattern></filter-mapping> m4,<filter-mapping><filter-name>LoginFilter</filter-name><url-pattern>*.do</url-pattern><dispatcher>dispatcher.ERROR</dispatcher></filter-mapping> m 2Q91. Stem text : Consider the following code regarding accessing of session attributes in a session management program. But this program has few errors. Predict the correct code for the program.String login=request.getParameterValue("login");if(login.equals1,String login=request.getParameter("login");if(login.equals("tim"){return mapping.Forward("error");}if(login.equals("David"){return mapping.Forward("success");} m2,String login=request.getParameter("login");if(login.equals("tim"){return mapping.findForward(error);}if(login.equals("David"){return mapping.findForward(success);} m3,String login=request.getParameterValue("login");if(login.equals("tim"){return mapping.findForward("error");}if(login.equals("David"){return mapping.findForward("success");} m4,String login=request.getParameter("login");if(login.equals("tim"){return mapping.findForward("error");}if(login.equals("David"){return mapping.findForward("success");} m 4

Page 18: jsp

Q92. Stem text : You have deployed two servlets named servlet1 and servlet2 in your Web server. You want to create an attribute called "customernumber" and assign the value of a variable cnum to it. Which of the following is the correct method for doing it? M1,ServletContext c=getServletContext();c.setAttribute(cnum,"customernumber"); m2,ServletConfig c=getServletConfig();c.setAttribute(cnum,"customernumber"); m3,ServletContext c=getServletContext()c.setAttribute("customernumber", cnum) m4,ServletConfig c=getServletConfig();c.setAttribute("customernumber", cnum); m 3

Q93. You are creating a web application using Servlets. This web application needs to be integrated with the database. For this, you want to create a resource that contains the information needed to connect to an underlying database (typically the database URL1, JDBC API m2, DataSource m3, Connection Pooling m4, DAO m 2

Q94. You are creating a web application using Servlets. This web application needs to be integrated with the database. For this, you are required to manage the database communication. You decide to keep only a few connections that are shared among data access.1, JDBC API m2, DataSource m3, Connection Pooling m4, DAO m 3

Q95. You are creating a web application using Servlets. This web application needs to be integrated with the database. For this, you are required to create a datasource. Which of the following package contains the DataSource interface to be included in your ap1, java.sql m2, javax.sql m3, java.io m4, javax.servlet m 2

Q96. You are creating a web application using Servlets. This web application needs to be integrated with the database. For this, you are required to create a data source. This data source will be used by the components to retrieve a connection. Which of the following.1, getConnection m2, close m3, lookup m4, prepareStatement m 1

Q97. You are creating a web application using Servlets. This web application needs to be integrated with the database. For this, you are required to create a datasource. This datasource will be used by the components to retrieve a connection. After the connect1, JDBC API m2, java.sql package m3, Connection Pooling m4, Context object m 1

Page 19: jsp

Q98. Consider the following statements regarding DAO Pattern Advantages:

Statement A: DAO pattern design enhances the flexibility in front end technologies.

Statement B: DAO pattern design enhances the flexibility in back end technologies.

Statement C:

1,Statement A,B,C are true and Statement D is False. M2,Statement A,B,D are true and Statement C is False. m3,Statement B,C,D are true and Statement A is False. m4,Statement A,B are true and Statement C,D are False. M 2

Q99. A Datasource reference for a datasource called passworddb has to be defined in a deployment descriptor file. What would be the code for this? M1,<resorurce-ref><res-ref-name>jdbc/passworddb</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth></resource-ref m2,<resorurce-ref><resname>jdbc/passworddb</resname><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth></resource-ref> m3,<resorurce-ref><res-ref-name>jdbc/passworddb<res-ref-name><respackage>javax.sql.DataSource</respackage><res-auth>Container</res-auth></resource-ref> m4,<resorurce-ref><res-ref-name>"jdbc/passworddb"<res-ref-name><res-type>"javax.sql.DataSource"</res-type><res-auth>Container</res-auth></resource-ref> m

Q100. What is the correct sequence when a component needs a DataBase connection?

1) The Component uses JDBC API to communicate with the DataBase.

2) The Component performs a JNDI Lookup on the naming service to retrieve the DataSource.

3) import the javax.sq

1,1>2>3>4 m2,4>2>3>1 m3,3>2>4>1 m4,3>2>1>4 m 3

Page 20: jsp

Q101. What would be code for locating a Datasource named myDB thru JNDI Context named mycontext? M1,Context mycontext= new Context();DataSource ds= (DataSource)mycontext.lookup("java:comp/env/jdbc/myDB"); m2,Context mycontext= new InitialContext();DataSource ds= (DataSource)mycontext.lookup(java:comp/env/jdbc/myDB); m3,Context mycontext= new InitialContext();DataSource ds= (DataSource)mycontext.lookup("java:comp/env/jdbc/myDB"); m4,Context mycontext= new InitialContext();DataSource ds= mycontext.lookup("java:comp/env/jdbc/myDB"); m 3

Q102. Stem text : Consider the following lines of code in web.xml file regarding defining of DataSource reference:

1,<resource-ref><description></description><res-ref-name>jdbc/myDB</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>container</res-auth></resource-ref> m2,<resource-ref><description></description><res-ref-name>jdbc/myDB<res-ref-name><res-type>java.sql.DataSource<res-type><res-auth>container<res-auth></resource-ref> m3,<resource-ref><description></description><res-refname>jdbc/myDB<res-refname><res-type>javax.sql.DataSource<res-type><res-auth>container</res-auth></resource-ref> m4,<resource-ref><description></description><res-ref-name>jdbc/myDB<res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>container</res-auth></resource-ref> m 1

Q103. Which of the following JSP page implicit variable represents the JspWriter object associated with the output stream of the response? M1, application m2, out m3, exception m4, config m 2

Q104. Which of the following JSP page implicit variable represents the Throwable object that was thrown by some other JSP page? M1, application m2, out m3, exception m4, config m 3

Page 21: jsp

Q105. Which of the following JSP page implicit variable represents the ServletConfig object associated with the servlet for this JSP page? M1, application m2, out m3, exception m4, config m 4

Q106. Which of the following attributes of the page directive defines the MIME type of the output stream? M1, buffer m2, info m3, contentType m4, pageEncoding m 3

Q107. You are creating a JSP page. For this, you need to use the JSP scripting elements that are processed by the JSP engine during the translation of the JSP page. Which of the following scripting element provides information that affects the overall translation?1, Directive Tag m2, Declaration Tag m3, Scriptlet Tag m4, Expression Tag m 1

Q108. You are creating a JSP page. For this, you need to use the JSP scripting elements that are processed by the JSP engine during the translation of the JSP page. Which of the following scripting element lets you include members in the JSP servlet class, eith1, Directive Tag m2, Declaration Tag m3, Scriptlet Tag m4, Expression Tag m 2

Q109. You are creating a JSP page. For this, you need to use the JSP scripting elements that are processed by the JSP engine during the translation of the JSP page. Which of the following scripting element lets the JSP page developer include arbitrary Java tech?1, Directive Tag m2, Declaration Tag m3, Scriptlet Tag m4, Expression Tag m 3

Q110. You are creating a JSP page. For this, you need to use the JSP scripting elements that are processed by the JSP engine during the translation of the JSP page. Which of the following scripting element holds a Java language expression that is evaluated during1, Directive Tag m2, Declaration Tag m3, Scriptlet Tag m4, Expression Tag m 4

Q111. You are creating a JSP page. You decide to use the JSTL core library to create the JSP page. The JSTL library contains several tags that reduce the scripting necessary in a JSP page. Which of the following tag of the JSTL library is used to evaluate an.1, set m2, url m3, out m4, if m 3

Page 22: jsp

Q112. Which of the following JSP page implicit variable represents the ServletContext object for the web application? M1, application m2, out m3, exception m4, config m 1

Q113. Stem text : Consider the usage of JSTL forEach tag in the following code snippet.

<font color='green'><ul><c:foreach flag=errmsg items="${errorMsgs}"><li>$errmsg</li></c:forEach></ul></font>

The code snippet contains some errors Predict the correct.1,<font color='green'><ul><c:forEach var=errmsg items="${errorMsgs}"><li>$errmsg</li></c:forEach></ul></font> m2,<font color='green'><ul><c:forEach var="errmsg" items="${errorMsgs}"><li>${errmsg}</li></c:forEach></ul></font> m3,<font color='green'><ul><c:forEach var="errmsg" items="${errorMsgs}"><li>$errmsg</li></c:forEach></ul></font> m4,<font color='green'><ul><c:forEach var=errmsg items="${errorMsgs}"><li>${errmsg}</li></c:forEach></ul></font> m 2Q114. Stem text : Consider following statements for Expression Tag in JSP.

A) An Expression tag can take any java language expression that can be used an argument to System.out.println.B) Expression tag is evaluated during HTTP Response.C) The Result of the 1,Statement A,B, and C are true. m2,Statement A and D are true. m3,Statement B,C, and D are true. m4,Statement A,B, and D are true. M 4

Page 23: jsp

Q115. Stem text : Consider the following statements:

A) Declaration tag can override jspInit() MethodB) Declaration tag can not override jspDestroy() MethodC) Declaration tag can override _jspService() MethodD) Declaration tag can include attributes & method

1,Statement A, B, C are true and D is False. m2,Statement A, D are true and B, C are False. m3,Statement A,B are true and C,D are False. m4,Statement B is False and A, C, D are true. M 2

Q116. Stem text : Consider the following code snippet of JSP Bean that contains few errors. Predict the Correct Code.

<jsp:usebean identity="login" scope="Session" class=s1314.beans.LoginBean><%!login.setValue(request.getParameter("Loginid"));login.setAddress1,<jsp:useBean id="login" scope="Session" class="s1314.beans.LoginBean"><%login.setValue(request.getParameter("Loginid"));login.setAddress(request.getParameter("address"));%></jsp:useBean> m2,<jsp:useBean identity="login" scope="Session" class="s1314.beans.LoginBean"><%!login.setValue(request.getParameter("Loginid"));login.setAddress(request.getParameter("address"));%><jsp:useBean> m3,jsp:useBean id="login" scope="Session" class="s1314.beans.LoginBean"><%!login.setValue(request.getParameter("Loginid"));login.setAddress(request.getParameter("address"));%></jsp:useBean> m4,jsp:useBean id="login" scope="Session" class="s1314.beans.LoginBean"><%login.setValue(request.getParameter("Loginid"));login.setAddress(request.getParameter("address"));%><jsp:useBean> m 1

Page 24: jsp

Q117. While configuring the JSP Environment you want to turn off scripting as well as ignore EL in jsp file. What would be the code for this? M1,<jsp-config><jsp-property-group><url-pattern>/scriptting_off/*</url-pattern><scripting-invalid>true</scripting-invalid></jsp-property-group><jsp-property-group><url-pattern>/EL_off/*</url-pattern><el_ignored>true</el_ignored></jsp-property-group2,<jsp-property-group><url-pattern>/scriptting_off/*</url-pattern><scripting-invalid>true</scripting-invalid></jsp-property-group><jsp-property-group><url-pattern>/EL_off/*</url-pattern><el_ignored>true</el_ignored></jsp-property-group> m3,<jsp-config><url-pattern>/scriptting_off/*</url-pattern><scripting-invalid>true</scripting-invalid><url-pattern>/EL_off/*</url-pattern><el_ignored>true</el_ignored></jsp-config> m4,<jsp-config><jsp-property-group><url-pattern>scriptting_off</url-pattern><scripting-invalid>true</scripting-invalid></jsp-property-group><jsp-property-group><url-pattern>EL_off</url-pattern><el_ignored>true</el_ignored></jsp-property-group></js 1

Q118. Stem text : Which of the following lines of code can be used for adding a pre-defined applet named chatApp to a JSP page? The chatApp class file is present in the /applets directory. M1,<jsp:plugin type="applet" code="chatApp.class" codebase="/applets" width="400" height = "300"></jsp:plugin> m2,<jsp:plugin type="applet" code="chatApp.class" codebase="applets" width="400" height = "300""></jsp:plugin> m3,<jsp:plugin type="applet" code="chatApp.class" codebase="/applets" width="400" height = "300"><jsp:plugin> m4,<jsp:plugin code="chatApp.class" codebase="/applets" width="400" height = "300></jsp:plugin> m 1

Page 25: jsp

Q119. Which of the following lines of code represents a JSP error page that displays the error message in green color? M1,<html><% exception.getMessage() %><body text = "green"><%@ page isErrorPage="true">The following error has been generated: <%= exception.getMessage() %></body></html> m2,<html><body text = "green"><%@ page isErrorPage="true"%>The following error has been generated: <%= exception.getMessage() %></body></html> m3,<html><body text = "green"><%@ page isErrorPage="true"%>The following error has been generated: <%= exception.Message() %></body></html> m4,<html><body><%@ page isErrorPage="true">The following error has been generated: <%= exception.getMessage() %></body></html> m 2

Q120. Stem text : Consider the following code snippet:

<%@ page language="java"%><html><head></head><body><%java.util.Date now=new java.util.Date(); %><H1><%= now.getHours() %>:<%=now.getMinutes()%>:<%=now.getSeconds()5%></H1></body></html>

What will be.1,It will display the date as mm:dd:yy. m2,It will display the date and time. m3,It will display time as hh/mm/ss. m4,It will display the current time as hh:mm:ss. M 4

Q121. Consider the following code snippet:<%@ page language="java"%><html><head></head><body><%java.util.Date now=new java.util.Date(); %><H1><%= now.getYear() %>/<%=now.getMonth()%>/<%=now.getDay()%></H1></body></html>What will be the output of the above code snippet.1, It will display the date as mm/dd/yy format. m2,It will display the date and time in dd/yy/mm format. m3, It will display the time as dd/mm/yy format. m4,It will display the current date in yy/mm/dd format. M 4

Page 26: jsp

Q122. Consider the code given below:<%@ page language="java"%><html><body><% String login=(request.getParameter("Login")); String password=(request.getParameter("Password"));for(int i=0;i<10;i++)out.println("Login is"+" "+login);out.println("Password is"+" "+password);}

1,Login message will be displayed ten times and Password message once. m2,Both login and password message will be displayed ten times. m3,Login Message will be displayed nine times and Password message once. m4,Both login and password message will be displayed nine times. M 1

Q123. John is developing a web application using Struts. He wants to check the input fields to ensure data integrity before the Action class is executed. Which of the following methods is used to check the input fields for any error? M1, execute m2, validate m3, findForward m4, init m 2

Q124. John is developing a web application using Struts. He wants to use the validate method to check for any errors in the form before calling the execute method. Which of the following object is passed an argument to the validate method and encapsulates the i1, HttpServletRequest m2, ActionMapping m3, ActionErrors m4, ActionError m

Q125. John is developing a web application using Struts. He wants to use the validate method to check for any errors in the form before calling the execute method. Which of the following object is the return value of the validate method? M1, HttpServletRequest m2, ActionMapping m3, ActionErrors m4, ActionError m 3

Q126. John is developing a web application using Struts. He wants to use the validate method to check for any errors in the form before calling the execute method. Which of the following attribute in the action tag of the Struts configuration file is set to true?1, type m2, input m3, path m4, validate m 4

Q127. John is developing a web application using Struts. He wants to use the validate method to check for any errors in the form before calling the execute method. If any error occurs, the ActionServlet dispatches to the form to correct the errors. Which of the1, type m2, input m3, path m4, validate m 2

Page 27: jsp

Q128. Which of the following tags of the Struts html Tag Library defines an HTML form? M1, form m2, img m3, link m4, image m 1

Q129. Which of the following tags of the Struts html Tag Library renders an HTML anchor tag? M1, form m2, img m3, link m4, image m 3

Q130. Which of the following tags of the Struts html Tag Library renders an image input element? M1, form m2, img m3, link m4, image m 4

Q131. Which of the following attributes in the action tag of the Struts configuration file specifies the resource that is providing the form for the Action? M1, name m2, scope m3, validate m4, input m 4

Q132. Which of the following attributes in the action tag of the Struts configuration file supplies the name of the form bean used by the Action? M1, name m2, scope m3, validate m4, input m 1

Q133. Predict the correct code for declaration of a form bean called employeeform in struts framework? M1,import org.apache.struts.action.ActionForm;public class employeeform implements ActionForm{//required code} m2,import org.apache.struts.action.ActionForm;public class employeeform extends ActionForm{//required code} m3,import org.apache.struts.ActionForm;public class employeeform extends ActionForm{//required code} m4,import org.apache.struts.action.ActionForm;public class employeeform {//required code} m

Page 28: jsp

Q134. Harry wants to create a form bean in struts framework. He wants to perform certain validation for that form bean. Which class he should use to create a form bean and which method he should use to perform the validations for the form bean? M1,ActionForm Class & doValidate() method m2,Action Class & Validate() method m3,ActionForm Class & validate() method m4,ActionForm Class & performValidations() method m 3

Q135. A Web application developed for an educational institution requires insertion of a header file comprising the logo and institution name. Identify the correct JSP tag from the options given below to add the logo and institution name to all pages of the Web.1,<form method="post" action="Header.html"> m2,<%@ include file="Header.html" %> m3,<jsp:forward page="Header.html"> m4,<%@ page import="Header.html" %> m 2

Q136. Consider the following statements:

A) doValidate() Method is used to perform validation of Form Fields.

B) Struts provides a mechanism to store form data into a javabeans instance.

C) Data Conversion can be performed by ActionForm Class.

D) The valida1,Statement A,B,C are true and D is false. m2,Statement A is False and B,C,D are true. m3,Statement A,B are true and C,D are False. m4,Statement A,B,D are true and C is False. M 2

Q137. You are establishing interconnection between two JSP pages. The names of the two pages are index.jsp and validate.jsp. You want to forward a request from index.jsp to validate.jsp in the same context. As well as you also want to send a parameter name, par1,<jsp: forward page="/validate.jsp"> <jsp: param name="param1" value="Login"/> </jsp:forward> m2,<jsp: @page="/validate.jsp> <jsp: param name="param1" value="Login"/> </jsp:forward> m3,<%@ forward page="/validate.jsp"> <jsp: param name="param1" value="Login"/> </jsp:forward> m4,<jsp: page="/Validate.jsp"> <jsp: param name="param1" value="Login"/> </jsp:forward> m 1

Q138. Which of the following is correct in reference to basic authentication technique? M1,It is an authentication technique of authenticating users before allowing them to access protected resources and the server enforces security through the Web browser. m2,It is an authentication technique which creates a customized logon page for a Web application. m3,It is an authentication techniques where the administrator specifies the Web pages that are to be secured on a website and the users that have the access to these Web pages. M4,It is an authentication technique in which the server authenticates a client by using digital certificates. M 1

Page 29: jsp

Q139. Which of the following is correct in reference to digest authentication technique? M1,It is an authentication technique of authenticating users before allowing them to access protected resources. m2,It is an authentication technique which creates a customized logon page for a Web application. m3,It is an authentication techniques where the administrator specifies the Web pages that are to be secured on a website and the users that have the access to these Web pages. Also the user information is encrypted before it is sent to the server. m4,It is an authentication technique in which the server authenticates a client by using digital certificates. M 3

Q140. Which of the following is correct in reference to Auditing security technique? M1,It secures Web applications by maintaining a record of the rights assigned to different types of Web users. m2,It ensures that data is not modified while being transferred between the server and the client. m3,It is the process of identifying a user. m4,It specifies the rights asssigned to an authenticated user to access resources of a Web application. M 1

Q141. Which of the following is correct in reference to Authorization security technique? M1,It secures Web applications by maintaining a record of the rights assigned to different types of Web users. m2,It is the process of identifying a user. m3,It ensures that data is not modified while being transferred between the server and the client. m4,It specifies the rights asssigned to an authenticated user to access resources of a Web application. M 4

Q142. Which of the following is correct in refrence to the doAfterBody() method? M1,It is used in empty tags to direct the JSP engine to skip the body of the tag and subsequently invoke the next doEndTag() method. m2,It is invoked after completion of the evaluation of the body tag. m3,It performs post tag tsks, such as writing the output and closing the database connection. m4,It is used to direct the JSP engine to process the body of a tag. M 2

Q143. You are creating a secure web application which is deployed on the J2EE application server. You want to specify the authentication technique which creates a customized logon page for a Web application. Which of the following code snippet will you use to.1,<login-config><auth-method>BASIC</auth-method><realm-name>Secure Basic Authentication</realm-name></login-config> m2,<login-config><auth-method>FORM</auth-method><realm-name>Secure Form Authentication</realm-name></login-config> m3,<login-config><auth-method>DIGEST</auth-method><realm-name>Secure Digest Authentication</realm-name></login-config> m4,<login-config><auth-method>CLIENT-CERT</auth-method><realm-name>Certificate</realm-name></login-config> m 2

Page 30: jsp

Q144. You are creating a secure web application which is deployed on the J2EE application server. You want to specify the authentication technique in which the server authenticates a client by using digital certificates. Which of the following code snippet will1,<login-config><auth-method>BASIC</auth-method><realm-name>Secure Basic Authentication</realm-name></login-config> m2,<login-config><auth-method>FORM</auth-method><realm-name>Secure Form Authentication</realm-name></login-config> m3,<login-config><auth-method>DIGEST</auth-method><realm-name>Secure Digest Authentication</realm-name> m4,<login-config><auth-method>CLIENT-CERT</auth-method><realm-name>Certificate</realm-name></login-config> m 4

Q145. Sam is creating a secure J2EE Web application. He wants to map roles with the list of users created in the J2EE application server. Which of the following code snippet will Sam use that map the user 'James' with the role 'Admin' ? m1,<security-role-ref><role-name>Admin</role-name><role-link>James</role-link></security-role-ref> m2,<security-role><role-name>Admin<role-link>James</role-link></role-name></security-role-ref> m3,<security-role><role-name>Admin</role-name><role-link>James</role-link></security-role-ref> m4,<security-role-ref><role-name>Admin<role-link>James</role-link></role-name></security-role-ref> m 1Q146. Consider the following steps:Step 1: Open the sun-web.xml file for the Secure_Form_App application.Step 2: Select the User node.Step 3: Expand the Sun Web Application node in the right panel of the sun-web.xml file.Step 4: Type Use in the Group Name t.1,Step 1 --> Step 3 --> Step 2 --> Step 5 --> Step 4 --> Step 6 m2,Step 1 --> Step 2 --> Step 3 --> Step 5 --> Step 4 --> Step 6 m3,Step 1 --> Step 3 --> Step 2 --> Step 4 --> Step 5 --> Step 6 m4,Step 1 --> Step 2 --> Step 3 --> Step 4 --> Step 5 --> Step 6 m 1

Page 31: jsp

Q147. Consider the following steps:Step 1: Open the web.xml file for the Secure_Form_App application, in NetBeans IDE and click the security tab.Step 2: Type User in the Role Name text box.Step 3: Select the Add button under the Security Role category.Step

1,Step 1 --> Step 2 --> Step 3 --> Step 4 --> Step 5 m2,Step 1 --> Step 3 --> Step 2 --> Step 4 --> Step 5 m3,Step 1 --> Step 3 --> Step 4 --> Step 2 --> Step 5 m4,Step 1 --> Step 2 --> Step 4 --> Step 3 --> Step 5 m 2

Page 32: jsp
Page 33: jsp