Index
Index
HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard
text formatting language which is used to create and display pages on the Web. More details...
HTML tags are composed of three things: opening tag, content and ending tag. Some tags are
unclosed tags.
content, and
tags
Content is placed between tags to display data on the web page. More details... 3. Do all
No. There are some HTML tags that don't need a closing tag. For example: <image> tag, <br> tag.
HTML elements communicate to the browser to render text. When the elements are surrounded
by brackets <>, they form HTML tags. Most of the time, tags come in pair and surround content.
can insert a copyright symbol by using © or © in an HTML file. 6. How
No, you can use hyperlinks on text and images both. More details...
A style sheet is used to build a consistent, transportable, and well designed style template.
You can add these templates on several different web pages.
Yes. To create a multicolor text on a web page you can use <font color ="color"> </font> for the
specific texts you want to color.
The color of the bullet is always the color of the first text of the list. So, if you want to change the
color of the bullet, you must change the color of the text.
Marquee is used to put the scrolling text on a web page. You should put the text which you want to
scroll within the <marquee>......</marquee> tag. More details...
There are three tags used to separate the texts. i.e. usually <br> tag is used to separate line of texts.
Other tags are<p> tag and <blockquote> tag.
To make a picture a background image on a web page, you should put the following tag code after
the </head> tag.
1. <bodybackground="image.gif">
Here, replace the "image.gif" with the name of your image file which you want to display on your web
page.
Syntax: <iframesrc="URL"></iframe>
<iframesrc="http://www.javatpoint.com"name="iframe_a"></iframe>
15. What are the different new form element types in HTML 5? Color
Date
Datetime-local
Email
Time
Url
Range
Telephone
Number
Search
16. Is there any need to change the web browsers to support HTML5?
No. Almost all browsers (updated versions) support HTML 5. For example: Chrome, Firefox,
Opera, Safari, IE
https://career.guru99.com/xml-interview-questions/
XML is called Extensible Markup Language which is designed to carry or transport and store data.
XML tags are not as predefined as HTML, but we can define our own user tags for simplicity. It
mainly concentrates on storing of data, not on displaying of data.
HTML XML
Markup language used to display data Markup language used to store data Case
Insensitive Case sensitive
Designing web pages Used to transport and store data Predefined Tags Custom
Tags
Does not Preserve white spaces Preserve white spaces Static Dynamic
XML Document object represents the whole XML document, and it is the root of a document
tree. It gives access to entire XML document – Nodes and Elements, and it has its
own properties.
An attribute provides more or additional information about an element than otherwise. 22. What are
• XML structure is traversable, and it can be randomly accessed by traversing the tree. • XML
structure is modifiable, and values can be added, changed and removed
An XML document contains XML Elements, and it starts from an element’s start tag to end tag. It
can contain:
https://www.tutorialspoint.com/css/css_interview_questions.htm
is JSON?
JSON is a simple data exchange format. JSON means JavaScript Object Notation; it is language
and platform independent.
An object can be defined as an unordered set of name/value pairs. An object in JSON starts with
{left brace} and finish or ends with {right brace}. Every name is followed by: (colon) and the
name/value pairs are parted by, (comma).
One of the common use of JSON is to collect JSON data from a web server as a file or HTTP
request, and convert the JSON data to a JavaScript, ant then it avails the data in a web page.
Web Technology
Unit wise/ Oral Questions
45. Why must one use JSON over XML?
It is faster and lighter than XML as on the wire data format
XML data is typeless while JSON objects are typed
JSON types: Number, Array, Boolean, String
XML data are all string
Data is readily available as JSON object is in your JavaScript
47. Mention which function is used to convert a JSON text into an object? To convert
JSON.stringify() converts an object into a JSON text and saves that JSON text in a string.
var json = ‘{“name”: “Guru 99”, “Description “: “Learn PHP Interactively with PHP Beginner
Tutorials}
obj = $.parseJSON(json);
Netscape provided the JavaScript language. Microsoft changed the name and called it JScript to
avoid the trademark issue.In other words, you can say JScript is same as JavaScript, but it is
provided by Microsoft.
A simple example of JavaScript hello world is given below. You need to place it inside the body tag
of html.
<scripttype="text/javascript">
document.write("JavaScriptHelloWorld!");
Web Technology
Unit wise/ Oral Questions
</script>
4. How to use external JavaScript file?
I am assuming that js file name is message.js, place the following script tag inside the head tag.
<scripttype="text/javascript"src="message.js"></script>
DOM stands for Document Object Model. A document object represent the html document.
It can be used to access and change the content of html.
The window object is automatically created by the browser that represents a window of a browser.
It is used to display the popup dialog box such as alert dialog box, confirm dialog box, input dialog
box etc.
The history object of browser can be used to switch to history pages such as back and forward
from current page or another page. There are three methods of history object.
1. history.back()
2. history.forward()
3. history.go(number): number may be positive for forward, negative for backward. 9. How to
write comment in JavaScript?
2. Multi Line Comment: It is represented by slash with asterisk symbol as /* write comment
here */
functionfunction_name(){
//functionbody
1. By object literal
2. By creating instance of Object
3. By Object Constructor
Let's see a simple code to create object using object literal.
emp={id:102,name:"RahulKumar",salary:50000}
1. By array literal
2. By creating instance of Array
3. By using an Array constructor
14. Difference between Client side JavaScript and Server side JavaScript?
Client side JavaScript comprises the basic language and predefined objects which are relevant to
running java script in a browser. The client side JavaScript is embedded directly by in the HTML
pages. This script is interpreted by the browser at run time.
Server side JavaScript also resembles like client side java script. It has relevant java script which
is to run in a server. The server side JavaScript are deployed only after compilation.
15. In which location cookies are stored on the hard disk? The storage of
cookies on the hard disk depends on OS and the browser.
The Netscape navigator on Windows uses cookies.txt file that contains all the cookies. The path is :
c:\Program Files\Netscape\Users\username\cookies.txt
The Internet Explorer stores the cookies on a file username@website.txt. The path is: c:\
Windows\Cookies\username@Website.txt.
https://www.codeproject.com/Articles/618484/Latest-jQuery-interview-questions and-answers
https://www.javatpoint.com/servletinterview
1. How many objects of a servlet is created?
Only one object at the time of first request by servlet or web container. 2. What is
1. Servlet is loaded
2. servlet is instantiated
3. servlet is initialized
4. service the request
5. servlet is destroyed
3. What are the life-cycle methods for a servlet?
Method Description
public void init(ServletConfig config) It is invoked only once when first request
comes for the servlet. It is used to
Web Technology
Unit wise/ Oral Questions
initialize the servlet.
1) Limited amount of data can be sent Large amount of data can be sent
because data is sent in header. because data is sent in body.
2) Not Secured because data is exposed in Secured because data is not exposed in
URL bar. URL bar.
4) Idempotent Non-Idempotent
5) It is more efficient and used than Post It is less efficient and used
A cookie is a small piece of information that is persisted between the multiple client requests. A cookie
has a name, a single value, and optional attributes such as a comment, path and domain qualifiers, a
maximum age, and a version number.
Web Technology
Unit wise/ Oral Questions
https://www.javatpoint.com/jspinterview
Java Server Pages technology (JSP) is used to create dynamic web page. It is an extension to the
servlet technology. A JSP page is internally converted into servlet.
13. What are the life-cycle methods for a jsp?
Method Description
The jsp comment is called hide comment whereas html comment is called output comment. If
user views the source of the page, the jsp comment will not be shown whereas html comment
will be shown.
1) out JspWriter
2) request HttpServletRequest
3) response HttpServletResponse
4) config ServletConfig
5) session HttpSession
6) application ServletContext
7) pageContext PageContext
8) page Object
9) exception Throwable
1) The include directive includes the 1) The include action includes the content at
content at page translation time. request time.
2) The include directive includes the 2) The include action doesn't include the
original content of the page so page original content rather invokes the include()
size increases at runtime. method of Vendor provided class.
3) It's better for static pages. 3) It's better for dynamic pages.
18. How can I implement a thread-safe JSP page? What are the advantages
and Disadvantages of using it?
You can make your JSPs thread-safe by having them implement the SingleThreadModel interface.
This is done by adding the directive <%@ page isThreadSafe="false" %> within your JSP page.
19. How can I prevent the output of my JSP or Servlet pages from being cached by the
browser?
<
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setHeader("Expires","0");//preventscachingattheproxyserver %>
What is PHP?
PHP is a web language based on scripts that allows developers to dynamically create
generated web pages.
The main difference between sessions and cookies is that sessions are stored on the server, and
cookies are stored on the user's computers in the text file format. Cookies can't hold multiple variable
while session can hold multiple variables..We can set expiry for a cookie,The session only remains
active as long as the browser is open.Users do not have access to the data you stored in
Session,Since it is stored in the server.Session is mainly used for login/logout purpose while cookies
using for user activity tracking
How to set cookies in PHP?
Setcookie("sample", "ram", time()+3600);
How to Retrieve a Cookie Value?
eg : echo $_COOKIE["user"];
How to create a session? How to set a value in session ? How to Remove data from a
session?
Create session : session_start();
Set value into session : $_SESSION['USER_ID']=1;
Remove data from a session : unset($_SESSION['USER_ID'];
javascript is a client side scripting language, so javascript can make popups and other things
happens on someone’s PC. While PHP is server side scripting language so it does every stuff with
the server.
https://www.javatpoint.com/ajax-interview-questions
1) What is AJAX?
AJAX stands for Asynchronous JavaScript and XML. It is a group of related technologies to display data
asynchronously. More details...
4) What are the real web applications of AJAX currently running in the market? Twitter
Facebook
Gmail
Javatpoint
Youtube etc.
Web Technology
Unit wise/ Oral Questions
Synchronous request blocks the user until response is retrieved whereas asynchronous doesn't
block the user.
JSON stands for JavaScript Object Notation. It is easy to understand and data exchange is fast than
XML. It supports array.
There are two most widely used tools for debugging AJAX applications.
Firebug for Mozilla Firefox
Fiddler for IE (Internet Explorer)
JavaScript makes a request to the server and waits for the response. It consumes more
bandwidth as it reloads the page.
AJAX sends a request to the server and doesn't wait for the response. It doesn't reload the page so
consumes less bandwidth.
1) What is AngularJS?
AngularJS is a JavaScript framework i.e. used to create single web page application. It follows MVC
(Model View Controller) pattern. It is open source, cross browser compliant and easy to maintain.
supports animation
open source
JavaScript Dependent: If end user disables JavaScript, AngularJS will not work.
Not Secured: It is JavaScript based framework so it is not safe to authenticate user through
AngularJS only.
Eclipse
Visual Studio
WebStorm
TextMate etc.
6) What are the features of AngularJS?
1. MVC
2. Validations
3. Modules
4. Directives
5. Templates
6. Scope
7. Expressions
8. Data Binding
9. Filters
10.Services
11.Routing
12.Dependency Injection
13.Testing
7) What are directives in AngularJS?
Directives are the markers on DOM element that is used to specify behavior on that DOM element. All
AngularJS directives start with the word "ng". There are many in-built directives in AngularJS such as
"ng-app", "ng-model", "ng-controller", "ng-repeat" etc.
1. <inputtype="text"id="empName"ng-model="EmpName"/>
Controllers are JavaScript functions that are used to provide data and logic to HTML UI. It acts as an
interface between Server and HTML UI.
Data Binding is the automatic synchronization of data between model and view. There are two ways of
data binding:
One way data binding (used in classical template)
Two way data binding (used in AngularJS template)
Services are objects that can be used to store and share data across the application. AngularJS
offers many built-in services such as $http i.e. used to make XMLHttpRequest.
Each AngularJS application can have only one root scope but can have multiple child scopes.
A template consists of HTML, CSS and AngularJS directives that are used to render dynamic
view.
Expressions are the code snippets that resolves to a value. AngularJS expressions are placed
inside {{expression}}. For example:
A filter is used to format the value of expression to display the formatted output. AngularJS
enables us to write our own filter.
https://career.guru99.com/top-25-interview-questions-on-node-js/ 1) What is
node.js?
Node.js is a Server side scripting which is used to build scalable programs. Its multiple advantages
over other server side languages, the prominent being non-blocking I/O.
Node.js works on a v8 environment, it is a virtual machine that utilizes JavaScript as its scripting
language and achieves high output via non-blocking I/O and single threaded event loop.
Web Technology
Unit wise/ Oral Questions
3) What do you mean by the term I/O ?
I/O is the shorthand for input and output, and it will access anything outside of your application. It
will be loaded into the machine memory to run the program, once the application is started.
In computer programming, event driven programming is a programming paradigm in which the flow of
the program is determined by events like messages from other programs or threads. It is an
application architecture technique divided into two sections 1) Event Selection 2) Event Handling
A generic piece of code which runs in between several asynchronous function calls is known as
control flow function.
9) Explain the steps how “Control Flow” controls the functions calls?
a) Control the order of execution
b) Collect data
c) Limit concurrency
d) Call the next step in program
10) Why Node.js is single threaded
For async processing, Node.js was created explicitly as an experiment. It is believed that more
performance and scalability can be achieved by doing async processing on a single thread under
typical web loads than the typical thread based implementation.
Web Technology
Unit wise/ Oral Questions
13) Using the event loop what are the tasks that should be done asynchronously? a) I/O
operations
b) Heavy computation
c) Anything requiring blocking
Node.js is quickly gaining attention as it is a loop based server for JavaScript. Node.js gives user the
ability to write the JavaScript on the server, which has access to things like HTTP stack, file I/O, TCP
and databases.
To process and handle external events and to convert them into callback invocations an event loop
is used. So, at I/O calls, node.js can switch from one request to another .
Pros: a) If your application does not have any CPU intensive computation, you can build it in Javascript
top to bottom, even down to the database level if you use JSON storage object DB like MongoDB.
b) Crawlers receive a full-rendered HTML response, which is far more SEO friendly rather than a single
page application or a websockets app run on top of Node.js.
Cons: a) Any intensive CPU computation will block node.js responsiveness, so a threaded platform is
a better approach.
b) Using relational database with Node.js is considered less favourable 19) How Node.js
Node.js solves this problem by putting the event based model at its core, using an event loop instead
of threads.
The difference between Node.js and Ajax is that, Ajax (short for Asynchronous Javascript and XML) is
a client side technology, often used for updating the contents of the page without refreshing it.
While,Node.js is Server Side Javascript, used for developing server
Web Technology
Unit wise/ Oral Questions
software. Node.js does not execute in the browser but by the server.
Emphasizing on the technical side, it’s a bit of challenge in Node.js to have one process with one
thread to scale up on multi core server.
22) What does it mean “non-blocking” in node.js?
In node.js “non-blocking” means that its IO is non-blocking. Node uses “libuv” to handle its IO in a
platform-agnostic way. On windows, it uses completion ports for unix it uses epoll or kqueue etc.
So, it makes a non-blocking request and upon a request, it queues it within the event loop which
call the JavaScript ‘callback’ on the main JavaScript thread.
1. SOAP Web Services: Runs on SOAP protocol and uses XML technology for sending data.
2. Restful Web Services: It’s an architectural style and runs on HTTP/HTTPS protocol almost all
the time. REST is a stateless client-server architecture where web services are resources
and can be identified by their URIs. Client applications can use HTTP GET/POST methods to
invoke Restful web services.
What is SOAP?
SOAP stands for Simple Object Access Protocol. SOAP is an XML based industry standard protocol
for designing and developing web services. Since it’s XML based, it’s platform
Web Technology
Unit wise/ Oral Questions
and language independent. So our server can be based on JAVA and client can be on .NET,
PHP etc. and vice versa.
SOAP uses XML data for payload as well as contract, so it can be easily read by any technology.
SOAP protocol is universally accepted, so it’s an industry standard approach with many easily
available open source implementations.
Only XML can be used, JSON and other lightweight formats are not supported.
SOAP is based on the contract, so there is a tight coupling between client and server
applications.
SOAP is slow because payload is large for a simple string message, since it uses XML
format.
Anytime there is change in the server side contract, client stub classes need to be generated
again.
REST is the acronym for REpresentational State Transfer. REST is an architectural style for
developing applications that can be accessed over the network. REST architectural style was brought
in light by Roy Fielding in his doctoral thesis in 2000.
REST is a stateless client-server architecture where web services are resources and can be identified
by their URIs. Client applications can use HTTP GET/POST methods to invoke Restful web services.
REST doesn’t specify any specific protocol to use, but in almost all cases it’s used over HTTP/HTTPS.
When compared to SOAP web services, these are lightweight and doesn’t follow any standard. We can
use XML, JSON, text or any other type of data for request and response.
SOAP web services and client REST doesn’t have any contract defined
programs are bind with WSDL between server and client
contract
SOAP web services and client are REST web services are loosely coupled.
tightly coupled with contract.
SOAP supports XML data format only REST supports any data type such as
XML, JSON, image etc.
https://www.javatpoint.com/ejb-interview-questions
1) What is EJB?
EJB stands for Enterprise Java Bean. It is a server-side component to develop scalable, robust and
secured enterprise applications in java. More details...
Session Bean encapsulates business logic. It can be invoked by local, remote or web service
client.
There are 3 types of session bean.
1. Stateless Session Bean
2. Stateful Session Bean
3. Singleton Session Bean
4) What is stateless session bean?
Web Technology
Unit wise/ Oral Questions
Stateless session bean is a business object that doesn't maintain conversational state with the client.
Singleton session bean is instantiated only once for the application. It exists for the life cycle of the
application.
Entity Bean is a server side component that represents the persistent data. Since EJB 3.x, it is
replaced by JPA.
https://career.guru99.com/top-14-jsf-interview-questions/
Java Server Faces or JSF : It is a java based web application framework to make the user
interface simple for JEE applications. Instead of traditional request driven MVC framework it uses
component based approach.
JSF is designed on the MVC (Model-View-Controller) framework and this allows for applications
to be scaled better. A JSF application is same like other Java technology based web application,
it runs in a JAVA servlet container and it contains
JavaBeans components as models consisting data and application-based
functionality
Custom tag library for representing validators and event handlers Custom
tag library for rendering UI components
UI components signified as stateful objects on the server
Server side helper classes
Event handlers, validators and navigation handlers
Application configuration resource file for organizing and configuring application resources
Restore view phase: During this phase binding of components to its event handlers and
validators are executed and view is saved in the FacesContext object
Apply request values phase: The motive of this phase is to retrieve its current date for each
component
Process validation phase: During this phase, local values saved for the component in the tree
are compared to the components validation rules registered
Update model value phase: After verifying, that data is genuine or valid in the
Web Technology
Unit wise/ Oral Questions
previous phase, local values of components can be set to related server side object properties
Invoke application phase: Prior to this phase the component values have been transformed,
validated and applied to the bean objects, so that you can avail them to run the application’s
business logic
Render response phase: JSP container renders the page back to the user in this phase
4) List out the available implementations of JavaServer faces?
When it comes to JSF there are Reference Implementation (RI) by Sun Microsytems; Apache MyFaces
is an open source JavaServer Faces (JSF) implementation and for Oracle there is ADF Faces.
Web Technology
Unit wise/ Oral Questions
actions, value changes and phase There are no such event models in
changes in JSF lifecycle struts
JSF component tag does not produce Struts tag generates HTML
HTML-instead they declare a directly
component renderer pair on the server
To define navigation struts uses the
By mentioning a navigation rule in the notation
faces configuration file, JSF supports
navigation There is no dependencies
injection in struts
JSF uses dependencies injection
https://www.javatpoint.com/spring-interview-questions
1) What is Spring?
It is a lightweight, loosely coupled and integrated framework for developing enterprise applications
in java.
https://career.guru99.com/top-25-bootstrap-interview-questions/ 1) Explain
what is Bootstrap?
Bootstrap is a HTML, CSS, and JS framework for building the rich web applications with minimal
effort. This framework emphasis more on building mobile web applications.
2) Explain why to choose Bootstrap for building the websites? There are
few reason why we choose Bootstrap for building websites
Mobile Support: For mobile devices it provides full support in one single file rather than in
separate file. It supports the responsive design including adjusting the CSS based on the
different types of device, size of the screen etc. It reduces extra effort for developers.
Web Technology
Unit wise/ Oral Questions
Easy to learn: Writing application in bootstrap is easy if you know CSS and HTML
Browser Support: It supports all the popular browsers like Firefox, Opera, Safari, IE etc.
Customize: To get your own version of framework you can customize your
components
http://www.javapedia.net/JNDI
https://career.guru99.com/top-25-joomla-interview-questions/
https://career.guru99.com/top-40-word-press-interview-questions/
What is JNDI?
JNDI stands for Java Naming and Directory Interface. JNDI allows distributed applications
to look up services in an abstract, resource-independent way.
What is JNDI Lookup?
lookup() attempts to find the specified object in the given context. It looks for a single, specific
object and either finds it in the current JNDI context or it fails.
What is WordPress?
Word press is a best Open Source CMS which allows it to be used free of cost. You can
use it on any kind of personal or commercial website without have to pay a single penny for
it. It is built on PHP/MySQL (which is again Open Source) and licensed under GPL.