Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PHP Expert

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 --%>

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

 

 

PHP , Programming

  • Category:- PHP
  • Reference No.:- M9717029

Have any Question?


Related Questions in PHP

In php write a simple addtion calculator that reads in two

In PHP write a simple addtion calculator that reads in two values and then add them together and display the output. Be sure to validate both inputs and ensure that it can add 0+0 = Sum: 0. The user should be able to inp ...

Question develop a 5-6 page word document that describes

Question: Develop a 5-6 page Word document that describes the design for a small Web site that meets the following specifications. 1. The Web site includes four or more Web pages designed according to current usability g ...

Question continue to build on the skills of providing web

Question: Continue to build on the skills of providing Web page content and structure with HTML and Web page style and layout using CSS. Demonstrate the skill of creating a dynamic Web page that includes JavaScript clien ...

Question using the course software and week one template as

Question: Using the course software and Week One Template as a starting point, create a new HTML webpage and include the following: • Write the code to display your name in the largest-size heading element. • Write the m ...

Final project assignment -requirements specifications -1

FINAL PROJECT ASSIGNMENT - REQUIREMENTS / SPECIFICATIONS - 1. For the final project, you will have to make good use of your CMS using PHP and MySQL for the content delivery. You will have to be able to deliver the conten ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As