Está en la página 1de 40

S No Question Option 1

Which of the following Java EE containers


manages the execution of JSP page and servlet
JMT1001 components for Java EE applications? m 1, EJB container m
Which of the following Java EE containers
manages the execution of enterprise beans for
JMT1002 Java EE applications? m 1, EJB container m
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
JMT1003 server? m 1, Web application m

Which of the following is a canonical name that


JMT1004 locates a specific resource on the Internet? m 1, Web application m
Which of the following is referred to as a stateless
protocol and supports only one request per
JMT1005 connection? m 1, Web application m
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
JMT1006 use for the server-side programming? m 1, CGI m

You have to design a web application for a car


manufacturing company. The business logic of
the web application should be written in the Java
technology code and the processing of the client
request is to be done as a thread in the web
JMT1007 container. Which of 1, CGI m

You have to design a web application for a car


manufacturing company. The presentation logic of
the web application should be an HTML page
containing Java technology code in it. Which of
following should you use to design the web pages
JMT1008 containing the pres 1, CGI m

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
JMT1009 model with the form 1, Servlet m

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
JMT1010 retrieving data from the model n 1, Servlet m
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
JMT1011 the components availab 1,JSP m

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
JMT1012 the static and dy 1,EJB m

Assertion: JSP supports features of servlets, such


as platform independence, creation of database-
driven Web applications, and server side
programming capabilities, etc. 1,BOTH the assertion and
Reason: A JSP page after compilation generates reason are TRUE statements
a servlet and the reason is the correct
JMT1013 Which of the following optio explanation of the assertion. M

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
JMT1014 and can be perceive 1,Model element m

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
JMT1015 addressing them int 1,Controller m

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
JMT1016 the responsibility 1, Strategic management m

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
JMT1017 of designing the Web application? m 1, Chief Executive Officer m
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
JMT1018 cleaners ensu 1, Adaptive organizations m
Allianz Corporation started a new insurance
scheme which would provide accidental coverage
to the people insured under this scheme. Allianz 1, Manufacturing-based
JMT1019 is a ____________ . m organization m
Nicole manages a social service centre. Her
__________ provides education and food to the
JMT1020 poor children free of cost. m 1, Adaptive organization m
Which of the following prevent unauthorized
modification, destruction, or disclosure of the data
JMT1021 in an enterprise? m 1, Data warehouse m

Which of the following provides an integrated


solution to plan, schedule, and control pre-sales 1, Enterprise Resource
JMT1022 and post-sales activities in an organization? m Planning m
Which of the following business process plans,
manages, and review performance of the
JMT1023 employees? m 1, Finance and Accounting m
In which stage of Business Process Management,
the business process experts review the problem
areas and evaluate the end-to-end processes of
JMT1024 the organization? m 1, Monitoring m
Which of the following supports what-if analysis? 1, Supply Chain Management
JMT1025 m System m

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 1, Transaction Processing
JMT1026 be used to fulfill Systems m

GGN Construction wants to keep track of the


