Sem 6‎ > ‎


Random info

posted Apr 28, 2013, 9:14 AM by Neil Mathew   [ updated Apr 28, 2013, 10:13 AM by Neil Mathew ]

Marshaling and serialization are loosely synonymous in the context of remote procedure call, but semantically different as a matter of intent.

In particular, marshaling is about getting parameters from here to there, while serialization is about copying structured data to or from a primitive form such as a byte stream. In this sense, serialization is one means to perform marshaling, usually implementing pass-by-value semantics.

Difference b/w Marshalling and Unmarshalling

1. Convert paramaters into byte stream (suitable format for transmission) / reverse of marhalling

2. Serialization / Deserialization

3. Skeleton marshalls the result / Stub unmarshalls the result

JDBC code for create tables:

Difference b/w CGI (Common Gateway Interface) 

1.CGI are usually executables that are native to the server’s operating system, though servlets can also be compiled to the native OS it can be compiled to Java bytecode which is then run on a JVM
2.CGI programs are platform dependent while servlets are platform independent
3.CGI programs run as separate processes on the computer while servlets run on the JVM
4.CGI can be more vulnerable to attacks than servlets (security)
5.CGI can directly process scripts while it needs to be translated and compiled to before it can be run as a servlet
6. CGI is more expensive than Servlets.

Servlets can link directly to the Web server. CGI cannot directly link to Web server.
Servlets can share data among each other. CGI does not provide sharing property.
Servlets can perform session tracking and caching of previous computations. CGI cannot perform session tracking and caching of previous computations.
Servlets are portable. CGI is not portable.
In Servlets, the Java Virtual Machine stays up, and each request is handled by a lightweight Java thread. In CGI, each request is handled by a heavyweight operating system process.

Uses of Servlets

  • Process or store data that was submitted from an HTML form

  • Provide dynamic content such as the results of a database query

  • Manage state information that does not exist in the stateless HTTP protocol, such as filling the articles into the shopping cart of the appropriate customer

  • A Servlet can handle multiple request concurrently and be used to develop high performance system.

0 Examination Questions:

posted Apr 27, 2013, 10:06 PM by Neil Mathew   [ updated Apr 27, 2013, 10:06 PM by Neil Mathew ]


Q. Program to concatenate two strings using Remote Method Invocation.


Q. Display the user name and password inputted throught an HTML form using Servlet also write the web.xml file for the same.

Q. Program to create a Servlet that display the information about Cookies.

Q. Develop an application for banking manangement using JSP.

Q. Application using following components

a) Registry html file which will read student info (roll_no, name, class)

b) Student class having Roll_no, name, class as data member and connect(), disconnect(), validate() and insertdate() method. This class should use database connectivity.

c) MyServlet class which will either register student or display appropriate message if student is already registered.


Q. Create a table.
FirstName, Varchar, 50
LastName, Varchar, 50
Street, Varchar, 50
City, Varchar, 50
Zipcode, Varchar, 50

Display records as per following:
1. Insert 10 records in a table and display table contents.
2. Update 5 records and display the no of updated rows.
3. Display the table in descending order using scrollable methods. 

Q. Program to implement scrollable result set.

0 Course Contents:

posted Apr 27, 2013, 10:06 PM by Neil Mathew   [ updated Apr 27, 2013, 10:06 PM by Neil Mathew ]

Module I

Introduction to Java RMI, RMI services, RMI client, Running client and server, ODBC
and JDBC Drivers, Connecting to Database with the java.sql Package, Using JDBC
Terminology; Evolving Nature of Area.

Module II

Introduction to Servlets, Servlet Life Cycle, Servlet based Applications, Servlet and HTML. JSP:
Introduction to JSP, JSP implicit objects, JSP based Applications, Java. Net.

Module III

Enterprise Java Beans:-EJB roles—EJB Client-Object -container-Transaction Management—
implementing a Basic EJB Object-Implementing session Beans-Implementing Entity
Beans-Deploying an enterprise Java Beans Object-Changes in EJB1.1 specification.

Module IV

The Model-View-Controller Architecture What is Struts, Struts Tags, Creating Beans, Other Bean Tags,
Bean Output, Creating HTML Forms, The Action Form class The Action class, Simple Struts: a simple
Struts application

Module V

Android Platform overview, UI, Android Stack/Architecture, Android SDK, Android
building blocks, multimedia in Android, SQL Database in Android

1-4 of 4

Neil Mathew,
Apr 10, 2013, 6:31 AM