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

  Compilation and Execution - JAVA problem

Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..

  Design and implement a small and simple email server

Design and implement a small and simple email server using the concept of web based information system (WBIS).

  Methods

Assignment describe the basic working of methods. How to write a method in java and how to call a method.

  Implement avl tree

Implement AVL trees that allows both iterative traversal and recursive traversal.

  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.

  Develop a reliable transfer protocol over udp

Develop a reliable transfer protocol over UDP. Focus on a Stop- and-Wait protocol.

  Write a recursive instance method

Write a recursive instance method

  Technical community blog

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

  Write a program that shows the current time and date

Write a program that shows the current time and date

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  Evaluate the rtas resource requirements

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.

  Solving programming problems

Write a computer program that will figure out the total of an order when given the amount of the order ($1000) and a sales tax rate of eight percent.

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