CCS375 WT QB
CCS375 WT QB
CCS375 WT QB
PART-A
4. What is JSP?
Java Server Pages (JSP) is a technology for developing web pages that support dynamic content
which helps developers insert java code in HTML pages by making use of special JSP tags, most of which
start with <% and end with %>.
5. What are advantages of using JSP?
a. Performance is significantly better because JSP allows embedding Dynamic Elements in HTML
Pages itself.
b. JSP are always compiled before it's processed by the server unlike CGI/Perl which requires the
server to load an interpreter and the target script each time the page is requested.
6. What are servlets?
Servlets are simple java programs that run on the server. The servlets are used along with the http
protocol. Hence sometimes they are also refered as http servlets. Servlets make use of standard packages
such as javax.servlet and javax.servlet.http.
7. What are the two commonly used Request methods? Differentiate it.
The two most common request methods used are GET and POST. The request methods tell the script how
it was invoked. Based on this information, the script decides how to act. The request method is passed to the
script using environment variable called REQUEST- METHOD.
Parameters GET POST
Mrs.C.Surya-AP/CSE
8154-Sri Ramakrishna College of Engineering CCS375-Web Technologies
Usage Loading web pages, downloading files Form submissions, uploading files
8. Explain cookies.
Cookies are some little information that can be left on your computer by the other computer when we
access an internet. The information is stored in the cookies using the name value pair.
9. What is JDBC?
The JDBC stands for Java Database Connectivity. JDBC is nothing but an API. It consists of various classes,
interfaces, exceptions using which java application can send SQL statements to a database. JDBC is specially used
for the connectivity of java with RDBMS packages.
10. Write a note on Environment variables.
In CGI, the server prepares the environment variables before it launches the CGI script. These represent
the current state of the server that is asking for the information. The environment variables are not set from the
command line but are created on the fly, and lasts only until that particular script is finished. Each script gets its
own unique set of variables and multiple scripts can be executed at once, each in its own environment.
11. Explain about Session tracking.
A session is basically a conversation between a browser and a server. All the above technologies can
save information for the current session for a particular user visiting a site. The session is important, as H1TPis a
stateless protocol. This means that the connection between web server and a web browser is not automatically
maintained, and that the state of a web session is not saved.
PART-B
1. Describe in detail about Java Servlet Architecture (or) Servlets (or) Servlet Life cycle.
2. Discuss in detail about the classes and interfaces of Servlet API.
3. What is the difference between HTTP-GET and HTTP-POST request? Write a servlet which accepts two
numbers using POST methods and display the maximum of them. (or) any other sample programs.
4. Explain in detail about Servlet Database Connectivity with an example of student database.
5. Explain in detail about session tracking system.
6. Write a servlet to illustrate the principles of cookies and explain.
Mrs.C.Surya-AP/CSE
8154-Sri Ramakrishna College of Engineering CCS375-Web Technologies
CCS375 – WEB TECHNOLOGIES
PART-A
1. What is PHP?
PHP - Hypertext Preprocessor -one of the most popular server-side
scripting languages for creating dynamic Web pages.
- an open-source technology
- platform independent
2. List the data types used in PHP.
Data types Description
Integer Whole numbers (i.e., numbers without a decimal point)
Double Real numbers (i.e., numbers containing a decimal point)
String Text enclosed in either single ('') or double ("") quotes.
Boolean True or false
Array Group of elements of the same type
Object Group of associated data and methods
Resource An external data source
Mrs.C.Surya-AP/CSE
8154-Sri Ramakrishna College of Engineering CCS375-Web Technologies
HTML stands for Hyper Text Markup Language. XML stands for Extensible Markup Language.
HTML can ignore small errors. XML does not allow errors.
HTML tags are predefined tags. XML tags are user-defined tags.
In HTML, closing tags are not necessary. In XML, closing tags are necessary.
Mrs.C.Surya-AP/CSE
8154-Sri Ramakrishna College of Engineering CCS375-Web Technologies
11. How do you declare a variable using PHP data types?
Data types are not explicitly defined:
• Variable type is determined by assignment
• Strings can be defined with single ( ’ ) and double ( ") quotes.
• PHP has a Boolean type:Defined as false
– An integer or float value of 0 or
– The keyword false
– The empty string ‘‘’’ or the string ‘‘0’’
– An empty array or object
– The NULL valueDefined as true
– Any non-zero integer or float value
– The keyword true
• Standard operators with standard syntax applied to variables
Mrs.C.Surya-AP/CSE