CSCI 4300 Exam 2 Definition

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Java Server Page

A JSP page is a text document that contains two types of text: static data, which can be expressed in any text-based format (such as HTML, SVG, WML, and XML), and JSP elements, which construct dynamic content.

JavaBean

A JavaBean is a specially constructed Java class written in the Java and coded according to the JavaBeans API specifications. Following are the unique characteristics that distinguish a JavaBean from other Java classes − It provides a default, no-argument constructor. It should be serializable and that which can implement the Serializable interface. It may have a number of properties which can be read or written. It may have a number of "getter" and "setter" methods for the properties.

JSON.parse

A common use of JSON is to exchange data to/from a web server. When receiving data from a web server, the data is always a string. Parse the data with JSON.parse(), and the data becomes a JavaScript object.

JSON.stringify

A common use of JSON is to exchange data to/from a web server. When sending data to a web server, the data has to be a string. Convert a JavaScript object into a string with JSON.stringify().

AJAX

AJAX = Asynchronous JavaScript And XML. AJAX is not a programming language. AJAX just uses a combination of: A browser built-in XMLHttpRequest object (to request data from a web server) JavaScript and HTML DOM (to display or use the data) AJAX is a misleading name. AJAX applications might use XML to transport data, but it is equally common to transport data as plain text or JSON text. AJAX allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.

Tomcat

Apache Tomcat is a Java Servlet container. It basically make our Java Web applications to run on host and server based system and it is configured on local host port 8080. It is used to run JSP, Servlet etc. There are many web servers available which can host your web application Tomcat is one of them.

Same-origin security policy

Assume you are logged into Facebook and visit a malicious website in another browser tab. Without the same origin policy JavaScript on that website could do anything to your Facebook account that you are allowed to do. For example read private messages, post status updates, analyse the HTML DOM-tree after you entered your password before submitting the form. But of course Facebook wants to use JavaScript to enhance the user experience. So it is important that the browser can detect that this JavaScript is trusted to access Facebook resources. That's where the same origin policy comes into play: If the JavaScript is included from a HTML page on facebook.com, it may access facebook.com resources.

Asynchronous

Asynchronous means that the script will send a request to the server, and continue it's execution without waiting for the reply. As soon as reply is received a browser event is fired, which in turn allows the script to execute associated actions.

webapps

Default app-based location is.

ServletRequest Object

Defines an object to provide client request information to a servlet. The servlet container creates a ServletRequest object and passes it as an argument to the servlet's service method. A ServletRequest object provides data including parameter name and values, attributes, and an input stream. Interfaces that extend ServletRequest can provide additional protocol-specific data (for example, HTTP data is provided by HttpServletRequest.

Serializable

It means that the class can be serialized. This means that it can be converted into an stream of 0's and 1's and be sent to other service, like a webservice or and ORM (hibernate) or whatever. Then this service knows how store the stream. Also, your program can receive a serialized class and create an instance for it from the stream of 0's and 1's. It's the way to "save" instances of classes and "restore" them at any other moment in time. To be able to make a class serializable, you must implement the interface "Serializable". Why so? Because when the moment to serialize a class arrive, the function writeObtject will be called to convert the object into bytes. On the other hand, when you have the bytes and you want to get the instance of the class, the function readObject will be called. Why is not automatic? A variable value it's already represented by bytes. Because the problem comes for example when a class holds instances of other classes. What do you do? You serialize the other classes as well? You just keep the reference address? It's pretty complex and it may be dependant on your type of project and design.

JSON JavaScript Object

JSON stands for JavaScript Object Notation JSON is a lightweight data interchange format JSON is language independent * JSON is "self-describing" and easy to understand * The JSON syntax is derived from JavaScript object notation syntax, but the JSON format is text only. Code for reading and generating JSON data can be written in any programming language.

JSON Language

JSON: JavaScript Object Notation. JSON is a syntax for storing and exchanging data. JSON is text, written with JavaScript object notation.

Expression Language

JSP Expression Language (EL) makes it possible to easily access application data stored in JavaBeans components. JSP EL allows you to create expressions both (a) arithmetic and (b) logical. Within a JSP EL expression, you can use integers, floating point numbers, strings, the built-in constants true and false for boolean values, and null.

New

Objects of the same type are created by calling the constructor function with the new keyword. Booleans can be objects (if defined with the new keyword) Numbers can be objects (if defined with the new keyword) Strings can be objects (if defined with the new keyword)

request.getParameter

Returns the value of a request parameter as a String, or null if the parameter does not exist. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data. You should only use this method when you are sure the parameter has only one value. If the parameter might have more than one value, use getParameterValues(java.lang.String). If you use this method with a multivalued parameter, the value returned is equal to the first value in the array returned by getParameterValues. If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via getInputStream() or getReader() can interfere with the execution of this method.

This

The JavaScript this keyword refers to the object it belongs to. This has different values depending on where it is used. In a method, this refers to the owner object. Alone, this refers to the global object. In a function, this refers to the global object. In a function, in strict mode, this is undefined. In an event, this refers to the element that received the event. Methods like call(), and apply() can refer this to any object.

XML Http

The XMLHttpRequest object can be used to request data from a web server. The XMLHttpRequest object is a developers dream, because you can: Update a web page without reloading the page Request data from a server - after the page has loaded Receive data from a server - after the page has loaded Send data to a server - in the background

onreadystatechange

The onreadystatechange property specifies a function to be executed every time the status of the XMLHttpRequest object changes: xhttp.onreadystatechange = function()

WEB-INF/lib

This directory contains JAR files required by the web application. Classes contained in these files will be decompressed and loaded at application start up.

WEB-INF/classes

This directory, contained within WEB-INF, is a repository of all the Java classes and packages required by the application (other than those contained in Tomcat's common or shared class repositories). These will be loaded when Tomcat starts the application, and are only visible to this application. Class files can be organized into packages within this directory, as long as they are organized with the standard Java naming structure.

WEB-INF

This directory, which is contained within the Document Root, is invisible from the web container. It contains all resources needed to run the application, from Java classes, to JAR files and libraries, to other supporting files that the developer does not want a web user to access. This folder also contains the application's deployment descriptor, an important XML file discussed below.

readyState and Status

When readyState property is 4 and the status property is 200, the response is ready: if (this.readyState == 4 && this.status == 200)

ServletRequest class

class which defines an object to provide client request information to a servlet


संबंधित स्टडी सेट्स

Biomechanics Lesson 8 Wrist and Hand with practice questions

View Set