Upgrade to remove ads
server side web programming final
Terms in this set (82)
To start the MySQL monitor from a command prompt, you use the ________________________________ command.
To select the MySQL database that you want to use, you type the _________________________ command in the MySQL monitor.
SQL statements such as the CREATE TABLE and DROP TABLE statements are part of SQL's ___________________________ language.
A file that stores one or more SQL statements is known as a __________________________________________.
When a SELECT statement is executed, it returns a _______________________________.
SELECT * FROM UserRoles
Write a SELECT statement that returns all of the columns and rows from a table named UserRoles.
To determine which rows in a table are selected, you code a _____________________ clause in a SELECT statement.
To select data from two or more tables, you can code a _____________________ clause.
INSERT, UPDATE, and DELETE statements are part of SQL's _____________________ language.
The MySQL Load command can be used to load data from a _______________________ text file into a database table.
two fields from the Accounts table where Balance column is less than 0
The result set retrieved by the following SELECT statement contains records that have
SELECT Balance, Num
WHERE Balance < 0
a configuration file
Which of the following is not a way to insert data into a table?
an ORDER BY clause
When you code an inner join in a SELECT statement you do not need to specify
all rows in the first table and matched rows in the second table
In a left outer join, the result set includes
one row and four columns into the Download table
The INSERT statement that follows inserts
INSERT INTO Download (UserID, DownloadDate, DownloadFilename, ProductCode)
VALUES (1, NOW(), 'jr01_filter.mp3', 'jr01')
create a database and all of its tables
load data into the tables of a database
Correct Response both A and B
A SQL script can be used to
Before you can use JDBC to connect to a database, your system must have access to a database ______________________________ for the database.
To create a Connection object in a web application, you use the _______________________________ method of the DriverManager class.
To create a Statement object, you use one of the methods of the _____________________________ object.
To retrieve a result set by executing a SELECT statement from a Statement object, you use the _____________________________ method of the Statement object.
To execute an INSERT statement from a Statement object, you use the _____________________________ method of the Statement object.
To get data from a result set, you use the get methods of the _______________________________ object.
To specify the location of a _____________________ in the SQL statement for a prepared statement, you type a question mark (?) in the SQL statement.
To improve the performance of database operations, an application can use a connection ________________________.
A method that takes a Student object and writes it to a Student table in a database implements _______________________________ mapping.
To move the cursor through a result set, you can use the methods of the
To get information about a result set like the number of columns and names of the columns, you can use the methods of the
To execute the Delete statement that follows, which statement would you use?
String query = "DELETE FROM Invoices " +
"WHERE InvoiceTotal = 0 ";
Statement statement = connection.createStatement();
sets the third parameter in the prepared statement to the value that's returned by the getPrice method
If ps is a PreparedStatement object and product is a Product object, then the following statement
a limited number of connections are shared by all users of the application
Connection pooling improves database performance because
SSL (Secure Sockets Layer) is a ____________________________________ used by the Internet that lets clients and servers communicate over a secure connection.
The URL that connects to www.company.com over a secure connection is ________________________________________________.
The process of determining whether a server or client is who and what it claims to be is called ____________________________________.
To enable secure connections within Java programs, you use the _____________________________ API.
A _________________________ digital secure certificate is enables you to test SSL connections in a local environment without purchasing a secure certificate.
provides a digital secure certificate to the client
Before a server uses SSL to transmit data to a client, it
for a fee from a certificate authority
A digital secure certificate is provided
the digital secure certificate
The maximum SSL strength for an application's connections is determined by
continues to use a secure connection until an absolute URL specifies a non-secure connection
Once you establish a secure connection, the application
When you use container-managed security, the servlet __________________ automatically manages security.
The process of asking users to identify themselves before they can access restricted portions of a web site is referred to as _________________________.
When you use the JDBCRealm, you use the context.xml file to identify (a) the database, (b) the tables for the users and roles, and (c) the ___________________ that contain the usernames, passwords, and roles.
You use the auth-method element in the ____________________ file to specify the type of authentication that's going to be used by the application.
If you use a custom login form for authentication, the code for the page must use special ______________________ names for the username and password.
the web.xml file
In Tomcat, a security constraint is coded in
the authorized usernames for accessing the restricted resources
Which of the following is not included in a security constraint?
usernames, passwords, and roles
The security realm provides the authorized
the tomcat-users.xml file
By default, Tomcat uses a security realm that stores the user data in
a dialog box automatically prompts the user for a username and password
When an application uses basic authentication,
the web.xml file provides the path for the login page
When an application uses form-based authentication,
Before you can use JSTL in your JSPs, you have to make the JSTL_______ files available to your application.
Before you can use JSTL in a JSP, you need to code a________directive.
to provide for URL encoding with JSTL, you can use a____________tag.
To get the effect of an if/else statement with JSTL, you can use a __________ tag.
If you combine JSTL with EL and the MVC pattern, you should be able to remove most, if not all__________ from of your JSPs.
If this code is use for href attribute of an Anchor tag. what url is used for the link?
if this code is used to parse an attribute named emailAddress that contains a value of jjones@email@example.com
the Java class that carries out the actions of a custom tag is called the ________ class.
For each custom tag in a TLD, you must specify the name of the tag and the name of the _______ that will be used to implement the tag
When you add a tag that has a body to the TLD, you must specify a value of ____________ for the bodycontent element
the location of the TLD file
Before you code a custom tag, you use a taglib directive to specify
the scripting variable for each tag
Which of the following is not specified in a TLD file
the doStartTag method should return EVAL_BODY_BUFFERED
to display the body of a tag
a private instance variable and set method
for each attribute, a tag handler must provide
extend the BodyTagSupport class
To be able to access the body of a tag, the tag handler class needs to
the doAfterBody method should return EVAL_BODY_AGAIN
to reiterate the body of a tag
The accept header in an HTTP request indicates the __________________________ types that are accepted by the browser.
To control how a browser caches a page, you would set the cache-control header in the ___________________________ object.
To get the cookies that are available from an HTTP request, you can use the getCookies method to work with the ___________________________ header.
status code, response headers, and response body
An HTTP response consists of the following:
Which of the following is not part of the request line in an HTTP request?
all cookies sent by the browser
The cookie header in an HTTP request provides
the server encountered a problem
A status code of 500 informs the user of an application
String type = request.getContentType();
Which, if any, of the following statements is equivalent to this code:
String type = request.getHeader("Content-Type");
the first request header
What does the following code display in a JSP?
<%@ page import="java.util.*" %>
Enumeration headerNames = request.getHeaderNames();
String name = (String) headerNames.nextElement();
String value = request.getHeader(name);
<td align="right"><%= name %></td>
<td><%= value %></td>
To specify the authentication type to be used
Which of the following isn't a case in which you would use response headers?
A listener is a class that listens for various events and provides __________________ that respond to those events when they occur.
Before you can use a listener, you must use the ________________________ file to register the listener class.
When you write a listener class, you implement one of the listener ____________________.
You can write a class that can tell when a/an ________________________ is created or destroyed by implementing HttpSessionListener.
All of the methods for a listener have a/an _______________ object as the sole parameter.
The getSession method of the HttpSessionEvent class returns the _____________________ object that was created or destroyed.
THIS SET IS OFTEN IN FOLDERS WITH...
Server Side Web Programming Midterm
Servlet Jsp Exam Review
WebServer Administrator = Chapter 5
Web Server Final Exam
YOU MIGHT ALSO LIKE...
CSCI315 chp 12-20
CIST2550 - PHP Programing II - My Midterm Questions
OTHER SETS BY THIS CREATOR
dataset test 1
Server Side Test 2