-
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.
-
What is the servlet life cycle?
Each servlet has the same life cycle:A server loads and initializes the servlet (init())The servlet handles zero or more client requests (service())The server removes the servlet (destroy()) (some servers do this step only when they shut down)
-
What information that the ServletResponse interface gives the servlet methods for replying to the client?
It Allows the servlet to set the content length and MIME type of the reply. Provides an output stream, ServletOutputStream and a Writer through which the servlet can send the reply data.
-
What are the advantages using servlets than using CGI?
Servlets provide a way to generate dynamic documents that is both easier to write and faster to run. It is efficient, convenient, powerful, portable, secure and inexpensive. Servlets also address the problem of doing server-side programming with platform-specific APIs. they are developed with Java Servlet API, a standard Java extension.
-
-
-
C: namesList = context.listContents(someContextName);
Binding binding = namesList.next();
MyObject obj = binding.getObject();
D: namesList = context.list(someContextName);
Binding binding = namesList.next();
MyObject obj = (MyObject) binding.getObject("MyObject");
">To create a DSI (Dynamic Skeleton Interface) based server, the server must extendA: org.omg.CORBA.DynamicImplementation B: org.omg.CORBA.DynamicSkeleton C: org.omg.CORBA.SkeletonInterface D: org.omg.CORBA.DSIHow would you get the actual bound object of type MyObject using JNDI?A: namesList = context.listBindings(someContextName); Binding binding = namesList.next(); MyObject obj = (MyObject) binding.getObject(); B: namesList = context.listBindings(someContextName); Binding binding = namesList.next(); MyObject obj = binding.getObject("MyObject"); C: namesList = context.listContents(someContextName); Binding binding = namesList.next(); MyObject obj = binding.getObject(); D: namesList = context.list(someContextName); Binding binding = namesList.next(); MyObject obj = (MyObject) binding.getObject("MyObject");
-
-
-
-
-
Please write question of interglobe technologies interview
If you have given any interview in interglobe technologies
-
-
-
-
implements the SingleThreadModel interface making the Jsp
Implementing the tag implements the SingleThreadModel interface making the Jsp
Skill/Topic: Programming ConstructsA) None of the above B) content safeC) synchornisedD) thread safe
-
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
-
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
-
State true or false -- ServletContext class gives information about the Request?
Skill/Topic: Programming ConstructsA) TrueB) FalseExplanation: ServletContext: Gives the information about the container. PageContext: Gives the information about the Request
-
When u try to redirect a page after you already have written something in your page, the error encountered is “Response has already been committed error” or popularly called 402 error.
Skill/Topic: Programming ConstructsA) FalseB) True
JSP Interview Questions
Ans