-
For connecting to the database from the jsp we need to use the tags java.sql.____ and _____.
Skill/Topic: JSP ConnectionsA) *, connection B) *, Statement C) Statement, connection D) *,*
-
-
-
How do u maintain a Session?
Ans- A session can be created via the getSession () method of HttpServletRequest. An HttpSession object is returned. This object can store set bindings that associated names with objects. This setAttribute (), getAttribute (), getAttributeNames (), and removeAttribute () method of HttpSession manage these bindings. It is important to note that session state is shared among all the servlets that are...
-
The jsp:plugin tag is used to insert the browser-specific OBJECTS and EMBED elements
Skill/Topic: Programming ConstructsA) TrueB) False
-
-
Which of the following statements is true about the IP address used to identify the page location in a server?
Skill/Topic: FundamentalsA) Every computer connected to a network has an IP address. B) An IP address is a number that uniquely identifies each computer on the Net. C) An IP address is a 32-bit number. D) All of the above
-
-
-
Which packages in the java provide the writing of the Servlet
Skill/Topic: ServletsA) javaxB) javaC) java.ioD) java.lang
-
-
Request.getServerName () is used to get the name of the server on which the Jsp is running
Skill/Topic: Programming ConstructsA) TrueB) False
-
How do you prevent the Creation of a Session in a JSP Page and why?
By default, a JSP page will automatically create a session for the request if one does not exist. However, sessions consume resources and if it is not necessary to maintain a session, one should not be created. For example, a marketing campaign may suggest the reader visit a web page for more information. If it is anticipated that a lot of traffic will hit that page, you may want to optimize the load...
-
What does < %= obj.getXXX() %> the following expression get evaluated to ?
This expression gets evaluated to an argument for the println statement in the generated Servlet as follows:out.println( obj.getXXX() ); // Since it becomes an argument here you should not use semicolon in the JSP expression
-
Which code line must be set before any of the lines that use the PrintWriter?
setContentType() method must be set before transmitting the actual document.
-
-
-
Which of the following statements correctly define the use of Servlet over CGI (Multiple choice)
Skill/Topic: ServletsA) Servlet provide a way to generate dynamic documents that is both easier to write and faster to run. B) Servlet also address the problem of doing server-side programming with platform-specific APIsC) They are developed with the Java Servlet API, a standard Java extensionD) They have slower response
-
-
JSP Interview Questions
Ans