valuation of their property and its depreciation.
Which of the following business process would
JMT1027 help the management to perform this activity? m 1, Sales and marketing m

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 marksheets. Then 1, Continuous process
JMT1028 the stu improvement m
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 1, Purchase and procurement
JMT1029 in this situation? m m

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 1, Enterprise resource planning
JMT1030 components for providing data ca m

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
JMT1031 the customers. Which key a 1, Intangible m
A salesperson delivers the products to his
customer. During delivery of the product, which
two databases need to be updated 1, Invoice and Inventory
JMT1032 simultaneously? m database m

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
JMT1033 focused in the preceding situation? m 1, Profile m

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
JMT1034 huge demand for the product in the market? m 1, Push marketing m
When a sale transaction happens, a number of
documents are exchanged between the buyer 1, I) Quotation
and seller. Identify the correct sequence in which II) Purchase Order
JMT1035 the documents are exchanged? m III) Invoice m
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 1, By extending the servlet
from the client. How can he create a servlet for class with the HttpServlet
JMT1036 the web application? m class. m

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 1,
response sent from the server to the browser is response.setContentType("text
JMT1037 intended for a s /html"); m
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 1,
browser should not reuse the response for a response.setContentType("text
JMT1038 subsequent request w /html"); m

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, 1, <form
create_form.do, to accept input from the user. He action='create_form.do'
JMT1039 needs to make sure method='POST'> m

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, 1, <form
create_form.do, to accept input from the user. He action='create_form.do'
JMT1040 needs to make sure method='POST'> m
Which of the following HTTP methods is identical
to the GET except that it does not return a
JMT1041 message-body, only the headers? m 1, HEAD m
Which of the following HTTP methods request for
the communication options available on the
JMT1042 request/response chain? m 1, HEAD m
Which of the following HTTP methods request for
the server to invoke an application-layer loop-
JMT1043 back of the request message? m 1, HEAD m
Which of the following HTTP methods is reserved
for use with a proxy that can switch to being a
JMT1044 tunnel? m 1, HEAD m
Which of the following HTTP methods request for
the server to store the entity enclosed in the body
JMT1045 of the HTTP message? m 1, HEAD m

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. 1,HttpServletResponse
JMT1046 Steve is not able interface m

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
JMT1047 Servl 1,3 m
Assertion: A change made to any code requires
recompilation of the servlet.
Reason: Servlets tie up files (an HTML file for the 1,BOTH the assertion and
static content and a Java file for the dynamic reason are TRUE statements
content) to independently handle the static and the reason IS the correct
JMT1048 presentation logic and the dynamic explanation of the assertion. m

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
JMT1049 method from the RequestDispatche 1,request m

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">
JMT1050 <input ty 1,Welcome to the web site. m

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 1, By overriding the service
JMT1051 servlet has initiali method in the servlet class. m

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 1, By overriding the service
JMT1052 initialization of the ser method in the servlet class. m

You have created a soccer league web 1, <servlet-mapping>


application using servlets. After the web <servlet-
application has been created, you run the name>AddLeagueForm</servl
add_league servlet using the following address:
et-name>
<url-
http://localhost:8080/soccer/admin/add_league.vi pattern>/localhost:8080/add_le
ew ague.view</url-pattern>
</servlet-mapping>
JMT1053 What should the corresponding cod m
1, <servlet>
<servlet-
name>AddLeagueForm</servl
et-name>
<servlet-
class>sl314.view.AddLeagueF
ormServlet</servlet-class>
<param-name>seasons-
You have created the AddLeagueForm servlet list</param-name>
that includes a single initialization parameter <param-
called seasons-list with the value Spring, value>Spring,Summer,Autumn,
Summer, Autumn, Winter. This configuration Winter</param-value>
object is passed to the servlet instance by way of </init-param>
JMT1054 the init method, which is s </servlet> m
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 1, Calling the service method
JMT1055 cycle? m m
The life cycle of the servlet involves loading the
servlet class, creating the servlet instance and
then initializing the servlet component. What will 1, Calling the service method
JMT1056 the next step of the servlet life cycle? m m

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
JMT1057 specified in th 1, Servlet m
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
JMT1058 implement this? m 1, Servlet m

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
JMT1059 initialization? m 1, Servlet m

1, <servlet>
<servlet-
name>AddEmpForm</servlet-
You, being a software developer, needs to name>
develop a web application for your organization. <servlet-
You decided to use servlets to create the web class>view.AddEmpFormServl
application. You created a form, et</servlet-class>
AddEmpFormServlet.java to add the details of the </servlet>
JMT1060 new employees and complied it. The c m
Which of the following methods is used to store
the context-scoped attributes in the
JMT1061 ServletContext object? m 1, init(ServletConfig) m

Which of the following method is used to retrieve


JMT1062 the servlet's initialization parameters? m 1, init(ServletConfig) m

Which of the following method is used to retrieve


JMT1063 the attributes from the ServletContext object? m 1, init(ServletConfig) m
Which of the following is the run time
JMT1064 representation of the web application? m 1, init m
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
JMT1065 servlet? m 1, init m

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

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

While developing a web application using Struts, 1, <servlet-mapping>


you configured the Struts ActionServlet in the <servlet-name>Action</servlet-
web.xml deployment descriptor. The ActionServlet name>
is given the name FrontController. You are also <url-pattern>*.do</url-pattern>
required to configure the URL pattern that maps </servlet-mapping>
JMT1068 to the Action m
1, <action-mappings>
<action path="/add_dvd"
type="com.dvd.controller.AddD
While developing a web application using Struts, VDAction">
you are required to configure the Struts <forward name="error"
configuration file, struts-config.xml. You have to path="/add_dvd.view"/>
declare two forward entries, success and error </action>
within the /add_dvd action. For this purpose, the </action-mappings>
JMT1069 following code i m

1, <action-mappings>
<action
path="/admin/add_league"
type="sl314.controller.AddLeag
ueAction">
<forward name="success"
While developing a web application using Struts, path="/admin/success.view"/>
you are required to configure the Struts <forward name="error"
configuration file, struts-config.xml. You have to path="/admin/add_league.view
declare two forward entries, success and error "/>
within the /admin/add_league action. For this </action>
JMT1070 purpose, the followi </action-mappings> m
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
JMT1071 infrastructure controller? m 1, web.xml m
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
JMT1072 the action mappings? m 1, web.xml m

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
JMT1073 primary subtag to the root tag of this file? m 1, action-mappings m

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
JMT1074 att 1, action-mappings m
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
JMT1075 the sy 1, action-mappings m

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
JMT1076 representation o 1, ActionMapping m

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
JMT1077 method and i 1, ActionMapping m

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
JMT1078 method? 1, ActionMapping m

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
JMT1079 method and 1, ActionMapping m

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
JMT1080 method and i 1, ActionMapping m
Which of the following tag is NOT a part of the
JMT1081 web.xml file? m 1, servlet m
Which of the following tag is NOT a part of the
JMT1082 struts-config file? m 1, action m
Which of the following directory is used to install
JMT1083 struts library file? m 1, /WEB-INF/lib/ m
Which of the following is NOT a part of the
JMT1084 Analysis Model components? m 1, Boundary m

Which of the following tag is used to specify the


JMT1085 initialization parameters in the web.xml file? m 1, init-param m
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
JMT1086 implement or extend whi 1, FilterConfig m

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
JMT1087 container instantiates a 1, init m

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
JMT1088 FilterConfig object and 1, init m

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
JMT1089 intercepted by the fil 1, init m

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
JMT1090 service method and is 1, init m

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
JMT1091 on the user's 1, getCookie m

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> 1,First>Second>Third>Fourth
JMT1092 <servl m
A code for filter mapping has to be written for a 1,<filter-mapping>
filter called Login Filter for components in such a <filter-name>LoginFilter</filter-
manner that it should be applied to component name>
whenever an error occurs . <dispatcher>ERROR</dispatch
Predict the code for filter mapping to perform the er>
JMT1093 required task from the follo </filter-mapping> m

1,String
login=request.getParameter("lo
gin");
if(login.equals("tim")
{
return
Stem text : Consider the following code regarding mapping.Forward("error");
accessing of session attributes in a session }
management program. But this program has few if(login.equals("David")
errors. Predict the correct code for the program. {
return
String login=request.getParameterValue("login"); mapping.Forward("success");
JMT1094 if(login.equals }m

Stem text : You have deployed two servlets


named servlet1 and servlet2 in your Web server.
You want to create an attribute called 1,ServletContext
"customernumber" and assign the value of a c=getServletContext();
variable cnum to it. Which of the following is the c.setAttribute(cnum,"customern
JMT1095 correct method for doing it? m umber"); m

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
JMT1096 database URL 1, JDBC API m

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
JMT1097 shared among data access 1, JDBC API m

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
JMT1098 in your ap 1, java.sql m
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. Which of
JMT1099 the foll 1, getConnection m

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
JMT1100 connect 1, JDBC API m

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.
1,Statement A,B,C are true
JMT1101 Statement C: and Statement D is False. m

1,<resorurce-ref>
<res-ref-
name>jdbc/passworddb</res-
ref-name>
<res-
type>javax.sql.DataSource</re
s-type>
A Datasource reference for a datasource called <res-auth>Container</res-
passworddb has to be defined in a deployment auth>
JMT1102 descriptor file. What would be the code for this? m </resource-ref m

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.

JMT1103 3) import the javax.sq 1,1>2>3>4 m

1,Context mycontext= new


Context();
DataSource ds=
What would be code for locating a Datasource (DataSource)mycontext.lookup
named myDB thru JNDI Context named ("java:comp/env/jdbc/myDB");
JMT1104 mycontext? m m
1,<resource-ref>
<description>
Stem text : Consider the following lines of code in </description>
web.xml file regarding defining of DataSource <res-ref-
reference: name>jdbc/myDB</res-ref-
name>
<resource-ref> <res-
<description> type>javax.sql.DataSource</re
</description> s-type>
<res-refname>jdbc/myDB<resref-name> <res-auth>container</res-
<res-type>java.sql.DataSource</res-type> auth>
JMT1105 <res-auth>container<res </resource-ref> m

Which of the following JSP page implicit variable


represents the JspWriter object associated with
JMT1106 the output stream of the response? m 1, application m
Which of the following JSP page implicit variable
represents the Throwable object that was thrown
JMT1107 by some other JSP page? m 1, application m

Which of the following JSP page implicit variable


represents the ServletConfig object associated
JMT1108 with the servlet for this JSP page? m 1, application m
Which of the following attributes of the page
directive defines the MIME type of the output
JMT1109 stream? m 1, buffer m

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
JMT1110 that affects the overall translati 1, Directive Tag m

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
JMT1111 members in the JSP servlet class, eith 1, Directive Tag m

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
JMT1112 developer include arbitrary Java tech 1, Directive Tag m

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
JMT1113 expression that is evaluated duri 1, Directive Tag m
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
JMT1114 evaluate an e 1, set m
Which of the following JSP page implicit variable
represents the ServletContext object for the web
JMT1115 application? m 1, application m

Stem text : Consider the usage of JSTL forEach


tag in the following code snippet.

<font color='green'>
<ul>
<c:foreach flag=errmsg items="${errorMsgs}"> 1,<font color='green'>
<li>$errmsg</li> <ul>
</c:forEach> <c:forEach var=errmsg
</ul> items="${errorMsgs}">
</font> <li>$errmsg</li>
</c:forEach>
The code snippet contains some errors Predict </ul>
JMT1116 the corre </font> m

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. 1,Statement A,B, and C are
JMT1117 C) The Result of the true. m

Stem text : Consider the following statements:

A) Declaration tag can override jspInit() Method


B) Declaration tag can not override jspDestroy()
Method
C) Declaration tag can override _jspService()
Method 1,Statement A, B, C are true
JMT1118 D) Declaration tag can include attributes & metho and D is False. m
1,<jsp:useBean id="login"
scope="Session"
Stem text : Consider the following code snippet of class="s1314.beans.LoginBea
JSP Bean that contains few errors. Predict the n">
Correct Code. <%
login.setValue(request.getPara
<jsp:usebean identity="login" scope="Session" meter("Loginid"));
class=s1314.beans.LoginBean> login.setAddress(request.getPa
<%! rameter("address"));
login.setValue(request.getParameter("Loginid")); %>
JMT1119 login.setAddre </jsp:useBean> m

1,<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-
While configuring the JSP Environment you want pattern>
to turn off scripting as well as ignore EL in jsp file. <el_ignored>true</el_ignored>
JMT1120 What would be the code for this? m </jsp-property-group
Stem text : Which of the following lines of code 1,<jsp:plugin type="applet"
can be used for adding a pre-defined applet code="chatApp.class"
named chatApp to a JSP page? codebase="/applets"
The chatApp class file is present in the /applets width="400" height = "300">
JMT1121 directory. m </jsp:plugin> m

1,<html>
<% exception.getMessage()
%>
<body text = "green">
<%@ page
isErrorPage="true">
The following error has been
Which of the following lines of code represents a generated: <%=
JSP error page that displays the error message in exception.getMessage() %>
JMT1122 green color? m </body></html> m
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>
1,It will display the date as
JMT1123 What will b mm:dd:yy. m

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> 1, It will display the date as
JMT1124 What will be the output of the abo mm/dd/yy format. m

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++) 1,Login message will be
out.println("Login is"+" "+login); displayed ten times and
JMT1125 out.println("Passwo Password message once. m
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
JMT1126 the input fields for any error? m 1, execute m

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
JMT1127 encapsulates the i 1, HttpServletRequest m
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
JMT1128 value of the validate method? m 1, HttpServletRequest m

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
JMT1129 tru 1, type m

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
JMT1130 of the 1, type m
Which of the following tags of the Struts html Tag
JMT1131 Library defines an HTML form? m 1, form m
Which of the following tags of the Struts html Tag
JMT1132 Library renders an HTML anchor tag? m 1, form m

Which of the following tags of the Struts html Tag


JMT1133 Library renders an image input element? m 1, form m
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?
JMT1134 M 1, name m
Which of the following attributes in the action tag
of the Struts configuration file supplies the name
JMT1135 of the form bean used by the Action? m 1, name m

1,import
org.apache.struts.action.Action
Form;
public class employeeform
implements ActionForm
{
Predict the correct code for declaration of a form //required code
JMT1136 bean called employeeform in struts framework? m } m

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? 1,ActionForm Class &
JMT1137 m doValidate() method m
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 1,<form method="post"
JMT1138 of the Web action="Header.html"> m

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.
1,Statement A,B,C are true
JMT1139 D) The valida and D is false. M

