Q : What is Servlets? What is the advantages of Servlet life cycle?
A : Servlets are modules that run within the server and receive and respond to the requests made by the client. Servlets retrieve most of the parameters using the input stream and send their responses using an output stream.
Servlets are used to the extend server side of functionality of a website. They communicate with various application on the server side and respond to the request made by the client.
Q : What is GenericServlet class?
A : The GenericServlet makes the writing servlets easier. To write a generic servlet, all you need to do is to override the abstract service method.
Q : What is the difference between a JavaBean from a Servlet?
A: Servlets are Java based analog to CGI programs, implemented by means of a servlet container associated with an HTTP server. Servlets run on the server side. Beans are reusable code components written in the Java that one can use in a variety of the programming environments. JavaBeans are used to Java what ActiveX controls are to Microsoft. Javabeans can run on server side, client side, within an applet etc
Q :Explain the servlet mapping?
A :Servlet mapping is the controls of how you access a servlet. It is recommended that you do not use the absolute URLs. Instead of usage of relative URLs should be done.
If you try to deploy the application with a different context root, you might have to change all the urls used in all the JSP programs. Relative URLs is the solution so that you can deploy your application with different context root with out changing the URLs.
Q: What is a Expression?
A : Expressions are act as a place holders for language expression, expression is evaluated each time the page is accessed. This shall be included in the service method of the generated servlet.
Q : What is the servlet context ?
A : The servlet context is an object that contains a information about the Web application and container. Using the context, a servlet can log events, obtain the URL and references to resources, and set of store and attributes that other servlets in the context can use.
Q : What are the different ways for session tracking?
A : There are different ways for session tracking
Cookies,
URL rewriting,
HttpSession,
Hidden form fields
Q : What are the type of protocols supported by HttpServlet?
A : Protocols extends the GenericServlet base on the class and provides an framework for handling the HTTP protocol. So, HttpServlet is the only supports HTTP and HTTPS protocol.
Q : What are the uses of Servlets?
A : Servlet can handle the multiple request concurrently and be used to develop high performance system
Servlets are used to process the client request.
A Servlet can be used to load balance among the serveral servers, as Servlet can easily forward.
Q : What is a Java Servlet?
A : A servlet is a Java technology-based Web component, managed by the container called servlet container or servlet engine, that generates the dynamic content and interacts with web clients via a request/response paradigm.
Q : What is the Servlet Interface?
A : The central abstraction is in the Servlet API is the Servlet interface. All servlets implement this interface, either directly one or, more commonly, by extending a class that implements it such as a HttpServlet. Servlets–>Generic Servlet–>HttpServlet–>MyServlet. The Servlet interface the declares, but does not implement, methods that manage the servlet and its communications with clients. Servlet writers provide some or all of these methods when developing a servlet.
Q :What are the differences between Applet and Servlet?
A : Applets are client side the components and runs on the web browsers Servlets are server side components that runs on the Servlet container.. Servlets have no GUI interface.
Q : What is GenericServlet class?
A : The GenericServlet is an abstract class that the implements the Servlet interface and the ServletConfig interface. In addition to the methods of declared in these two interfaces, this class also provides simple versions of the lifecycle methods init and destroy, and implements the log method declared in the ServletContext interface.
Wednesday, December 31, 2008
Recent Servlets Interview Questions & Answer
Posted by Sakthivel at 6:55 PM 0 comments
Labels: asp, asp.net, c#, computer related questions, latest interview questions and answers, server side program, Servlets, vb.net, web language tutorials
Recent ASP Interview Questions & Answers
Q : What’s the difference between client-side script and server-side script?
A : Scripts executed only by the browser without contacting the server is called client-side script. It is browser dependent. The scripting code is a visible to the user and hence not secure. Scripts are executed by the web server and processed by the server is called server-side script.
Q : What is Session Object?
A : Session object is stored in the information about a User’s session. Gives a notification when a user session begins or ends.
Q : What is the Server-Side includes?
Server side includes provides the extra information by which it makes the site easier to manage. It can include the text files using the #include statement, retrieve the size and last modification date of a file, defines how variables and error messages are displayed and inserts the values of HTTP variables in the page sent back to the browser.
Q : What is Response Object?
A : Response object is controls the information sent to the user. The various methods are:
Response.Write - Sends information directly to a browser
Response.Redirect - Directs a user to a URL other than the requested URL
Response.ContentType - Controls the type of content sent
Response.Cookies - Sets cookie values
Response.Buffer - To Buffer information
Q : What is a TextStream object?
A : Text Stream object allows you to access the read or write the contents of text files stored on the web server.
Q : What is Request Object?
A : Gets information from the user. It has five collections of by which values can be accessed. They are:
Querystring, Form, Cookies, Server Variables & ClientCertificate
Q : Why do we use Option Explicit?
A : Answer 1 :
Correct answer is – This statement force the declaration of variables in VB before using them.
Answer 2 :
To avoid multiple variables of the same name.
Q : What are the Web Servers supporting in ASP?
A : There are three types of web servers supporting in asp,
Internet Information Server (IIS) on Windows NT
Peer Web Services on Windows NT
Personal Web Server (PWS) on Windows 95
Q : What is asession?
A :Session is known as a user accessing an application.
Q : Explain some of the ASP components?
A : Ad Rotator component : A way to manage advertisements on the web site.
Content Linker component : A technique to direct users through a set of pages on a web site by creating a list of URLs and description of the next and previous pages.
Database Access component : Allows to access data from the database
Browser Capabilities component : Allows to customize the page to the ability of the browser viewing it.
Q : What are the advantages of using ASP?
A : Minimizes network traffic by limiting the need for the browser and server to talk to each other
Makes for quicker loading time since HTML pages are only downloaded
Can provide the client with data that does not reside on the client’s machine
Allows to run programs in languages that are not supported by the browser
Provides improved security measures since the script cannot be viewed by the brows.
Q : What is the function of Buffer in Response Object?
A : Buffer in response object controls the HTML output stream manually.
Q : What are the methods in Session Object?
A : The Session Object have only one method, which is Abandon. It destroys all the objects stored in a Session Object and releases the server resources they occupied.
Q : What is FileSystemObject object?
A : FileSystemobjaect provides access to the physical file system of the web server. It gets and manipulates the information about all drives in a server, folders and sub-folders on a drive and files inside a folder.
Q : What’s the difference between HTML and ASP?
ASP executes code on the server side whereas the browser interprets HTML.
ASP can use any of the scripting languages
Create pages that will be customized to display only things that will be of interest to a particular user
Can edit contents of a web page by updating a text file or a database rather than the HTML code itself .
Q : What are the browsers that can access ASP pages?
A: Netscape Communicator/ Navigator (supports only JavaScript, VBScript)
Internet Explorer (supports VBScript, JavaScript)
Posted by Sakthivel at 6:53 PM 0 comments
Labels: asp, asp.net, computer related questions, free interview questions, latest interview questions and answers, web languages
Recent C# Interview Questions & Answers
Q : What is the C# syntax to catch any possible exception?
A : A catch block is that the catches the exception of type System .Exception. You can also omit the parameter data type in this case and just write catch {}.
Q :What is the difference between System.String and System.Text.StringBuilder classes?
A : System.String is a immutable. System.StringBuilder was designed with the purpose of having a mutable the string where as a variety of operations can be performed.
Q : What’s the syntax to inherit from a class in C#?
A: A Place is a colon and then the name of the base class.
Example: class MyNewClass : MyBaseClass
Q : When do you correctly have to declare a class as abstract?
A : When the class itself is the inherited from an abstract class, but not all base abstract methods have been overridden.
When at least one of the methods in the class is abstract class.
Q : What’s the difference between a Struct and a Class?
A : Structs are the value-type variables and are thus saved on the stack, additional overhead but faster retrieval. Another difference is struct can not inherit.
Q :What are the different ways of method can be overloaded?
A: There are three types of ways can be overloaded,
Different parameter data types,
Different number of parameters,
Different order of parameters.
Q : Which is the following is used to denote comments in C#?
A : All are correct, all are supported forms of commenting. It is just that /// is specifically for functionality in XML documentation.
Q : What is true about readonly variable in C# code?
A : B is the right choice. Since readonly field can only be initialized at the time of
construction of the object. Read only means if you want to initialize the readonly property that intialize it inside the constructor.
Q : What’s an interface class?
A : It is an abstract class with the public abstract methods all of which is must be implemented in the inherited classes.
Q : What is a delegate?
A : A delegate is a object encapsulates a reference to a method. In C++ they were referred to as function pointers.
Q : What is a multicast delegate?
A Multicast delegate is that points to and eventually fires off several methods.
Q : What is the difference between the Trace class and Debug class?
A :Documentation looks the same. Use Debug class for debug builds, use the Trace class for both debug and release builds.
Q : What is Inheritance?
A :Inheritance is a process of acquiring attributes and behaviors from the another object (normally a class or interface). Gives you ability to provide is-a relationship. Acquires attributes and behaviors from another. When a class acquires attributes and behaviors from another class.
Q : What is a Destructor?
A : A destructor is a deallocating the memory.
Q : How a base class method is hidden?
A : Hiding a base class method by declaring a method in the derived class with keyword new. This will override the base class method and old method will be suppressed.
Posted by Sakthivel at 6:51 PM 0 comments
Labels: asp, asp.net, c, c#, c++, computer related questions, latest interview questions and answers, vb.net
Recent VB.Net Interview Questions & Answers
Q : Define Context menu in VB.NET?
A : It is useful for enabling access to commands in a variety of contextual situations.
It is created at run time in the same manner as a main menus
It is created the using Context Menu control.
Q : Define the Validation in VB.NET?
A :Validation of two types of level validation there are,
Form-level :Validates all fields on a form simultaneously.
Field-level : Validation validates each field as data is entered.
Q : What is a visual inheritance in VB.NET?
A : A Visual inheritance allows the deriving forms from the base form with common controls.
Q : What is the difference between VB and VB.NET?
A: VB does not support inheritance, but VB.NET supports the inheritance.
VB does not support polymorphisms, but VB.NET supports Polymorphisms.
VB is OOPS based, but VB.NET completely supported for OOPS.
VB supports interfaces, but VB.NET fully supports interface based programming
VB uses VB runtime, but VB.NET uses CLR.
Q : How to store and retrieve images in sql server database through VB.NET?
A : Server supports the ability for clients to store the objects within tables.
Create the Field that data type Image and Initialize byte an array with a null value initially. Use FileInfo object to get file size. Open FileStream to read file.
Q : What is the Advantages of VB.NET?
A : First of all, VB.NET provides managed code execution that runs under the
Common Language Runtime (CLR), resulting in robust, stable and secure applications. All features of the .NET framework are readily available in VB.NET.
VB.NET is totally object oriented. This is a major of addition that VB6 and other earlier releases did not have.
VB.NET uses XML to transfer the data between the various layers in the DNA Architecture i.e. data are passed as simple text strings.
The .NET framework comes with the ADO.NET, which follows the disconnected paradigm, i.e. once the required records are fetched the connection no longer exists. It is also retrieves the records that are expected to be accessed in the immediate future. This enhances Scalability of the application to a great extent.
Error handling has changed in VB.NET. A new Try-Catch-Finally block has been introduced to handle errors and exceptions as a unit, allowing appropriate action to be taken at the place the error occurred thus discouraging the use of ON ERROR GOTO statement. This again credits to the maintainability of the code.
Q :What is the difference between DataSet and DataTable?
A : DataTable:
Represents one table of in-memory data table can have one table only or we can say Data table is a collection of record's that consist the single table
Dataset:
Represents an in-memory cache of data we can also say data set is a collection of data table it is based on xml format. It is used to for data storing in cache as a disconnected recordset dataset is using data manipulation in cache without connection to database.
Q :What is the DataType conversion in VB.NET ?
A : Convert one variable type to another one is called datatype and Another conversion we can also called this casting in VB.NET some automatically conversion is also there.
Q : What is the branching logic control in vb.net ?
A : Function and subroutines are the answer. The diffrence between in two of them is function send to the information back from where it is called means function can return a value but subroutines can not do this.
Q :What do you mean by Serialization and Deserialization and it’s use?
A: To load data from xml file to vb.net form is called DeSerialization.
To store the vb.net for data into an xml file is called Serialization.
: What are the various open source tool available for VB.NET?
A : When compared with the rapid development of open source tools for other languages from Microsoft (C#, etc) we can say the that development of tools for VB has been slow. Mono development platform is one which is implementing VB libraries are working on a compiler.
Q : What is the branching logic control in vb.net?
A : Function and subroutines are the answer. The diffrence between in two of them is function send the information back from where it is called means function can return a value but subroutines can not do this.
Posted by Sakthivel at 6:49 PM 0 comments
Labels: asp, asp.net, computer related questions, free interview questions, latest interview questions and answers, vb.net
Recent ASP.Net Interview Questions & Answers
Q : What is ASP.NET?
A : ASP.NET is a compiled code and run the under CLR Environment because it is a Managed Code with OOPS Accepted.
Q : Differentiate between execute query and execute nonquery.?
A : Execute Query is the method of which is used to return the result of the command like select Query. Execute is Update Query.
The Execute NonQuery is used to return the Query OS the statement like the update Delete Insert which returns No data..
Q : What do you mean by the authentication and authorization?
A : Authentication is validating user rights
Authorization is validating credentials
Q : What are the types of memory management?
A :Memory management is many types such as
• Storage memory Management.
• I/O Memory Management etc ..
Q : What is a Constructor in ASP.NET?
A : Constructor is the first method that are called on instantiation of a type.
It provides the way to set of default values for data before the object is available for use.
Performs other necessary functions before the object is available for use.
Q : Explain the serialization in ASP.NET?
A : Serialization is a process of converting an object into a stream of bytes. .Net has 2 serializers namely XMLSerializer and SOAP/BINARY Serializer. Serialization is maily used in the concept of .Net Remoting.
Q :What is Destructor in ASP.NET?
A : destructor is called the just before an object is destroyed. It can be used to run clean-up code. You cannot control when a destructor is called since object clean up by common language runtime.
Q : what are the components of web form in ASP.NET explain it?
A: Server controls : The server controls are Hypertext Markup Language (HTML) elements that include a runat=server attribute. They are provide the automatic state management and server-side events and respond to the user events by executing event handler on the server.
Data controls : Data controls are allow to the connect to the database, execute command and retrieve data from database.
HTML controls :These controls also respond to the user events but the events processing happen on the client machine.
System components : System components provide access to system-level events that occur on the server.
Q : Explain the different parts that constitute ASP.NET application?
A : ASP.NET Applications are three parts of constitute there are,
(i) Content files (ii) Program logic files (iii) Configuration file
Content files include static text, images and can be include elements from database.
Program logic files exist as DLL file on the server that responds to the user actions.
Configuration file to the offers various settings that determine how is the application runs on the server.
Q : Describe the sequence of action takes place on the server when ASP.NET application starts first time?
A : Following are the sequences:
IIS starts ASP.NET worker process>> worker process loads assembly in the memory>>IIS sends the request to the assembly>>the assembly composes a response using the program logic>> IIS returns the response to the user in the form of HTML.
Q : What’s the main difference between FormLayout and GridLayout ?
A :FormLayout is a little of different only experience Web Developer used this one reason is it is helpful for wider range browser. If there is any absolute positioning we can notice that there are number of DIV tags. But in FormLayout whole work are done through the tables. But Grid Layout helps in providing absolute positioning of every control placed on the page. It is easier to develop page with absolute positioning because control can be placed any where according to our requirement.
Q :Differentiate between WebCustomControl and in WebUserControl?
A: Web custom controls:-Web Custom Control is a typical to create and good for the dynamic layout and another thing is it have full tool support for user and a single copy of control is required because it is placed in Global Assembly cache.
Web user controls :- Web User Control is Easier to create and another thing is that its support is limited for users who use a visual design tool one gud thing is that its contains static layout one more thing a seprate copy is required for each application.
Q : What Language is familiar to CLR?
A: Any language that can be compiled into Microsoft Intermediate Language (MSIL) is considered a .NET-compliant language. Following are a few part of the popular .NET-compliant languages supported by CLR.
Posted by Sakthivel at 6:47 PM 0 comments
Labels: asp, asp.net, computer related questions, free interview questions, latest interview questions and answers
