• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/26

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

26 Cards in this Set

  • Front
  • Back

What is the difference between HTTP Get and HTTP Post?

Get retrieves data while Post is usually used to send data securely. Get requests can be cached, bookmarked, and are limited by browser character limits. Post stores data in the request body, and have no browser restrictions on data length.

What is the life cycle of a servlet?

Init, service, destroy

What is freemarker?

A templating engine used to generate dynamic content.

What is a servlet?

A class that extends HttpServlet (or some other concrete class that extends GenericServlet) and processes requests and generates responses.

What is a server?

Serves files and other resources that a client requests.

What is web.xml and what are the necessary mappings?

It defines the servlets and their mappings. You need <servlet> and <servlet-mapping>. <servlet> needs <servlet-name> and <servlet-class> while <servlet-mapping> needs <servlet-name> and <url-pattern>

What is the difference between GenericServlet and HttpServlet?

GenericServlet is an abstract class that implements Servlet and defines service(). HttpServlet is a concrete extension of GenericServlet and provides the ruleset for transmitting HTML.

How do you preload or preinitialize a servlet?

Use the <load-on-startup> tag in web.xml within the <servlet> tags

What is a servlet config and what are the important tags?

A servlet config defines the initialization parameters for one servlet. To define a parameter, use <init-parameter> within <servlet> and inside use <param-name> and <param-value>

What is a servlet context and what are the important tags?

Allows a parameter to be shared be all servlets in the application. There is only 1 per application. To define a parameter, use <context-param> between the <web-app> tags in web.xml, and inside use <param-name> and <param-value>

What is the difference between the guard and default operators in javascript?

The guard operator, or &&, returns the second value if the first is truthy, or the first if falsy. Teh default operator, or ||, is mainly used to define a default value. If the first is truthy, the first is returned. Otherwise the second is returned.

What is the difference between a forward and a redirect, and how do you declare either?

A forward returns a display to the request based on a server-side process. It is done using request.getRequestDispatcher("url pattern").forward(request, response). A redirect tells the browser to try a completely different resource. This is a client-side operation. This is done with response.sendRedirect("url pattern")

What's a servlet filter?

Reduces access to resources within an application until the request is authenticated.

What is a front controller?

A servlet that handles all requests for a website.

What is idempotence?

Can be run once or multiple times and produce the same result. In HTTP, idempotence and safety are the major attributes that separate HTTP verbs (GET, PUT, DELETE).

What are non-idempotent HTTP requests?

POST, HEAD, other stuff

Print Writer vs Stream Output Writer

Print writer writes characters while serveroutput writes bytes to a response body.

What is an event listener?

An object that calls all subscribers when the subscribed trigger event occurs.

What is javascript and what is it used for?

Javascript is a C-Syntax client-side scripting language that allows functionality within an HTML page. Include it by using <script>

What is AJAX and what is it used for?

Asynchronous Javascript and XML. It is used to change content dynamically without ever needing to reload the entire page.

What are the AJAX ready states?

0 - Request not initialized


1 - Server connection established


2 - Request received


3 - Processing request


4 - Request finished/response ready

What is JSON and what is it used for?

Javascript object notation. Stores data in key-value pairs. Can contain base-10 numbers, boolean, and string. Cannot contain method or functions, null, undefined, or NaN. All keys must be strings.

What is JQuery and what is it used for?

JQuery is a javascript library that gets around browser discrepancies and simplifies client-side scripting of HTML. It is used for DOM element selection, traversal, and manipulation using the factory method $.

What is DOM?

Document Object Model. It is an API for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is access and manipulated.

What is the difference between == and ===?

== uses type coercion to compare the values of each side. === is a strict comparator, meaning each side must also be the same type along with the same value.

How do you immediately run a function in javascript? In JQuery?

JS: <body onload="myFunction()">


JQ: $(document).ready(myFunction())