You are establishing interconnection between two 1,<jsp: forward


JSP pages. The names of the two pages are page="/validate.jsp">
index.jsp and validate.jsp. You want to forward a <jsp: param
request from index.jsp to validate.jsp in the same name="param1"
context. As well as you also want to send a value="Login"/>
JMT1140 parameter name, par </jsp:forward> m

1,It is an authentication
technique of authenticating
users before allowing them to
access protected resources
and the server enforces
Which of the following is correct in reference to security through the Web
JMT1141 basic authentication technique? M browser. m

1,It is an authentication
technique of authenticating
Which of the following is correct in reference to users before allowing them to
JMT1142 digest authentication technique? m access protected resources. m

1,It secures Web applications


by maintaining a record of the
Which of the following is correct in reference to rights assigned to different
JMT1143 Auditing security technique? m types of Web users. m
1,It secures Web applications
by maintaining a record of the
Which of the following is correct in reference to rights assigned to different
JMT1144 Authorization security technique? m types of Web users. m
1,It is used in empty tags to
direct the JSP engine to skip
the body of the tag and
Which of the following is correct in refrence to the subsequently invoke the next
JMT1145 doAfterBody() method? m doEndTag() method. m

You are creating a secure web application which 1,<login-config>


is deployed on the J2EE application server. You <auth-method>BASIC</auth-
want to specify the authentication technique method>
which creates a customized logon page for a Web <realm-name>Secure Basic
application. Which of the following code snippet Authentication</realm-name>
JMT1146 will you use to c </login-config> m

