You are on page 1of 6

AWT Difference between GenericServlet and HTTPServlet: HTTPServlet

1) HttpServlet belongs to javax.servlet.http package 2) HTTPServlet is an abstract class which extends GenericServlet and implements java.io.Serializable. 3) A subclass of HttpServlet must override at least one method of doGet(), doPost(),doPut(), doDelete(), init(), destroy(), getServletInfo(). 4) HTTPServlet is a protocol dependent servlet. 5) It is more commonly used in web server environment. 6) HTTPServlet is extended by HTTP specific servlets. 7) HTTPServlet extends Generic Servlet directly. i.e. it is a subclass of Generic servlet class.

GenericServlet
1) GenericServlet belongs to javax.servlet package 2) GenericServlet is an abstract class which extends Object and implements Servlet, ServletConfig and java.io.Serializable interfaces 3) The direct subclass to GenericServlet is HttpServlet. To write a GenericServlet you need abstract service() to be overridden. 4) GenericServlet is a protocol-independent servlet 5) It is not much useful in web server environment 6) Generic Servlet is used for protocol independent servlets. 7) Generic Servlet is a concrete implementation of servlet interface.

Difference between pass by reference and pass by value


pass by value 1) It passes the actual value of parameter from the function call. pass by reference 1) the address of the actual parameter has to be transferred.

2) Value of the parameter variable in


calling functions remains unchanged.

2) the formal parameter in the function


decleration must of pointer type.

3) copy of the variable of actual


parameter are made and transfer to the formal parameter.

3) Any changes in the formal parameter


can change the value of actual patameter.

Page 1 of 6

MissionMCA.com

Difference between inline and code behind in ASP.Net Inline coding


1) Inline coding is the one where logic and design part are in the same page. 2) The code is in <script> blocks in the same .aspx file that contains the HTML and controls. 3) The .aspx file derives from the Page class.

Code behind coding


1) In code behind we separate logic from designing. 2) The HTML and controls are in the .aspx file and the code is in a separate .aspx.vb or .aspx.cs file. 3) The code for the page is compiled into a separate class from which the .aspx file derives. 4) All project class files (without the .aspx file itself) are compiled into a .dll file, which is deployed to the server without any source code. When a request for the page is received, then an instance of the project .dll file is created and executed. 5) Code behind is compiled at the time of compilation.

4) When the page is deployed, the source code is deployed along with the web Forms page, because it is physically in the .aspx file. However, you do not see the code, only the results are rendered when the page runs. 5) Inline is interpreting the code at the time of execution line by line.

Difference between Servlet and Java Server Pages


SERVLET JSP

1) Servlet is a pure java class 2) when we use HTML in java code than it is called servlet 3) servlet is static 4) a servlet can support any protocol like HTTP,FTP,SMTP etc 5) SERVLETS are server side extension funtionality. we can implement code at server side by using servlets. servlets are used to connect to database and maintain security. 6) For writing servlets we should know code and all classes in servlet family. 7) Servlets are good for operations that are Java-intensive. 8) Servlet runs comparatively slower 9) servlet is static 10) a servlet can support any protocol like HTTP,FTP,SMTP etc
Page 2 of 6

1) whereas jsp is not a pure java class 2) when we use Java code is html thsn it is called jsp 3) where as jsp is Dynamic 4) jsp can only support HTTp Protocol 5) jsp is also used to achive server side funtionality but it is mainly for user friendlyness.

6) here we have html tags to write code.easy to rembember tags. 7) JSP are good for operations that are HTML-intensive. 8) JSP run faster. 9) where as jsp is Dynamic 10) jsp can only support HTTp Protocol
MissionMCA.com

