Question a jsp expression can contain any java expression

Assignment Help JAVA Programming
Reference no: EM13347944

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

a) String object
b) Java object
c) Primitive type
d) Primitive type or Java object

Question: Which of the following JSP expressions is valid?

a) <%= request.getParameter("occupation"); %>
b) <%= request.getParameter("occupation") %>
c) <%= String occupation = request.getParameter("occupation"); %>
d) <%= String occupation = request.getParameter("occupation") %>
e) None of the above

Question: The following code:

<%String[] mailTypes = request.getParameterValues("mail");%>

a) Returns the name of all request parameters from the mail.jsp page.
b) Returns the first value of the mail parameter or null if none exist.
c) Returns all values of the mail parameter or null if none exist.
d) Returns the values of all request parameters from the mail.jsp page are invalid.

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

a) JSP scriptlet
b) JSP expression
c) JSP directive
d) JSP declaration

Question: Which of the following is a valid JSP comment?

a) // comment
b) <!--comment -->
c) <%-- comment --%>
d) </comment>

Question: In the code that follows, the numOfErrors variable

<%! int numOfErrors = 1; %>

a) Is initialized each time the page is requested.
b) Is an instance variable that is not thread-safe.
c) Is ignored by the JSP engine.
d) Is invalid JSP code.

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

a) Generates a servlet for the JSP.
b) Generates the HTML code for the JSP.
c) Creates one instance of the servlet class.
d) Creates one thread

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

a) Creates a thread that has its own copy of the instance variables.
b) Creates a thread that has its own copy of the local variables.
c) Creates an instance of the JSP that has its own copy of the instance variables.
d) Creates an instance of the JSP that has its own copy of the local variables.

Question: A scriptlet contains one or __________ statements.

a) HTML
b) Java
c) XML
d) Web server

Reference no: EM13347944

Questions Cloud

1nbsp select two companies from the same industry2nbsp : 1.nbsp select two companies from the same industry2.nbsp gather financial data from web sites refer items 2 4 and 9 of
Case study equip hireequip hire is a commercial and : case study equip hireequip hire is a commercial and domestic equipment hire company with 11 branches across the
Preparing memo on state of the company industryassume that : preparing memo on state of the company industryassume that you are audit senior in an accounting firm. your firm has
Worldwide accounting diversity international accounting : worldwide accounting diversity international accounting doupnik and pereraexplain diversity through annual reports of
Question a jsp expression can contain any java expression : question a jsp expression can contain any java expression that evaluates to aa string objectb java objectc primitive
Questionellen is a graduate of the college of alternative : questionellen is a graduate of the college of alternative medicine and is looking to begin her own business. she
Risk aversion-risk-free investmentsquestion write a short : risk aversion-risk-free investmentsquestion write a short essay for each of the following questions. where possible
Prepare a program that uses at least two functions that can : prepare a program that uses at least two functions that can be called from your main. this program is a number game
Question the table sets out the demand and supply schedules : question the table sets out the demand and supply schedules for chewing gum. a draw a graph of the market for chewing

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program displaying a text file that is in a text are

Write a program displaying a text file that is in a text area. The user enteres a file name in a text field and clicks the view button; the file is then displayed in the text area. Do not use BufferedInputStream.

  Objectivesbullto exercise the analysis design and

objectivesbullto exercise the analysis design and implementation activities of software development.bullto learn

  Class named stock to model a stock

Write a class named Stock to model a stock. The properties and methods of the class are shown in Figure 6.22. The metho changePercent computes the percentage of the change in the current vs. the previous closing price.

  Writing a simple gui application using a class called myguic

writing a simple GUI application using a class called MyGuiClass. Your GUI will have a JButton which your program will need to respond to when it is clicked. Describe what you would need to do to setup event handling using a nested inner class. Use J..

  Which parts of the assignment were you not able to complete

Which parts of the assignment were you not able to complete fully? For each, explain why you were unable to complete this part and what steps you took to attempt to complete it. Give me as much detail as possible such that I may award partial cred..

  Construct a bulls and cows program for my intro java class

construct a Bulls and Cows program for my intro Java class. This program needs to perform the basic functions of the game (determining how many cows there are and how many bulls there are and tell the player when they win), but it also needs to offer..

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Find method of the class is passed each of the targets

How many calls to the recFind method of the ArraySortedList3 class are made when the find method of the class is passed each of the targets?

  Develop java applet that will help elementary school student

Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers.

  Rewrite this code in order to ask the user for input

rewrite this code in order to ask the user for input and then coverth it from infex to postfix ,, so i want to put a Scanner and this ask the user for input .. how to do it ?

  Mvc pattern and servlet

When you use the MVC pattern, the controller directs the flow of control to

  Loops and files

Convert an algorithm using control structures into Java and write a while loop

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