Professional Documents
Culture Documents
MissionMca.com
programmer to know the designing skills because the Java Servlets did not separate the
Programming logic from the presentation layer.
11. What are life cycle of Servlet?
The servlet lifecycle consists of the following steps:
1. The servlet class is loaded by the Web container during startup.
2. The Web container calls the init() method. This method initializes the servlet and
must be called before the servlet can service any requests. In the entire life of a
servlet, the init() method is called only once.
3. After initialization, the servlet can service client requests. Each
request is serviced in its own separate thread.
12. What are advantages of Servlet over CGI?
A Servlet does not run in a separate process. This removes the
overhead of creating a new process for each request.
A Servlet stays in memory between requests. A CGI program
(and probably also an extensive runtime system or interpreter)
needs to be loaded and started for each CGI request.
There is only a single instance which answers all requests concurrently. This
saves memory and allows a Servlet to easily
manage persistent data.
13. What are difference between genericServlet and HttpServlet
GenericServlet defines a generic, protocol-independent servlet.
HttpServlet defines a HTTP protocol specific servlet.
GenericServlet gives a blueprint and makes writing servlet easier.
HttpServlet gives a blueprint for Http servlet and makes writing them easier.
14. What is Servlet Request?
The ServletRequest interface enables a servlet to obtain information about a client request
15. What is Servlet Response?
16. The ServletResponse interface enables a servlet to formulate a response for a client.
17. What is Servlet Context?
The ServletContext interface enables servlets to obtain information about their
environment
18. What are different Threading models?
Direct, Indirect, Subroutine, Token, Huffman Threading
19. What is HttpSession? Why it is used?
Provides a way to identify a user across more than one page request or visit to a Web site
and to store information about that user.
20. Explain Servlet Architecture?
Servlet architecture made by two packages :
MissionMca.com
1. javax.servlet.Servlet
2. javax.servlet.http
The javax.servlet.Servlet package contains the generic interfaces and Classes that are
implemented and extended by all Servlets.
The javax.servlet.http package contains the Classes that are extended when
creating HTTP-specific Servlets.
21. What is JSP?
Java Server Pages is a technology from Sun that enables the Java programmers to
generate HTML, XML or other types of documents to server the web client. The JSP
technology allows the programmers to embed Java code into html (.jsp) page.
22. How is JSP different from Servlet? Why is the need for JSP?
If you are a programmer or a web designer you will agree with me that not every
programmer is a good designer and not every good designer is a good programmer.
This is the exact problem posed by Java Servlets. Which means Java Servlets required
the Java programmer to know the designing skills because the Java Servlets did not
separate the Programming logic from the presentation layer.
Therefore there was a need to separate the design aspects from the Core Java
programmers. This was the reason why, JSP was introduced.
23. What are JSP development Model?
JSP provides a declarative, presentation-centric method of developing servlets. JSP
specification itself is defined as a standard extension on top the Servlet API. The
early JSP specifications advocated two philosophical development models:
JSP directives are always enclosed within the <%@ ... %> tag.
The two primary directives are page and include. also provides the taglib
directive, which can be used for
working with custom tag libraries)
26. What is Declaration?
JSP declarations let you define page-level variables to save
information or define supporting methods that the rest of a JSP
MissionMca.com
MissionMca.com
Professional
Enterprise Developer
Enterprise Architect
MissionMca.com
MissionMca.com
3. Inheritance is the process by which one object can acquir the properties of
another object. This is important because it supports the concept of hierarchical
classification.
48. What are basic data types supported by C#?
Integers, Floating-Point, The decimal Type, Characters, The bool Type
49. What are different Control Structure in C#
There are three categories of program control statements: selection statements, which are
the if and the switch; iteration statements, which consist of the for, while, do-while,
and foreach loops; and jump statements, which include break, continue, goto, return,
and throw.
50. What are different operators Supported by C#?
Unary, Multiplicative, Additive, Shift, Relational, Equality, Logical AND, Logical XOR,
Logical OR, Conditional AND, Conditional OR, Null Coalescing, Ternary, Assignment
51. Explain reference data types in C#
In contrast to value types, the value of a reference types is allocated on the heap. Another
name for a reference type, that you might be more familiar with, is an object. Reference
types stores the reference to the data, unlike value types, that stores the value.
52. What is Jagged Array?
A jagged array is an array whose elements are arrays. The elements of a jagged array can
be of different dimensions and sizes. A jagged array is sometimes called an array of
arrays. The following examples show how to declare, initialize, and access jagged
arrays.
53. Explain Exception handling mechanisms in C#?
C# exception handling is managed via four keywords: try, catch, throw, and finally
Program statements that you want to monitor for exception are contained within a try
block. If an exception occurs within th try block, it is thrown. Your code can catch
this exception using catch and handle it in some rational manner. System-generate
exceptions are automatically thrown by the C# runtime system. To manually throw an
exception, use the keyword throw.
54. What is Generics?
Generics introduce to the .NET Framework the concept of type parameters, which make
it possible to design classes and methods that defer the specification of one or more types
until the class or method is declared and instantiated by client code.
55. Explain File Handling in C#?
Data is stored in two ways, persistent and non-persistent manner. When you open a
file for reading or writing, it becomes stream. Stream: Stream is a sequence of bytes
traveling from a source to a destination over a communication path. The two basic
streams are input and output streams. Input stream is used to read and output stream is
used to write. The System.IO namespace includes various classes for file handling.
56. What are various commonly used classes for file handling?
MissionMca.com
MissionMca.com
MissionMca.com
XPath is a major element in W3Cs XSLT standard and XQuery and XPointer
are both built on XPath expressions.
XPath is a language for finding information in an XML document.
XPath is a syntax for defining parts of an XML document
XPath uses path expressions to navigate in XML documents
XPath contains a library of standard functions
XPath is a major element in XSLT
XPath is a W3C recommendation
MissionMca.com
10
MissionMca.com
11