Difference between connected and disconnected manner in ado.net Connected Disconnected 1) Connected data access means that when 1) Disconnected database access model a connection to the database is established means,when an application interacts with the connection remains open until the the database, the connection is opened application is closed. to serve the request of the application and is closed as soon as the request is completed. 2) Connected architecture is when you 2) Disconnected architecture is a method constantly make tips to the database for of retrieving a record set from the any (Create, Read, Update, Delete) database and storing it giving you the operation you wish to do. This creates more ability to do many (Create, Read , Update, traffic to the database but is normally much Delete) operations on the data in faster as you should be doing smaller memory, then it can be re-synchronized transactions. with the database when reconnecting. 3) If you are connected then the data 3) If you are disconnected then the being moved between the client and the data is sent to the client where it lives on server are being done with an active the client as a data source. When the connection or in real-time. client reconnects the data is sent back to the server where the server will save the change back to the database or data source. 4) DataReader is connected architecture 4) DataSet is disconnected architecture since it keeps connection open until all gets all records at once and closes records are fetched. connection and are available even after connection is closed. 5) DataReader is a forward only and read 5) DataSet is used to maintain only data. relationships between multiple tables. 6) Connected can only hold the data of a 6) Disconnected can hold multiple tables single table. of data. 7) Connected methods give a faster 7) Disconnected get low in speed and performance. performance. 8) DataReader cant persist the data. 8) DataSet can persist the data.

Page 3 of 6

MissionMCA.com

Difference between JSP and ASP:Java Server Pages Web Server Support
Most popular web servers including Apache, Netscape, and Microsoft IIS can be easily enabled with JSP. Platform independent. Runs on all Java-enabled platforms.

Active Server Pages


Native support only within Microsoft IIS or Personal Web Server. Support for select servers using third-party products.

Platform Support

Is fully supported under Windows. Deployment on other platforms is cumbersome due to reliance on the Win32-based component model. Uses the Win32-based COM component model.

Component Model

Relies on reusable, crossplatform components like JavaBeans, Enterprise JavaBeans, and custom tag libraries. Can use the Java programming language or JavaScript. Works with the Java security model. Uses JDBC for data access. JSP is extensible with custom tag libraries.

Scripting

Supports VBScript and JScript for scripting.

Security Database Access Customizable Tags

Can work with the Windows NT security architecture. Uses Active Data Objects for data access. Cannot use custom tag libraries and is not extensible.

Page 4 of 6

MissionMCA.com

Difference between .NET and J2EE:Key Features Type of technology Operating system support Programming languages Vendor support Interpreter .NET
.Net is Product.

J2EE
J2EE is a Standard.

It supports one operating system (Windows).

It supports a multiple operating systems.

It supports multiple programming languages like, VB.Net, C# & so on. It is supported by a single vendor.(Microsoft) During the first application process, the source code is compiled to intermediate language (IL) which is machine independent & during the 2nd compilation process, the intermediate language is executed using a Just-In-Time (JIT) compiler & CLR transforms it into machine code. Thus any code in .Net is compiled twice. In .Net its a Asp.Net

It supports single programming language Java. It is supported by multiple vendors. Java code is compiled to byte-code by JRE and is interpreted or compiled to machine code.

Dynamic web pages used Graphical user interface used Middle-Tier components

In J2EE its a JSP.

.Net uses win forms RAD development supported through the Microsoft visual studio IDE, No other IDE supports .Net. .Net uses, .Net managed component as middle-tier components.

J2EE uses java swing support which is available in many java IDEs and tools. J2EE uses, EJB as middle-tier components.

Page 5 of 6

MissionMCA.com

Database

ADO.Net

JDBC

Difference between .NET and Java .NET 1 ) .Net is from Microsoft 2) .Net is less platform independent as it mainly runs on windows. JAVA 1 ) Java is from Sun 2) Comparatively Java is more platform independent as it has concept of JVM. 3) Java uses third party tools and server providers.

3) .Net has more integrated development environment as the IDE, runtime and server all come from Microsoft itself. 4) Flexibility is comparatively less. 4) Flexibility given by Java is more due to fact of choosing from multiple IDEs. 5) .Net is 2 things:- .Net supported 5) Java is 2 things:- Java language and languages and .Net platform. Java platform. 6) .Net support over 40 languages 6) Java platform supports only java such as Cobol,Perl.Net,Vb.Net etc. language. 7) .Net uses disconnected data access 7) Java JDBC uses multiple round trips through ADO.Net wherein the to the database. connection is established and when required. 8) .Net has no direct support for open 8) Java has support from open source source platforms. platforms.

Page 6 of 6

MissionMCA.com

You might also like