Which of the following jsp expressions is valid

Assignment Help PHP Web Programming
Reference no: EM131343

Question 1

A JSP expression can contain any Java expression that evaluates to a

Question 1 options:

  • String object
  • Java object
  • primitive type
  • primitive type or Java object

Question 2

Which of the following JSP expressions is valid?

Question 2 options:

  • <%= request.getParameter("occupation"); %>
  • <%= request.getParameter("occupation") %>
  • <%= String occupation = request.getParameter("occupation"); %>
  • <%= String occupation = request.getParameter("occupation") %>
  • None of the above

Question 3

The following code
<%
String[] mailTypes = request.getParameterValues("mail");
%>
Question 3 options:

  • returns the name of all request parameters from the mail.jsp page
  • returns the first value of the mail parameter or null if none exist
  • returns all values of the mail parameter or null if none exist
  • returns the values of all request parameters from the mail.jsp page is invalid

Question 4

In general, you should use the Post method instead of the Get method when

Question 4 options:

  • the request writes data to the server
  • the request reads data from the server
  • you want users to be able to include parameters in their bookmarks
  • when you're transferring 4 KB or less of data

Question 5

To use your own Java class in a JSP, you can import the class with a

Question 5 options:

  • JSP scriptlet
  • JSP expression
  • JSP directive
  • JSP declaration

Question 6

Which of the following is a valid JSP comment?

Question 6 options:

  • // comment
  • <!--comment -->
  • <%-- comment --%>
  • </comment>

Question 7

In the code that follows, the numOfErrors variable

<%! int numOfErrors = 1; %>

Question 7 options:

  • is initialized each time the page is requested
  • is an instance variable that is not thread-safe
  • is ignored by the JSP engine
  • is invalid JSP code

Question 8

When a JSP is requested for the first time, the JSP engine does all but one of the following. Which one is it?

Question 8 options:

  • generates a servlet for the JSP
  • generates the HTML code for the JSP
  • creates one instance of the servlet class
  • creates one thread

Question 9

When a JSP is requested for the second time, the JSP engine

Question 9 options:

  • creates a thread that has its own copy of the instance variables
  • creates a thread that has its own copy of the local variables
  • creates an instance of the JSP that has its own copy of the instance variables
  • creates an instance of the JSP that has its own copy of the local variables

Question 10

A scriptlet contains one or __________ statements.

Question 10 options:

  • HTML
  • Java
  • XML
  • web server

Question 11

To access information about the parameters that are sent to a JSP, you can use the methods of the ___________ object.

Question 11 options:

  • database
  • responsse
  • request
  • JSP

Question 12

You can use getRealPath method of a/an ____________ object to get the absolute path to a file that's part of a web application.

Question 12 options:

  • ServletContext
  • input
  • container
  • explicit

Question 13

To ensure that parameter values aren't displayed in the URL when a JSP is requested, you should use the _____________ method in the Form tag.

Question 13 options:

  • Get
  • Post
  • JSP
  • action

Question 14

If you use instance variables in a JSP, two or more _______________ may conflict when they try to read, modify, or update the same instance variable at the same time.

Question 14 options:

  • users
  • servers
  • applications
  • threads

Question 15

If you attempt to run a JSP that contains a coding error, the ____________ will display an error page.

Question 15 options:

  • user
  • JSP engine
  • JVM
  • servlet

Question 16

The ___________ attribute in an HTML form tag may specify the JSP url for a user request.

Question 16 options:

  • method
  • action
  • type
  • name

Question 17

Text fields inside an HTML form may become ______________ for a JSP when the form is submitted

Question 17 options:

  • directives
  • outputs
  • parameters
  • styles

Question 18

JSP expressions are used to display __________.

Question 18 options:

  • text
  • objects
  • access codes
  • numerical values only

Question 19

If you pass parameters in a JSP request that total more than 4KB, then you must use a ____________ method.

Question 19 options:

  • Trace
  • priority
  • Get
  • Post

Question 20

If you use an HTML "A" tag to call a JSP, the ____________ method is always used.

Question 20 options:

  • Post
  • Get
  • link
  • url

 

 

Reference no: EM131343

Questions Cloud

Stone interior decorating company : Established an enterprise called the STONE INTERIOR DECORATING COMPANY
Write a paper using peer reviewed journal articles : Write a paper using peer reviewed journal articles on the topic.
Education administration professional staff development : Education administration professional staff development
Essay on a particular aspect of corporate governance : Write an essay on a particular aspect of corporate governance
Which of the following jsp expressions is valid : A JSP expression can contain any Java expression that evaluates to a String object, Java object, primitive type, primitive type or Java object
Concept of statistical signi cance : Concept of statistical signi cance
International monetary fund : International Monetary Fund
Explain the several steps management : Identify and explain the several steps management must take to establish a successful export strategy.
Geocentric approaches to staffing : Explain the polycentric, ethnocentric, and geocentric approaches to staffing.

Reviews

Write a Review

PHP Web Programming Questions & Answers

  Random integral numbers based on normal distribution

Prepare a system to generate random integral numbers based on normal distribution. Study Data Generator's structure and extend number generation type to activate normal distribution.

  Shopping cart program for web applications class

Shopping Cart program for web applications class. Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for all items.

  Create a web site for an apple farm

Create a web site for an apple farm. Create an HTML5 form allowing visitors to create an account with the site. Account details are to be stored in your MySQL database. Information should be stored in a secure way.

  Develop a dynamic website open university

Develop a dynamic website Open University

  Sample website project

This website consists of three sections: a narrative, a storyboard, and a business Website.

  Online banking application

Designing and developing a web applications The company you are working has secured a contract with a local banking group to develop an ONLINE BANKING APPLICATION using PHP and MySQL.

  Design a dynamic database

Design a dynamic database using Mangodb, html , and php.

  Show the accessibility and usability of website

The webpage must have several menus about country Azerbaijan such as "About Azerbaijan" "History" "Geography" "Landscape" and "Accessibility" menu.

  Implement a web application

Implement a web application called CS320Starter, which is similar to the crowd funding platform Kickstarter where people raise funds for their projects.

  Prepare an ajax enabled web form

Prepare an AJAX enabled web form utilising a ListView control that will allow logged-in staff to list, edit, delete, insert magazine details for magazines from a selected magazine category.

  Create a very simple order system as a web application

Create a very simple Order System as a web application.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd