Java-Script
Question 1 |
Which of the following statement(s) is/are TRUE regarding Java Servlets ?
(a) A Java Servlet is a server-side component that runs on the web server and extends the capabilities of a server.
(b) A Servlet can use the user interface classes like AWT or Swing.
(a) A Java Servlet is a server-side component that runs on the web server and extends the capabilities of a server.
(b) A Servlet can use the user interface classes like AWT or Swing.
Only (a) is TRUE. | |
Only (b) is TRUE. | |
Both (a) and (b) are TRUE. | |
Neither (a) nor (b) is TRUE. |
Question 1 Explanation:
TRUE: A Java Servlet is a server-side component that runs on the web server and extends the capabilities of a server.
FALSE: A Servlet can not use the user interface classes like AWT or Swing.
→ Servlets can respond to any types of requests, they most commonly implement web containers for hosting web applications on web servers and thus qualify as a server-side servlet web API.
FALSE: A Servlet can not use the user interface classes like AWT or Swing.
→ Servlets can respond to any types of requests, they most commonly implement web containers for hosting web applications on web servers and thus qualify as a server-side servlet web API.
Question 2 |
When destroy 0 method of servlet gets called?
The destroy 0 method is called only once at the end of the life cycle of a servlet. | |
The destroy 0 method is called after the servlet has executed service method. | |
The destroy 0 method is called only once at the end of the life cycle of a servlet. And destroy 0 method is called after the servlet has executed service method. | |
None of the given options
|
Question 3 |
An alternative to Java Script is
VBScript | |
ASP, NET | |
JSP | |
None of the given options |
Question 4 |
Consider the following script:
< html >
< head >< title > JavaScript < title >< / head >
< body >
< script language-“JavaScript” >
var a=80
var b=(==80 ? “pass” : “fail”):
document, write(b)
< / script >
< / body >
< / html >
What will be the output of the above script?
pass | |
fail | |
80 | |
Error at line 6 |