21 Java Web Interview Questions And Answers – Web Java Interview Questions For Experienced from Codingcompiler. Test your Java web knowledge by answering these tricky interview questions on Java web. Let’s start learning Java web interview questions and prepare for Java interviews. All the best for your future and happy learning.
Java Web Interview Questions
- What is www?
- What is w3c?
- What is TCP / IP?
- What is ftp?
- What is the difference between http and https?
- What is a data transfer protocol, what do you know?
- What is a web server?
- What is a web application?
- What is an application server?
- What is the difference between a web server and an application server?
- What data transfer methods do you know?
- What is the difference between get and post methods?
- What is html?
- What is xml?
- What is css?
- What is the MIME type?
- What are cookies?
- What is a session?
- Give the definition of “authorization” and “authentication”, what are their differences?
- What is Ajax? How is this technology fundamentally arranged?
- What is ORM, how to translate it and how should it work?
Related Java Interview Questions
- Java IO Interview Questions
- Java String Interview Questions
- Java Collections Interview Questions
- Java Exceptions Interview Questions
- Java OOPS Interview Questions
- Core Java Interview Questions
- JSF Interview Questions
- JSP Interview Questions
- JPA Interview Questions
- Spring Framework Interview Questions
- Spring Boot Interview Questions
- Core Java Multiple Choice Questions
- 60 Java MCQ Questions And Answers
- Aricent Java Interview Questions
- Accenture Java Interview Questions
- Advanced Java Interview Questions For 5 8 10 Years Experienced
- Core Java Interview Questions For Experienced
Java Web Interview Questions And Answers
1. What is www?
The World Wide Web is a distributed system that provides access to interconnected documents located on various computers connected to the Internet. To refer to the World Wide Web also use the word web (English web “web”) and the abbreviation WWW.
The world wide web is made up of hundreds of millions of web servers. Most of the World Wide Web resources are based on hypertext technology. Hypertext documents hosted on the World Wide Web are called web pages. Several web pages, united by a common theme, design, and also linked by links and usually located on the same web server, are called a website. For loading and browsing web pages special programs are used – browsers (English browser).
2. What is w3c?
The World Wide Web Consortium (W3C) is an organization that develops and implements technology standards for the World Wide Web. The consortium is led by Sir Timothy John Berners-Lee, the author of many developments in the field of information technology.
3. What is TCP / IP?
TCP / IP protocol stack – a set of network data transfer protocols used in networks, including the Internet. The name TCP / IP comes from the two most important protocols of the family, the Transmission Control Protocol (TCP) and Internet Protocol (IP), which were developed and described first in this standard.
The TCP / IP protocol stack includes four layers:
-
- application layer (application layer)
-
- transport layer
-
- network layer (Internet layer),
- link layer (link layer).
4. What is ftp?
FTP (English File Transfer Protocol) is a standard protocol for transferring files over TCP networks (for example, the Internet). Uses the 21st port. FTP is often used to download web pages and other documents from a private development device to open hosting servers.
The protocol is based on the client-server architecture and uses different network connections to transfer commands and data between the client and the server. FTP users can authenticate by passing login and password in clear text, or, if allowed on the server, they can connect anonymously. You can use the SSH protocol for secure transmission, hiding (encrypting) the login and password, as well as encrypting the contents.
5. What is the difference between http and https?
HTTP (English HyperText Transfer Protocol – “Hypertext Transfer Protocol”) is an application-level data transfer protocol (initially, in the form of hypertext documents in HTML format, currently used to transfer arbitrary data).
The basis of HTTP is the client-server technology, that is, it is assumed that there are consumers (clients) that initiate the connection and send a request, and providers (servers) that wait for the connection to receive the request, perform the necessary actions and return the message with the result.
HTTPS (abbr. From the English. HyperText Transfer Protocol Secure) is an extension of the HTTP protocol that supports encryption. Data transmitted over the HTTPS protocol is “packed” into the SSL or TLS cryptographic protocol. Unlike HTTP, TCP port 443 is used by default for HTTPS.
HTTPS is not an independent data transfer protocol, but HTTP with an add-on encryption. This is the key and the only difference.
-
- HTTP is the data transfer protocol itself, HTTPS is an extension of this protocol.
-
- HTTPS is used for encrypted communication.
-
- HTTPS is also used for authorization on servers that require increased attention to data security.
- HTTP works with port 80, HTTPS with port 443.
6. What is a data transfer protocol, what do you know?
A data transfer protocol is a set of logical-level interface agreements that define the exchange of data between different programs.
Examples of network protocols
TCP / IP – a set of data transfer protocols, called from two protocols belonging to it: TCP (Transmission Control Protocol) and IP (Internet Protocol)
The most well-known protocols used on the Internet:
HTTP (Hyper Text Transfer Protocol) is a hypertext transfer protocol. HTTP is used when sending Web pages between computers connected to the same network.
FTP (File Transfer Protocol) is a protocol for transferring files from a special file server to a user’s computer. FTP allows the subscriber to exchange binary and text files with any computer on the network. Having established connection with a remote computer, a user can copy a file from a remote computer to his own or copy a file from his computer to a remote one.
Post Office Protocol (POP) is a standard mail connection protocol. POP servers process incoming mail, and POP protocol is designed to handle requests for receiving mail from client mail programs.
SMTP (Simple Mail Transfer Protocol) is a protocol that defines a set of rules for transferring mail. The SMTP server returns either an acknowledgment of receipt, an error message, or requests additional information.
TELNET is a remote access protocol. TELNET allows the subscriber to work on any computer located on the same network as on his own, that is, to run programs, change the operation mode, and so on. In practice, the possibilities are limited by the level of access specified by the administrator of the remote machine.
7. What is a web server?
A web server is a server that accepts HTTP requests from clients, usually web browsers, and gives them HTTP responses, usually with an HTML page, image, file, media stream, or other data.
A web server refers to both the software that performs the functions of a web server and the computer itself (see: Server (hardware)) on which this software runs.
8. What is a web application?
A web application is a client-server application in which the client is a browser, and the server is a web server. The web application logic is distributed between the server and the client, data is stored primarily on the server, information is exchanged over the network.
9. What is an application server?
Application Server (English application server) is a software platform (framework) designed to efficiently execute the procedures (programs, scripts) on which applications are built. An application server acts as a set of components accessible to a software developer through an API (Application Programming Interface) defined by the platform itself.
For web applications, the main task of the server components is to ensure the creation of dynamic pages. However, modern application servers also include support for clustering, increased fault tolerance, load balancing, thus allowing developers to focus only on the implementation of business logic.
10. What is the difference between a web server and an application server?
Application Server (English application server) – a server that executes some application programs. Application Server – an object that processes requests related to applications, more precisely for executing application processes (data retrieval, data retrieval, work with terminals). In theory, this technology was initially not at all related to Web’om, however, now the web application server is said more often. Practically used to work with databases.
A web server is a server that accepts HTTP requests from clients, usually web browsers, and issues HTTP responses to them. A web server is an object that processes requests, in particular http requests. The browser in this case is the client that makes requests (POST, GET).
21 Advanced Java Web Interview Questions And Answers
11. What data transfer methods do you know?
The main methods are POST and GET.
12. What is the difference between get and post methods?
GET method.
The GET method is convenient because it is easy to use. But he has flaws. First, the GET method cannot transmit large amounts of information, because the data transmitted by this method is included in the URL, the length of which is limited.
Since the data transmitted by the GET method is part of the URL of the document, anyone who wishes can see it. It has advantages and disadvantages. The advantage is that you can send a link with the data to a friend. The disadvantage is that your just entered password is displayed in the browser bar. This is one of the reasons why data that represents value should always be transferred using the POST method.
POST method.
Like the GET method, the POST method is used to transfer data to the server. However, the data transmitted in this way is not in the URL of the document, but in the body of the request, after the headers. This data can be perceived by the CGI program.
When data is sent using the POST method, something like this comes to the server:
1
2 3 4 5 6 7 8 9 10 11 12 13 14 |
POST lines.pl HTTP/1.1
Accept: */* Referer: https://example.com/example.html Accept-Language: ru Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) Host: example.com Content-Length: 106 Connection: Keep-Alive Cache-Control: no-cache line=%E4%E0%ED%ED%FB%E5+%F4%EE%F0%EC%FB%2C %EF%E5%F0%E5%E4%E0%E2%E0%E5%EC%FB%E5+%EC%E5%F2%EE%E4%EE%EC+POST |
The advantages of the POST method are obvious: you can transfer unlimited amounts of information, and no one will see this information after you send it (meaning, in the browser line).
But there are also disadvantages:
-
- Slower than GET, since the headers and body of the request are analyzed.
-
- Pages generated as a result of a POST request cannot be bookmarked (SEO-unfriendly)
- In addition, if you need to “push” data through several forms or pages, this will cause additional difficulties.
13. What is html?
HTML is a markup language. You use HTML to mark up a text document, just as the editor does with a bold red pencil. These marks are used to determine the format (or style) that will be used when displaying text on a monitor screen.
14. What is xml?
XML, or Extensible Marking Language – eXtensible Markup Language, is designed to provide Web developers with the ability to define the content of more complex documents, and with a more accurate “data display” than before.
XML was developed as a language with a simple formal syntax, convenient for creating and processing documents for programs and at the same time convenient for reading and creating documents by a person, emphasizing the focus on use on the Internet.
The language is called extensible because it does not fix the markup used in the documents: the developer is free to create markup in accordance with the needs of a specific area, being limited only by the syntactic rules of the language.
15. What is css?
CSS (Cascading Style Sheets – Cascading Style Sheets) is one of the basic technologies in the modern Internet. Infrequently, you can find a site that is laid out without CSS. CSS code is a list of browser instructions, how and where to display elements of a web page, written in a special way.
Java Web Interview Questions And Answers For Experienced
16. What is the MIME type?
MIME (Multipurpose Internet Mail Extensions, multipurpose Internet Mail Extensions) is an Internet standard that is part of the HTTP protocol. A MIME task is to identify the content type of a document by its header. For example, a text file is of type text / plain, and an HTML file is text / html. The header is usually sent based on the file extension of the web server.
Internet Media Types are data types that can be transmitted via the Internet using the MIME standard. Below is a list of MIME headers and file extensions.
According to RFC 2045, RFC 2046, RFC 4288, RFC 4289 and RFC 4855 [2], the following basic types of transmitted data are distinguished: application, audio, example, image, message, model, multipart, text, video.
17. What are cookies?
Cookies (from English cookies – cookies) – a small piece of data sent by a web server and stored on the user’s computer. A web client (usually a web browser) each time you try to open the page of the corresponding site sends this piece of data to the web server as part of an HTTP request. It is used to save data on the user’s side, in practice it is usually used for:
user authentication;
storing personal preferences and user preferences;
tracking session state access;
keeping statistics about users.
18. What is a session?
Session (from the English. Session) – the time interval between the first and last requests that the user sends from his device (computer, phone) to the site server. During one session, the visitor performs any active actions: follows links, fills out forms, downloads data – all such information is recorded and stored in the so-called log file of the site. The session ends when the user has not received any requests for a certain period of time or when the connection is broken.
19. Give the definition of “authorization” and “authentication”, what are their differences?
Authorization (eng. Authorization – permission, authorization) – the granting of a certain person or group of persons the right to perform certain actions; as well as the process of checking (confirming) these rights when attempting to perform these actions. You can often hear the expression that a person is “authorized” to perform this operation – this means that he has a right to it.
Authentication – authentication procedure, for example:
-
- User authentication by comparing the password entered by him with the password stored in the user database;
-
- confirmation of the authenticity of the e-mail by verifying the digital signature of the letter using the public key of the sender;
- checking the checksum of the file against the amount claimed by the author of this file.
Authorization should not be confused with authentication: authentication is a procedure for checking the legality of a user or data, for example, checking whether a password entered by a user matches a password in a database, checking a digital signature of a letter using an encryption key, or checking the checksum of a file this file. Authorization, on the other hand, controls access of legitimate users to system resources after they successfully pass authentication. Often, authentication and authorization procedures are combined.
20. What is Ajax? How is this technology fundamentally arranged?
AJAX is an abbreviation of Asynchronous Javascript and XML. When using AJAX, there is no need to refresh the entire page each time, since only its specific part is updated. Advantages of AJAX:
-
- The ability to create a convenient Web-interface
-
- Active user interaction
-
- Partial page reload, instead of full
- The convenience of use
AJAX uses two methods of working with a web page: changing a web page without reloading it, and dynamically accessing the server. The second can be done in several ways, in particular, XMLHttpRequest, which we will talk about, and using the hidden frame technique.
In order to exchange data, an XMLHttpRequest object must be created on the page, which is a kind of intermediary between the user’s browser and the server. Using XMLHttpRequest, you can send a request to the server, as well as receive a response in the form of various kinds of data.
21. What is ORM, how to translate it and how should it work?
ORM (English Object-Relational Mapping, Russian object-relational mapping) is a programming technology that links databases with the concepts of object-oriented programming languages, creating a “virtual object database.” There are both proprietary and free implementations of this technology.
Must Read Java Interview Questions Books 2019
RELATED INTERVIEW QUESTIONS
- Java Multithreading Interview Questions
- Java IO Interview Questions
- Java String Interview Questions
- Java Collections Interview Questions
- Java Exceptions Interview Questions
- Java OOPS Interview Questions
- Core Java Interview Questions
- JSF Interview Questions
- JSP Interview Questions
- JPA Interview Questions
- Spring Framework Interview Questions
- Spring Boot Interview Questions
- Core Java Multiple Choice Questions
- 60 Java MCQ Questions And Answers
- Aricent Java Interview Questions
- Accenture Java Interview Questions
- Advanced Java Interview Questions For 5 8 10 Years Experienced
- Core Java Interview Questions For Experienced
- GIT Interview Questions And Answers
- Network Security Interview Questions
- CheckPoint Interview Questions
- Page Object Model Interview Questions
- Apache Pig Interview Questions
- Python Interview Questions And Answers
- Peoplesoft Integration Broker Interview Questions
- PeopleSoft Application Engine Interview Questions
- RSA enVision Interview Questions
- RSA SecurID Interview Questions
- Archer GRC Interview Questions
- RSA Archer Interview Questions
- Blockchain Interview Questions