Study the statements:
1) URL rewriting may be used when a browser is disabled cookies.
2) In URL encoding the session id is included as part of the URL
Which is the correct option ?
A. Only statement 1 is true
B. Only statement 2 is true
C. Both 1 and 2 are true
D. Both 1 and 2 are not true correct answers Both 1 and 2 are true
A JSP page will not have access to session implicit variable if.
A. the user has closed all his/her browser windows.
B. the request is the first request from the user.
C. the user's browser does not support URL rewriting.
D. the session attribute of page directive is set to false. correct answers the session attribute of
page directive is set to false.
Which statements are BEST describe type attribute of <jsp:useBean type=_.. /> action?
A. The name used to manipulate the Java object with actions <jsp:setProperty> and
<jsp:getProperty>. A variable of this name is also declared for use in JSP scripting elements.
The name specified here is call..
B. The name of a bean that can be used with method instantiate of class java.beans.Beans to
load a JavaBean into memory.
C. The fully qualified class name of the Java object
D. The type ofthe JavaBean. This can be the same type as the class attribute, a superclass
ofthattype or an interface implemented bythattype. The default value is the same as for
attribute class. ACIassCai
E. The scope in which the Java object is accessible-page. request session or application. The
default scope is page. correct answers The fully qualified class name of the Java object
(Choose 1 answer)
HttpServletRequest.getSession() method returns a_____object.
A. HttpServletSession.
B. HttpResponseSession.
C. HttpRequestSession.
D. HttpSession. correct answers HttpSession.
(Choose 1 answer)
You need to make sure that the response stream of your web application is secure. Which
factor will you look at? (Choose one)
A. data integrity
,B. authentication
C. authorization correct answers data integrity
Class HttpServlet defines the methods _____ and _______ to response to get and post request
from a client.
A. DoGet, DoPost
B. doGet, doPost
C. doGET, doPOST
D. Get, Post correct answers doGet, doPost
(Choose 1 answer)
Which of the elements defined within the taglib element of taglib descriptor file are required?
Select one correct answer.
A. taguri
B. info
C. taglib-location
D. display-name correct answers taglib-location
(Choose 1 answer)
Which of the following method calls can be used to retrieve an object from the session that
was stored using the name "userid"?
A. getValue("userid");
B. get("userid");
C. getAttribute("userid");
D. getParameter("userid");
E. getObject("userid"); correct answers getAttribute("userid");
(Choose 1 answer)
Consider the following doGet method code of a servlet
public void doGet(HttpServletRequest req. HttpServletResponse res)
, {
String command = req.getParameter("command"); if("remove".equals(command))
{
HttpSession session = req.getSession();
//insert code here
}
}
If the command equals remove, you want to unbind an attribute named "user" from the
session. Which of the following option will you use? (Choose one)
A. session.deleteAttribute("user");
B. session.unbindfuser");
C. session.removeAttribute("user");
D. session.remove("user"); correct answers session.removeAttribute("user");
(Choose 1 answer)
Which Java technology provides a standard API for publish-subscribe messaging model?
A. JNDI
B. UDDI
C. JMS
D. JSP correct answers JMS
(Choose 1 answer)
Which of the following statements are correct about HTTP Basic authentication mechanism?
A. HTML FORM is used to capture username and password.
B. Password is transmitted in an encrypted form.
C. Password is transmitted as text
D. Password is transmitted either in encrypted text or in plain text depending on the browser.
correct answers Password is transmitted as text