A jsp expression can contain any java expression

Assignment Help JAVA Programming
Reference no: EM131877

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: EM131877

Questions Cloud

Calculate the weighted average cost of capital : Calculate the Weighted Average Cost of Capital for three years to study and discuss the trend.
Developing business information system solutions : Equip Hire is a commercial and domestic equipment hire company with 11 branches across the metropolitan Sydney, Newcastle and Wollongong.
Preparing memo on state of the company industry : Preparing memo on state of the company industry
Explain diversity through annual reports : Explain diversity through annual reports of foreign companies on the internet.
A jsp expression can contain any java expression : A JSP expression can contain any Java expression that evaluates to a
Discuss whether ellen has a claim against the council : Discuss whether Ellen has a claim against the council in relation to the advice she get
Risk aversion-risk-free investments : Risk aversion implies only risk-free investments will be undertaken by corporate managers. Critically evaluate this statement What is the distinction between nominal and real interest rates
Prepare a program that uses at least two functions : Prepare a program that uses at least two functions that can be called from your main.
Draw a graph of the market for chewing gum : Draw a graph of the market for chewing gum. What are the equilibrium price and quantity? Mark the equilibrium price and quantity in the graph.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a driver class in java

Your project is to create a driver class that uses SuperJavaIceCreamClass.

  Rock-paper-scissors :- java problem

Design decision marks are based on how you implemented our programs/classes.

  Technical community blog

Write a blog article for a coding and technical community blog.

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  Create four classes

Create four classes: Account.java, Checking.java, Savings.java, and AccountArray.java.

  Write a program that shows the current time and date

Write a program that shows the current time and date

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Build the gui layout of the game

Build the Build the GUI layout of the game in java.

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Sorted list adt and the binary search tree adt

Explain the differences between our specifications of the Sorted List ADT and the Binary Search Tree ADT.

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

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