You are creating a secure web application which 1,<login-config>


is deployed on the J2EE application server. You <auth-method>BASIC</auth-
want to specify the authentication technique in method>
which the server authenticates a client by using <realm-name>Secure Basic
digital certificates. Which of the following code Authentication</realm-name>
JMT1147 snippet will </login-config> m

Sam is creating a secure J2EE Web application. 1,<security-role-ref>


He wants to map roles with the list of users <role-name>Admin</role-
created in the J2EE application server. Which of name>
the following code snippet will Sam use that map <role-link>James</role-link>
JMT1148 the user 'James' with the role 'Admin' ? m </security-role-ref> m

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 1,Step 1 --> Step 3 --> Step 2
the right panel of the sun-web.xml file. --> Step 5 --> Step 4 --> Step 6
JMT1149 Step 4: Type Use in the Group Name t m

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. 1,Step 1 --> Step 2 --> Step 3
JMT1150 Step --> Step 4 --> Step 5 m
Option 2 Option 3 Option 4 Solution

3, Application client container


2, Web container m m 4, Applet container m 2

3, Application client container


2, Web container m m 4, Applet container m 1

2, Web site m 3, URL m 4, HTTP m 2

2, Web site m 3, URL m 4, HTTP m 3

2, Web site m 3, URL m 4, HTTP m 4

2, Servlet m 3, JSP m 4, HTML m 1

2, Servlet m 3, JSP m 4, HTML m 2

2, Servlet m 3, JSP m 4, HTML m 3

2, JSP page m 3, Java technology classes m 4, HTML m 1

2, JSP page m 3, Java technology classes m 4, HTML m 2


2,EJB m 3,Servlet m 4,RMI m 3

2,HTML m 3,JSP m 4,ASP m 3

2,BOTH the assertion and


reason are TRUE statements,
but the reason IS NOT a 3,The assertion is TRUE but 4,The assertion is FALSE
correct explanation of the the reason is a FALSE hence the reason DOES NOT
assertion. m statement. m apply. m 1

4,A combination of these


2,View element m 3,Controller element m elements m 2

2,View m 3,Model m 4,Component m 1

3, Both operational and


2, Middle management m strategic management m 4, Operational management m 2

2, Senior Management m 3, Architects m 4, Enterprise Engineers m 3


3, Nonadaptive organizations
2, Simple organizations m m 4, Complex organizations m 2

2, Service-based organization
m 3, Complex organization m 4, Simple organization m 2

3, Non-profit-based 4, Service-based organization


2, Simple organization m organization m m 3

4, Front-end interface design


2, Data mart m 3, Network security layers m tools m 3

2, Customer Relationship 3, Supply Chain Management 4, Transaction Processing


Management m m Systems m 2

3, Manufacturing and
2, Sales and Marketing m Production m 4, Human Resource m 4

2, Analyzing m 3, Improving m 4, Implementing m 2


2, Enterprise Resource 3, Management Information
Planning Systems m Systems m 4, Decision Support Systems m 4

