-
State true or false - We make use of a ServletOutputStream object from the JSP page
Skill/Topic: Programming ConstructsA) TrueB) FalseExplanation: use the JSPWriter object
-
We can restrict the calling of the errorPage in the JSP by setting the value true for the ______ param in the ErrorPage attribute of the Page Directory
Skill/Topic: Programming ConstructsA) isErrorpage
-
Which codeline must be set before any of the lines that use the PrintWriter
Skill/Topic: Programming ConstructsA) setContentWriter() B) setWriter()C) setPrintType()D) setContentType()
-
The ________________________ when added to the user session tells us that the session timed out.
Skill/Topic: Programming ConstructsA) SessionTotalTimeOutIndicator B) SessionTotalTimedoutIndicator C) SessionTimeoutIndicator D) SessionTimedoutIndicator
-
Which of the tag contains a code fragment valid in the page scripting language.
Skill/Topic: Programming ConstructsA) B) C) D)
-
Which of the tag is used to show the comments in the JSP page
Skill/Topic: Programming ConstructsA) B) C) D)
-
What is the difference between GenericServlet and HttpServlet?
GenericServlet is for servlets that might not use HTTP, like for instance FTP service.As of only Http is implemented completely in HttpServlet. The GenericServlet has a service() method that gets called when a client request is made. This means that it gets called by both incoming requests and the HTTP requests are given to the servlet as they are.
-
Which of the following statements are trueI cookie.setMaxAge(0) – delete the cookieII cookie.setMaxAge(1) –the cookie will live before it expiresIII cookie.setMaxAge(-1) – the cookie will not be stored beyond this session.
Skill/Topic: JSP Life CycleA) I onlyB) II, III onlyC) I, II onlyD) I, II, III
-
-
-
Which of the following are the JSP scripting elements (Multiple choice)
Skill/Topic: Programming ConstructsA) Declarations B) Scriptlets C) expressions D) None of the above
-
-
How can I set a cookie and delete a cookie from within a JSP page?
A cookie, mycookie, can be deleted using the following scriptlet:<%//creating a cookieCookie mycookie = new Cookie("aName","aValue");response.addCookie(mycookie);//delete a cookieCookie killMyCookie = new Cookie("mycookie", null);killMyCookie.setMaxAge(0);killMyCookie.setPath("/");response.addCookie(killMyCookie);%>
-
Which of the following statements is true regarding the scope of the ‘session’ in JSP? (Multiple choice)
Skill/Topic: JSP Life CycleA) Objects with session scope are accessible from pages processing requests that are in the same session as the one in which they were created.B) It is not legal to define an object with session scope from within a page that is not session-aware.C) All references to the object shall be released after the associated session ends.D) References to objects with session scope...
-
-
-
-
-
Which of the following points is true regarding the general and selling point of Servlet (Multiple choice)
Skill/Topic: ServletsA) A Servlet can handle multiple requests concurrently, and synchronize requests. B) Servlet support systems such as online real-time conferencing. C) Servlet can forward requests to other servers and Servlet. D) Servlet can be used to balance load among several servers that mirror the same content, and to partition a single logical service over several servers, according to task...
-
Adding a meta, usage like <meta name=”alok” contents=”no index”> tag to the jsp prevents it from being indexed by the search engines like Yahoo and Google
Skill/Topic: Programming ConstructsA) TrueB) False
JSP Interview Questions
Ans