2, Business Intelligence 3, Management Information 4, Customer Relationship


Systems m Systems m Management System m 2

3, Manufacturing and
2, Finance and accounting m production m 4, Human resource m 2

2, Continuous performance 3, Business process 4, Business performance


improvement m reengineering m reengineering m 1
4, Infrastructure development
2, Human resource m 3, IT support m m 1

2, Transaction processing 3, Supply chain management 4, Customer relationship


systems m m management m 1

4, Both perishable and


2, Perishable m 3, Workforce intensive m intangible m 3

2, Invoice and Order detail 3, Inventory and Order detail 4, Quotation and Inventory
database m database m database m 1

2, Demographics m 3, Psychographic m 4, Buying decisions m 3

2, Target market identification


m 3, Market segmentation m 4, Pull marketing m 4

2, I) Invoice 3, I) Invoice 4, I) Quotation


II) Quotation II) Purchase order II) Invoice
III) Purchase Order m III) Quotation m III) Purchase Order m 1

3, By extending the servlet 4, By extending the servlet


2, By extending the servlet class with the class with the
class with the HttpServletRequest interface. HttpServletResponse interface.
ListLeagueServlet class. m m m 1

2, 3, 4,
response.setHeader("Cache- response.setHeader("Cache- response.setHeader("Cache-
Control", "no-cache"); m Control", "private"); m Control", "cache"); m 3
2, 3, 4,
response.setHeader("Cache- response.setHeader("Cache- response.setHeader("Cache-
Control", "no-cache"); m Control", "private"); m Control", "cache"); m 2

2, <form 3, <form 4, <form


action='create_form.do' method='create_form.do' method='create_form.do'
method='GET'> m action='POST'> m action='GET'> m 2

2, <form 3, <form 4, <form


action='create_form.do' method='create_form.do' method='create_form.do'
method='GET'> m action='POST'> m action='GET'> m 1

2, OPTIONS m 3, TRACE m 4, CONNECT m 1

2, OPTIONS m 3, TRACE m 4, CONNECT m 2

2, OPTIONS m 3, TRACE m 4, CONNECT m 3

2, OPTIONS m 3, TRACE m 4, CONNECT m 4

2, OPTIONS m 3, TRACE m 4, PUT m 4

2,HttpServletRequest interface
m 3,ServletConfig class m 4,HttpServlet class m 2

2,2 m 3,4 m 4,1 m 3


2,BOTH the assertion and
reason are TRUE statements,
but the reason IS NOT a 3,The assertion is TRUE but 4,The assertion is FALSE
correct explanation of the the reason is a FALSE hence the reason DOES NOT
assertion. m statement. m apply. m 1

2,include m 3,response m 4,forward m 4

4,The code will not compile


2,Invalid Password. m 3,No such User. m successfully. m 3

2, By overriding the init method 3, By overriding the destroy 4, By overriding the doGet
in the servlet class. m method in the servlet class. m method in the servlet class. m 3

2, By overriding the init method 3, By overriding the destroy 4, By overriding the doGet
in the servlet class. m method in the servlet class. m method in the servlet class. m 2

2, <servlet-mapping> 3, <servlet-mapping> 4, <servlet-mapping>


<servlet- <servlet- <servlet-
name>AddLeagueForm</servl name>AddLeagueForm</servl name>AddLeagueForm</servl
et-name> et-name> et-name>
<url- <url- <url-
pattern>/localhost/add_league. pattern>http/add_league.view< pattern>/admin/add_league.vie
view</url-pattern> /url-pattern> w</url-pattern>
</servlet-mapping> </servlet-mapping> </servlet-mapping>
m m m 4
3, <servlet>
<servlet-
2, <servlet> name>AddLeagueForm</servl 4, <servlet>
<servlet- et-name> <servlet-
name>AddLeagueForm</servl <servlet- name>AddLeagueForm</servl
et-name> class>sl314.view.AddLeagueF et-name>
<servlet- ormServlet</servlet-class> <servlet-
class>sl314.view.AddLeagueF <init-param> class>sl314.view.AddLeagueF
ormServlet</servlet-class> <param-name>seasons- ormServlet</servlet-class>
<param-name>seasons- list</param-name> <init-param>
list</param-name> <param- <param-
<param- value>Spring,Summer,Autumn, value>Spring,Summer,Autumn,
value>Spring,Summer,Autumn, Winter</param-value> Winter</param-value>
Winter</param-value> </init-param> </init-param>
</servlet> </servlet> </servlet>
m m m 3

3, Calling the destroy method


2, Calling the init method m m 4, Calling the servlet method m 2

3, Calling the destroy method


2, Calling the init method m m 4, Calling the servlet method m 1

2, ServletConfig m 3, ServletContext m 4, ServletContextListener m 2

2, ServletConfig m 3, ServletContext m 4, ServletContextListener m 3

2, ServletConfig m 3, ServletContext m 4, ServletContextListener m 4

2, <servlet> 3, <servlet> 4, <servlet>


<servlet- <servlet- <servlet-
name>AddEmpForm</servlet- name>AddEmpForm</servlet- name>AddEmpForm</servlet-
name> name> name>
<servlet- <servlet- <servlet-class>WEB-
class>AddEmpFormServlet</s class>classes.view.AddEmpFo INF.view.AddEmpFormServlet
ervlet-class> rmServlet</servlet-class> </servlet-class>
</servlet> </servlet> </servlet>
m m m 1
2, setAttribute m 3, getInitParameter m 4, ContextInitialized m 2

2, setAttribute m 3, getInitParameter m 4, ContextInitialized m 3

2, getAttribute m 3, getInitParameter m 4, ContextInitialized m 2

2, service m 3, ServletContext m 4, Servlet m 3

2, service m 3, ServletContext m 4, Servlet m 2

2, <init-param> 3, <init-param> 4, <init-param>


<param-name>config</param- <name>config</name> <param-name>config</param-
name> <param-value>/WEB- name>
<param-value>/WEB- INF/struts-config.xml</param- <param-value>struts-
INF</param-value> value> config.xml</param-value>
</init-param> </init-param> </init-param>
m m m 1

2, <servlet- 4, <servlet-
name>FrontController</servlet- 3, <servlet- name>FrontController<servlet-
name> name>FrontController</servlet- name>
<servlet-class> name> <class>
org.apache.struts.action.Action <servlet-class> org.apache.struts.action.Action
Servlet struts.action.ActionServlet Servlet
</servlet-class> <servlet-class> <class>
m m m 2

2, <servlet-mapping> 3, <servlet-mapping>
<servlet- <servlet- 4, <servlet-mapping>
name>FrontController</servlet- name>FrontController</servlet- <servlet-name>Action</servlet-
name> name> name>
<url-pattern>.do<url-pattern> <url-pattern>*.do</url-pattern> <url-pattern>.do</url-pattern>
</servlet-mapping> </servlet-mapping> </servlet-mapping>
m m m 3
4, <action-mappings>
<action path="/add_dvd"
2, <action-mappings> type="com.dvd.controller.AddD
<action path="/add_dvd"> VDAction">
<forward <forward
name="success" 3, <action-mappings> name="success"
path="/success.view"/> <action path="/add_dvd" path="/success.view"/>
<forward name="error" type="com.dvd.controller.AddD <forward name="error"
path="/add_dvd.view"/> VDAction"> path="/add_dvd.view"/>
</action> </action> </action>
</action-mappings> </action-mappings> </action-mappings>
m m m 4

3, <action-mappings> 4, <action-mappings>
<action <action
2, <action-mappings> path="add_league" path="/add_league"
<action type="sl314.controller.AddLeag type="sl314.controller.AddLeag
path="/admin/add_league"> ueAction"> ueAction">
<forward name="success" <forward name="success" <forward name="success"
path="/admin/success.view"/> path="/admin/success.view"/> path="/admin/success.view">
<forward name="error" <forward name="error" <forward name="error"
path="/admin/add_league.view path="/admin/add_league.view path="/admin/add_league.view
"/> "/> ">
</action> </action> </action>
</action-mappings> m </action-mappings> m </action-mappings> m 1

2, list_leagues.do m 3, struts-config.xml m 4, form.do m 1

2, list_leagues.do m 3, struts-config.xml m 4, form.do m 3

2, forward m 3, action m 4, struts-config m 1

2, forward m 3, action m 4, struts-config m 3


2, forward m 3, action m 4, struts-config m 2

2, ActionForward m 3, ActionForm m 4, Action m 1

2, ActionForward m 3, ActionForm m 4, Action m 1

2, ActionForward m 3, ActionForm m 4, Action m 2

2, ActionForward m 3, ActionForm m 4, Action m 3

2, ActionForward m 3, HttpServletRequest m 4, HttpServletResponse m 3

2, action m 3, param-name m 4, param-value m 2

2, forward m 3, action-mappings m 4, servlet-name m 4

2, /WEB-INF/ m 3, /WEB-INF/web/ m 4, /WEB-INF/model/ m 1

2, Service m 3, Entity m 4, Action m 4

2, servlet m 3, servlet-mapping m 4, url-pattern m 1


2, Filter m 3, FilterChain m 4, PerformanceFilter m 2

2, doFilter m 3, destroy m 4, doGet m 1

2, doFilter m 3, destroy m 4, doGet m 1

2, doFilter m 3, destroy m 4, doGet m 2

2, doFilter m 3, destroy m 4, doGet m 2

2, addCookie m 3, addSession m 4, getSession m 2

2,Third>Fourth>First>Second 3,Fourth>Third>Second>First 4,Second>First>Fourth>Third


m m m 2
2,<filter-mapping> 3,<filter-mapping> 4,<filter-mapping>
<filter-name>LoginFilter</filter- <filter-name>LoginFilter</filter- <filter-name>LoginFilter</filter-
name> name> name>
<url-pattern>*.do</url-pattern> <dispatcher>ERROR</dispatch <url-pattern>*.do</url-pattern>
<dispatcher>ERROR<dispatch er> <dispatcher>dispatcher.ERRO
er> <url-pattern>*.do</url-pattern> R</dispatcher>
</filter-mapping> m </filter-mapping> m </filter-mapping> m 2

3,String 4,String
2,String login=request.getParameterVal login=request.getParameter("lo
login=request.getParameter("lo ue("login"); gin");
gin"); if(login.equals("tim") if(login.equals("tim")
if(login.equals("tim") { {
{ return return
return mapping.findForward("error"); mapping.findForward("error");
mapping.findForward(error); } }
} if(login.equals("David") if(login.equals("David")
if(login.equals("David") { {
{ return return
return mapping.findForward("success mapping.findForward("success
mapping.findForward(success); "); ");
}m }m }m 4

2,ServletConfig 3,ServletContext 4,ServletConfig


c=getServletConfig(); c=getServletContext() c=getServletConfig();
c.setAttribute(cnum,"customern c.setAttribute("customernumbe c.setAttribute("customernumbe
umber"); m r", cnum) m r", cnum); m 3

2, DataSource m 3, Connection Pooling m 4, DAO m 2

2, DataSource m 3, Connection Pooling m 4, DAO m 3

2, javax.sql m 3, java.io m 4, javax.servlet m 2


2, close m 3, lookup m 4, prepareStatement m 1

2, java.sql package m 3, Connection Pooling m 4, Context object m 1

2,Statement A,B,D are true 3,Statement B,C,D are true 4,Statement A,B are true and
and Statement C is False. m and Statement A is False. m Statement C,D are False. m 2

4,<resorurce-ref>
2,<resorurce-ref> 3,<resorurce-ref> <res-ref-
<resname>jdbc/passworddb</r <res-ref- name>"jdbc/passworddb"<res-
esname> name>jdbc/passworddb<res- ref-name>
<res- ref-name> <res-
type>javax.sql.DataSource</re <respackage>javax.sql.DataSo type>"javax.sql.DataSource"</r
s-type> urce</respackage> es-type>
<res-auth>Container</res- <res-auth>Container</res- <res-auth>Container</res-
auth> auth> auth>
</resource-ref> m </resource-ref> m </resource-ref> m 1

2,4>2>3>1 m 3,3>2>4>1 m 4,3>2>1>4 m 3

3,Context mycontext= new


2,Context mycontext= new InitialContext(); 4,Context mycontext= new
InitialContext(); DataSource ds= InitialContext();
DataSource ds= (DataSource)mycontext.lookup DataSource ds=
(DataSource)mycontext.lookup ("java:comp/env/jdbc/myDB"); mycontext.lookup("java:comp/e
(java:comp/env/jdbc/myDB); m m nv/jdbc/myDB"); m 3
4,<resource-ref>
2,<resource-ref> 3,<resource-ref> <description>
<description> <description> </description>
</description> </description> <res-ref-
<res-ref- <res-refname>jdbc/myDB<res- name>jdbc/myDB<res-ref-
name>jdbc/myDB<res-ref- refname> name>
name> <res- <res-
<res- type>javax.sql.DataSource<res type>javax.sql.DataSource</re
type>java.sql.DataSource<res- -type> s-type>
type> <res-auth>container</res- <res-auth>container</res-
<res-auth>container<res-auth> auth> auth>
</resource-ref> m </resource-ref> m </resource-ref> m 1

2, out m 3, exception m 4, config m 2

2, out m 3, exception m 4, config m 3

2, out m 3, exception m 4, config m 4

2, info m 3, contentType m 4, pageEncoding m 3

2, Declaration Tag m 3, Scriptlet Tag m 4, Expression Tag m 1

2, Declaration Tag m 3, Scriptlet Tag m 4, Expression Tag m 2

2, Declaration Tag m 3, Scriptlet Tag m 4, Expression Tag m 3

2, Declaration Tag m 3, Scriptlet Tag m 4, Expression Tag m 4


2, url m 3, out m 4, if m 3

2, out m 3, exception m 4, config m 1

2,<font color='green'> 3,<font color='green'> 4,<font color='green'>


<ul> <ul> <ul>
<c:forEach var="errmsg" <c:forEach var="errmsg" <c:forEach var=errmsg
items="${errorMsgs}"> items="${errorMsgs}"> items="${errorMsgs}">
<li>${errmsg}</li> <li>$errmsg</li> <li>${errmsg}</li>
</c:forEach> </c:forEach> </c:forEach>
</ul> </ul> </ul>
</font> m </font> m </font> m 2

2,Statement A and D are true. 3,Statement B,C, and D are 4,Statement A,B, and D are
m true. m true. m 4

2,Statement A, D are true and 3,Statement A,B are true and 4,Statement B is False and A,
B, C are False. m C,D are False. m C, D are true. m 2
2,<jsp:useBean identity="login" 3,jsp:useBean id="login" 4,jsp:useBean id="login"
scope="Session" scope="Session" scope="Session"
class="s1314.beans.LoginBea class="s1314.beans.LoginBea class="s1314.beans.LoginBea
n"> n"> n">
<%! <%! <%
login.setValue(request.getPara login.setValue(request.getPara login.setValue(request.getPara
meter("Loginid")); meter("Loginid")); meter("Loginid"));
login.setAddress(request.getPa login.setAddress(request.getPa login.setAddress(request.getPa
rameter("address")); rameter("address")); rameter("address"));
%> %> %>
<jsp:useBean> m </jsp:useBean> m <jsp:useBean> m 1

4,<jsp-config>
2,<jsp-property-group> <jsp-property-group>
<url- <url-pattern>scriptting_off</url-
pattern>/scriptting_off/*</url- 3,<jsp-config> pattern>
pattern> <url- <scripting-
<scripting- pattern>/scriptting_off/*</url- invalid>true</scripting-invalid>
invalid>true</scripting-invalid> pattern> </jsp-property-group>
</jsp-property-group> <scripting- <jsp-property-group>
<jsp-property-group> invalid>true</scripting-invalid> <url-pattern>EL_off</url-
<url-pattern>/EL_off/*</url- <url-pattern>/EL_off/*</url- pattern>
pattern> pattern> <el_ignored>true</el_ignored>
<el_ignored>true</el_ignored> <el_ignored>true</el_ignored> </jsp-property-group>
</jsp-property-group> m </jsp-config> m </js 1
2,<jsp:plugin type="applet" 3,<jsp:plugin type="applet" 4,<jsp:plugin
code="chatApp.class" code="chatApp.class" code="chatApp.class"
codebase="applets" codebase="/applets" codebase="/applets"
width="400" height = "300""> width="400" height = "300"> width="400" height = "300>
</jsp:plugin> m <jsp:plugin> m </jsp:plugin> m 1

3,<html> 4,<html>
2,<html> <body text = "green"> <body>
<body text = "green"> <%@ page <%@ page
<%@ page isErrorPage="true"%> isErrorPage="true">
isErrorPage="true"%> The following error has been The following error has been
The following error has been generated: <%= generated: <%=
generated: <%= exception.Message() %> exception.getMessage() %>
exception.getMessage() %> </body> </body>
</body></html> m </html> m </html> m 2
2,It will display the date and 3,It will display time as 4,It will display the current time
time. m hh/mm/ss. m as hh:mm:ss. M 4

2,It will display the date and 3, It will display the time as 4,It will display the current date
time in dd/yy/mm format. m dd/mm/yy format. m in yy/mm/dd format. m 4

2,Both login and password 3,Login Message will be 4,Both login and password
message will be displayed ten displayed nine times and message will be displayed nine
times. m Password message once. m times. m 1

2, validate m 3, findForward m 4, init m 2

2, ActionMapping m 3, ActionErrors m 4, ActionError m 2


2, ActionMapping m 3, ActionErrors m 4, ActionError m 3

2, input m 3, path m 4, validate m 4

2, input m 3, path m 4, validate m 2

2, img m 3, link m 4, image m 1

2, img m 3, link m 4, image m 3

2, img m 3, link m 4, image m 4

2, scope m 3, validate m 4, input m 4

2, scope m 3, validate m 4, input m 1

2,import
org.apache.struts.action.Action 3,import 4,import
Form; org.apache.struts.ActionForm; org.apache.struts.action.Action
public class employeeform public class employeeform Form;
extends ActionForm extends ActionForm public class employeeform
{ { {
//required code //required code //required code
}m }m }m 2

2,Action Class & Validate() 3,ActionForm Class & 4,ActionForm Class &
method m validate() method m performValidations() method m 3
2,<%@ include 3,<jsp:forward 4,<%@ page
file="Header.html" %> m page="Header.html"> m import="Header.html" %> m 2

2,Statement A is False and 3,Statement A,B are true and 4,Statement A,B,D are true
B,C,D are true. m C,D are False. m and C is False. m 2

3,<%@ forward
2,<jsp: @page="/validate.jsp> page="/validate.jsp"> 4,<jsp: page="/Validate.jsp">
<jsp: param <jsp: param <jsp: param
name="param1" name="param1" name="param1"
value="Login"/> value="Login"/> value="Login"/>
</jsp:forward> m </jsp:forward> m </jsp:forward> m 1

3,It is an authentication
techniques where the
administrator specifies the Web
2,It is an authentication pages that are to be secured 4,It is an authentication
technique which creates a on a website and the users that technique in which the server
customized logon page for a have the access to these Web authenticates a client by using
Web application. m pages. m digital certificates. m 1

3,It is an authentication
techniques where the
administrator specifies the Web
pages that are to be secured
on a website and the users that
2,It is an authentication have the access to these Web 4,It is an authentication
technique which creates a pages. Also the user technique in which the server
customized logon page for a information is encrypted before authenticates a client by using
Web application. m it is sent to the server. m digital certificates. m 3

2,It ensures that data is not 4,It specifies the rights


modified while being asssigned to an authenticated
transferred between the server 3,It is the process of identifying user to access resources of a
and the client. m a user. m Web application. m 1
3,It ensures that data is not 4,It specifies the rights
modified while being asssigned to an authenticated
2,It is the process of identifying transferred between the server user to access resources of a
a user. m and the client. m Web application. m 4

3,It performs post tag tsks,


2,It is invoked after completion such as writing the output and 4,It is used to direct the JSP
of the evaluation of the body closing the database engine to process the body of
tag. m connection. m a tag. m 2

4,<login-config>
2,<login-config> 3,<login-config> <auth-method>CLIENT-
<auth-method>FORM</auth- <auth-method>DIGEST</auth- CERT</auth-method>
method> method> <realm-
<realm-name>Secure Form <realm-name>Secure Digest name>Certificate</realm-
Authentication</realm-name> Authentication</realm-name> name>
</login-config> m </login-config> m </login-config> m 2

4,<login-config>
2,<login-config> 3,<login-config> <auth-method>CLIENT-
<auth-method>FORM</auth- <auth-method>DIGEST</auth- CERT</auth-method>
method> method> <realm-
<realm-name>Secure Form <realm-name>Secure Digest name>Certificate</realm-
Authentication</realm-name> Authentication</realm-name> name>
</login-config> m m </login-config> m 4

2,<security-role> 3,<security-role> 4,<security-role-ref>


<role-name>Admin <role-name>Admin</role- <role-name>Admin
<role-link>James</role- name> <role-link>James</role-
link></role-name> <role-link>James</role-link> link></role-name>
</security-role-ref> m </security-role-ref> m </security-role-ref> m 1

2,Step 1 --> Step 2 --> Step 3 3,Step 1 --> Step 3 --> Step 2 4,Step 1 --> Step 2 --> Step 3
--> Step 5 --> Step 4 --> Step 6 --> Step 4 --> Step 5 --> Step 6 --> Step 4 --> Step 5 --> Step 6
m m m 1

2,Step 1 --> Step 3 --> Step 2 3,Step 1 --> Step 3 --> Step 4 4,Step 1 --> Step 2 --> Step 4
--> Step 4 --> Step 5 m --> Step 2 --> Step 5 m --> Step 3 --> Step 5 m 2

También podría gustarte