Course: CPS 278: Server Side Java ~ For IGNITE Review

Q: According to the syllabus/class policy, check all of the following that are good ways to watch the videos
- Watch the video while taking notes
- Watch the video while watching TV
- Trying to create the program described in the video while watching
- Watch the videos while sending text messages.
A: Watch the video while taking notes; Trying to create the program described in the video while watching

Q: According to the syllabus/class policy, which statements are true about late assignments. (Check all that apply)
- No assignment can be turned in after the due date.
- All assignments should be turned in after the due date.
- Assignments turned in after the due date will have a lateness deduction.
- There are 3 "free passes" which can be used to wipe out lateness deductions
A: Assignments turned in after the due date will have a lateness deduction.

Q: According to the syllabus/class policy, which statements are true about late assignments. (Check all that apply)
- If an assignment is late 1 day the lateness penalty is 25%
- If an assignment is late 2 days the lateness penalty is 27%
- If an assignment is late 2 days the lateness penalty is 25%
- If an assignment is late 7 days the lateness penalty is 40%
- If an assignment is late 25 days the lateness penalty is 40%
- If an assignment is late 35 days the lateness penalty is 50%
A: If an assignment is late 1 day the lateness penalty is 25%; If an assignment is late 2 days the lateness penalty is 25%; If an assignment is late 7 days the lateness penalty is 40%; If an assignment is late 25 days the lateness penalty is 40%

Q: If something bad happens such that I am late on an assignment, which of the following actions can be taken?
- Ask to use of of my "Free Passes" to waive the lateness penalty.
- Get a an appropriate note (such as a note from the doctor) to document the problem and bring it to the instructor.
- Enter into the assignment comments a description of the problem and turn in the assignment once it is completed. Get caught up as soon as possible. Come see the instructor on the last day of classes.
- Request an extension of the deadline. The instructor can usually give out one extension.
A: Enter into the assignment comments a description of the problem and turn in the assignment once it is completed. Get caught up as soon as possible. Come see the instructor on the last day of classes.

Q: According to the "Getting Help" button in blackboard, what are the good options available for getting help. (Check all that apply)
- Come to one of the MM sections or any available office hours
- Come to one of the "On Campus Group Study Sessions"
- Post a question on a class discussion board and hope to get an answer from a fellow student.
- Looking for a completed solution posted on the discussion board.
A: Come to one of the MM sections or any available office hours; Come to one of the "On Campus Group Study Sessions"; Post a question on a class discussion board and hope to get an answer from a fellow student.

Q: Which of the following are true about email. (Check all that apply)
- Class emails will automatically come to your Student email address, so it is good to monitor this on a regular basis.
- Blackboard knows your personal non-student email addresses and that is where you will receive class emails
- Sending an email to the teacher is the best way to get help. This should be done immediately whenever I am stuck on anything.
- It is a good idea to send an email to the teacher when I want to schedule a Go-to Meeting.
A: Class emails will automatically come to your Student email address, so it is good to monitor this on a regular basis.; It is a good idea to send an email to the teacher when I want to schedule a Go-to Meeting.

Q: Check all of the possible times to have a "Go-to Meeting"
- During any available office hour. Calling the posted "office phone number" will allow me to request the "go-to meeting".
- During an on Campus Group study session
- In the morning when Clem plays Raquetball
- During an MM section meeting.
- Anytime, because clicking on the provided link will alert the teacher to your need.
A: During any available office hour. Calling the posted "office phone number" will allow me to request the "go-to meeting".; During an MM section meeting.

Q: Which of the following is true about Class Participation (Check all that apply).
- For each assignment, I must make a post of 1 question AND 1 answer AND 1 discovery AND 1 set of lecture notes
- Just posting 1 question on the discussion board will satisfy my Class participation requirement.
- Just posting 1 answer on the discussion board will satisfy my Class participation requirement.
- Just posting 1 Discovery on the discussion board will satisfy my Class participation requirement.
- Just posting 1 set of lecture notes on the discussion board will satisfy my Class participation requirement.
- Just posting a copy of my completed assignment on the discussion board will satisfy my Class participation requirement.
A: Just posting 1 question on the discussion board will satisfy my Class participation requirement.; Just posting 1 answer on the discussion board will satisfy my Class participation requirement.; Just posting 1 Discovery on the discussion board will satisfy my Class participation requirement.; Just posting 1 set of lecture notes on the discussion board will satisfy my Class participation requirement.

Q: According to the syllabus/class policy, it is OK to team up with another student and turn in the same code for an assignment as long as we indicate this in the Student comments section.
- True
- False
A: False

Q: According to the syllabus/class policy, if I am stuck on an assignment, I can ONLY get help from the Group study facilitator or the teacher.

Another student can't help me with my problem.
- True
- False
A: False

Q: Good reasons to show up to a Mixed Mode class session. Check all that apply.
- I can watch video lectures with "Ear buds" and ask questions whenever something needs clarification.
- I can work on assignments and get timely help when I am stuck
- I can use the WCC computers to do my Facebook
- I will improve my grade because of the "MM bribe formula"
- Programming requires consistent practice. Coming to an MM class section gives me an opportunity to practice my programming skills by working on my assignments.
A: I can watch video lectures with "Ear buds" and ask questions whenever something needs clarification.; I can work on assignments and get timely help when I am stuck; I will improve my grade because of the "MM bribe formula"; Programming requires consistent practice. Coming to an MM class section gives me an opportunity to practice my programming skills by working on my assignments.

Q: When I take a test and I am allowed to access the web, then this means that I can do the following: (Check all that apply)
- I can access the Class web site(Course Content), and any links found in the class web site
- I can post a question on "Stack-Overflow" to get assistance
- I can post my completed solution on a "Web Test Bank"
- I can post my completed solution on the Discussion board associated with the class
A: I can access the Class web site(Course Content), and any links found in the class web site

Q: Which of the following is true about Mixed Mode (MM) and Distance Learning(DL) (Check all that apply)
- A DL student is not allowed in an MM section.
- A DL student can attend any MM section listed in the "Getting Help" button in Blackboard.
- MM students can show up in any MM section listed in the "Getting Help" button in Blackboard .... including the MM sections related to other classes. i.e. a cps161 student can attend an MM cps261 class.
- If an MM student gets 80% on all of his work and fails to show up to some of his MM sections, his grade will be lower than 80%.
- An MM or DL student who gets 80% on all his work will get a higher grade by attending some of the MM sections.
A: A DL student can attend any MM section listed in the "Getting Help" button in Blackboard.; MM students can show up in any MM section listed in the "Getting Help" button in Blackboard .... including the MM sections related to other classes. i.e. a cps161 student can attend an MM cps261 class.; An MM or DL student who gets 80% on all his work will get a higher grade by attending some of the MM sections.

Q: Good reasons for attending MM class meetings (Check all that apply)
- You will get answers to the tests and to hear the extra lectures that are not online.
- Provide a regular class time to make progress for those students who would otherwise procrastinate and put things off to the last minute.
- Find a job in the industry
- To do your facebook
- To allow you to pair up with another student and do the work as a group project.
- To earn MM-bribe points and to have an opportunity to ask questions as needed
A: Provide a regular class time to make progress for those students who would otherwise procrastinate and put things off to the last minute.; To earn MM-bribe points and to have an opportunity to ask questions as needed

Q: Class Participation: (check all that apply)
- To get credit for class participation, you will need to post a Question AND an Answer AND a sharing.
- A single question will give you your credit for Class Participation
- You can get credit for Class Participation by posting on the "Questions for the Instructor" discussion board.
- The Sharing discussion board can be used for sharing your phone number and address so you can meet new friends. This will count as "Class Participation".
- You can get emails when some one answers your question if you use the blackboard subscribe feature.
- You don't have to worry about the subject line because the default blackboard subject line provides the information we need.
A: A single question will give you your credit for Class Participation; You can get emails when some one answers your question if you use the blackboard subscribe feature.

Q: Group Study questions: (check all that apply)
- The instructor will be present at group study
- A trained facilitator will be present at a group study
- Group study is scheduled in class rooms that have computers.
- You can do "goto meetings" with the instructor during group study sessions
A: A trained facilitator will be present at a group study; Group study is scheduled in class rooms that have computers.

Q: Goto-meeting questions: (check all that apply)
- You can have a goto meeting anytime
- If a student calls the instructor on his office phone number during office hours, he can usually do an on the spot goto-meeting.
- Using "goto meeting", a  student can be at home and show the problem on his computer with an instructor who happens to be on campus.
- To schedule a goto meeting, a student should send an email request to the instructor for the goto meeting.
A: If a student calls the instructor on his office phone number during office hours, he can usually do an on the spot goto-meeting.; Using "goto meeting", a  student can be at home and show the problem on his computer with an instructor who happens to be on campus.; To schedule a goto meeting, a student should send an email request to the instructor for the goto meeting.

Q: Some of the course lectures are only available by attending the Mixed Mode section
- True
- False
A: False

Q: This class is the easiest class at Washtenaw Community College.
- True
- False
A: False

Q: If you are having trouble getting your program to work, the class policy recommends doing which of the following:

(check all that apply)
- Sending an email to the instructor as soon as you are stuck.
- Coming to one of the instructor's office hours.
- Calling the instructor on his office phone during an office hour.  Often it is possible to remotely debug the problem using "goto meeting".
- Coming to any of the Mixed Mode (MM) sections that the instructor has scheduled even if the meeting is for a different class than the class the student is signed up for.  Distance Learning (DL) students can also take this approach.
- Coming to a Group study session and getting help from a trained facilitator or another student in group study.
- Requesting  a "goto meeting" with the instructor during one of the  Mixed Mode (MM) sessions.  The request is done by sending an email to the instructor early enough such that the instructor sees the request before the scheduled class.
- Posting a question on one of the "Class Participation" discussion boards and hoping to get an answer from a fellow student.  It would be helpful to subscribe to the question so you will know when someone might be answering the question.
A: Coming to one of the instructor's office hours.; Calling the instructor on his office phone during an office hour.  Often it is possible to remotely debug the problem using "goto meeting".; Coming to any of the Mixed Mode (MM) sections that the instructor has scheduled even if the meeting is for a different class than the class the student is signed up for.  Distance Learning (DL) students can also take this approach.; Coming to a Group study session and getting help from a trained facilitator or another student in group study.; Requesting  a "goto meeting" with the instructor during one of the  Mixed Mode (MM) sessions.  The request is done by sending an email to the instructor early enough such that the instructor sees the request before the scheduled class.; Posting a question on one of the "Class Participation" discussion boards and hoping to get an answer from a fellow student.  It would be helpful to subscribe to the question so you will know when someone might be answering the question.

Q: Many of the following lines will generate a JSP compile error.

Pick the line number which compiles properly.
- line 3
- line 4
- line 5
- line 6
A: line 6

Q: We derive our Java Web Servlets from this class.
- WebServlet
- ServerContext
- HttpRequest
- HttpServlet
A: HttpServlet

Q: Information stored in a user's browser containing information that the server would like remembered. Often this information is related to a user's session.
- dataStore
- ssl
- cookie
- token
A: cookie

Q: This object is passed in the doGet routine and contains information passed as input from the user's browser.
- HttpServletResponse
- HttpServletRequest
- HttpServletContext
- HttpGetData
A: HttpServletRequest

Q: You want to override this method to handle Get Method Form requests
- getData
- doGet
- getParameter
- getParameterValues
A: doGet

Q: Which type of objects can store attributes using the setAttribute method
(Pick 2)
- ServletConfig
- HttpServletRequest
- ServletResponse
- HttpSession
- Cookie
A: HttpServletRequest; HttpSession

Q: This is the name of the Java Based Web server that we obtained from the Apache Organization
- Jakarta
- JavaServe
- J2EE
- Tomcat
A: Tomcat

Q: This file uses XML to define the configuration of the Servlets that make up your project.
- server.xml
- config.xml
- WEB-INF
- web.xml
A: web.xml

Q: This html attribute tag is used inside of a Form to specify the URL location for the program that needs to process your Form.
- action
- url
- method
- doGet
A: action

Q: This class is obtained by calling the getWriter method from the Response object in a Servlet. This class is useful for sending Html back to the browser, and it contains methods print and println.
- ResponseBuffer
- BufferedWriter
- SendData
- PrintWriter
A: PrintWriter

Q: Given that req is an HttpServletRequest, which snippets of code create a session if one doesn't exist
(Pick 2.   Remember this is an open web test and there is online help for these classes)
- req.getSession()
- req.getSession(true)
- req.getSession(false)
- req.createSession()
- req.getNewSession()
- req.createSession(true)
- req.createSession(false)
A: req.getSession(); req.getSession(true)

Q: This protocol is used for communicating between a Browser and a Web server.
- Html
- Ftp
- Http
- Xml
A: Http

Q: This member function of the HttpServlet is used to process initialization code for your servlet.
- start
- run
- getServletContext
- init
A: init

Q: This member function of the HttpServletResponse class is used to send a cookie back to the browser.
- addCookie
- sendCookie
- send
- addRequest
A: addCookie

Q: This member function of the HttpServletRequest class can be used to obtain the values of your form input fields.
- getData
- getRequest
- getValue
- getParameter
A: getParameter

- Fragment A
- Fragment B
- Fragment C
- Fragment D
A: Fragment C

Q: This method can be called in your Servlet init routine to obtain configuration data.
- getData
- getConfig
- config
- getServletConfig
A: getServletConfig

Q: This member function of the HttpServletRequest is used to obtain all of the cookies destined to a particular web page.
- getConfig
- cookiesFetch
- getCookies
- doGet
A: getCookies

- Fragment A
- Fragment B
- Fragment C
- Fragment D
A: Fragment C

Q: Which are valid JSP implicit variables which can be accessed from from your JSP code?
(Pick 4)
- stream
- request
- context
- response
- out
- cookie
- session
A: request; response; out; session

Q: This class is used for creating and storing Web Session information.
- HttpSession
- HttpRequest
- SessionObject
- getAttribute
A: HttpSession

- JSP Scriptlet A
- JSP Scriptlet B
- JSP Scriptlet C
- JSP Scriptlet D
A: JSP Scriptlet C

Q: This Object is passed into the doGet method and is used for sending back information to the Client's browser
- Response
- SendResponse
- HttpServletSend
- HttpServletResponse
A: HttpServletResponse

Q: By default, how many instances of a servlet are created by a Servlet Container?
- One per request
- One per session
- One
- None of the above
A: One

Q: How do you store objects in a session object?
- put(String, Object)
- setAttribute(String, Object)
- addObject(String, Object)
- putObject(String, Object)
A: setAttribute(String, Object)

Q: How do you know if a session is alive? (Remember you can look this up in Online help for these classes)
- Look in the cookies.
- isSessionAlive() provides useful information
- Exception thrown if you try to create one when one already exists.
- getSession(false) provides useful information
A: getSession(false) provides useful information

Q: Where are cookies stored?
- On the server
- in web.xml
- On the client's browser
- in HTML
A: On the client's browser

Q: Where are session IDs stored?
- In Cookies
- in web.xml
- session IDs are not stored
- in HTML form fields
A: In Cookies

- JSP Fragment A
- JSP Fragment B
- JSP Fragment C
- Can't be done
A: JSP Fragment A

Q: According to the Http specification, which HTTP methods are NOT considered idempotent
(idempotent refers to a method that does not update the state of your server)
- GET
- POST
- HEAD
- PUT
A: POST

Q: This type of file is often used to capture the entire contents of a web application so that it can be installed on some other web site. We used this technique when we installed our Netbeans project on a Tomcat server running on Linux.
- zip file
- tar.gz file
- war file
- netbeans file
A: war file

Q: Using a MVC (Model View Controller), which of the following are you likely to do?
(Pick 5)
- Use a JSP page to handle the beginning part of the http request
- Use a Servlet to handle the beginning part of the http request
- Use a JSP page to handle that last part of the http request
- Use a Servlet to handle the last part of the http request
- Move as much of the Logic (i.e. the Model) into the Servlet class
- Move as much of the Logic (i.e. the Model) into the separate class outside of the Servlet.
- Use a RequestDispatcher to forward the http processing from a Servlet to a JSP page.
- Store information in the HttpServletRequest object with setAttribute
A: Use a Servlet to handle the beginning part of the http request; Use a JSP page to handle that last part of the http request; Move as much of the Logic (i.e. the Model) into the separate class outside of the Servlet.; Use a RequestDispatcher to forward the http processing from a Servlet to a JSP page.; Store information in the HttpServletRequest object with setAttribute

Q: In the lecture on MVC from the Murach textbook, we had a program that looked like:

In line 21, there is a call to setAttribute to store information in the request object.
What kind of data can be stored with setAttribute?
- Classes that have proper set and get methods
- Classes that extend the Attribute abstract class
- String classes
- Primitives or any class
- any class
A: any class

- It generates an error because of the unwanted '@' character
- It pulls in all of the contents of the file /includes/jokeInclude.jsp into this JSP compilation
- This is equivalent to the java import statement. For example: "import include.jokeInclude"
- JSP uses this when it wants to include C++ code.
A: It pulls in all of the contents of the file /includes/jokeInclude.jsp into this JSP compilation

- doPost
- doGet
- Tomcat will automatically pick either doGet or doPost depending on the current load queue
A: doPost

- doPost
- doGet
- Tomcat will automatically pick either doGet or doPost depending on the current load queue
A: doGet

- doPost
- doGet
- Tomcat will automatically pick either doGet or doPost depending on the current load queue
A: doGet

Q: If I have a lot of data to send from my form ( more than 2,000 bytes).  Which of the following forms should I choose :
- Form in line 1
- Form in line 2
- Form in line 3
- Form in line 4
- Form in line 5
- A form cannot send more than 2,000 bytes
A: Form in line 1

Q: This method is executed before any Servlet request is processed from doGet or doPost.
Often we do one time initialization in this method.
- start
- getInitParameter
- init
- initServlet
A: init

Q: An instance of this class can be created for each user that connects to a given web site.
The created object can then be used to store information related to the specific user.
- Session
- HttpSession
- Cookie
- HttpCookie
A: HttpSession

Q: This is a method in the HttpServletRequest class that returns an HttpSession.
- getSession
- session
- getHttpSession
- You need to call getCookie and then convert the Cookie to a Session
A: getSession

Q: This is a method in the HttpServletRequest class that allows a web program to fetch data saved in the browser that is used for programs that want to remember something.
- getInformation
- getBrowserInfo
- getHeaderInfo
- getCookies
A: getCookies

Q: This is a method in the HttpSession class that allows a web program to fetch data stored on the web server itself.
- getSession
- getAttribute
- getCookie
- getInitParameter
A: getAttribute

Q: This method in the HttpServlet class allows a web program to process data from an Html form that has an attribute named "method" and a value of "get".
- doMethod
- doPost
- doHeader
- doGet
A: doGet

Q: This class provides initialization parameters that are specific to a single Servlet.
- ServletInitParms
- ServletInit
- ServletConfig
- Config
A: ServletConfig

Q: This class contains data that is stored in a Client's browser.
- Cookie
- Session
- ClientInfo
- HttpInfo
A: Cookie

Q: Which of the following  XML tags in a web.xml file contains the name of a Servlet's code file.
- servlet-class xml tag on line 1
- servlet xml tag on line 2
- servlet-code xml tag on line 3
- servlet-file xml tag on line 4
A: servlet-class xml tag on line 1

Q: Which of the following  XML tags in a web.xml file contains a Servlet's Web address.
- http-address xml tag on line 1
- address xml tag on line 2
- web-url xml tag on line 3
- url-pattern xml tag on line 4
A: url-pattern xml tag on line 4

Q: Which of the following  XML tags in a web.xml file contains  a Servlet's configuration data.
- init xml tag on line 1
- init-param xml tag on line 2
- config-servlet xml tag on line 3
- config xml tag on line 4
A: init-param xml tag on line 2

Q: This XML tag in a web.xml file contains an internal name for the Servlet that allows us to associate the Servlet's class and initialization data with it's URL mapping.
- servlet xml tag on line 1
- class-name xml tag on line 2
- servlet-name xml tag on line 4
- servlet-id xml tag on line 5
A: servlet-name xml tag on line 4

Q: This class is used to contain all of the http information sent to the web server from the browser.
- Cookies
- HttpServletRequest
- HttpRequest
- UrlRequest
A: HttpServletRequest

Q: This is the top level class for defining a web Servlet.
- Servlet
- HttpSession
- HttpCookie
- HttpServlet
A: HttpServlet

Q: Forms have an attribute with this name that defines whether a GET or a POST is being used in request defined in the form.
- method
- action
- request
- request_type
A: method

Q: This method shows up in a JSP file that needs to do one time initialization before it starts fielding requests.
- init
- startJsp
- jspInit
- start
A: jspInit

Q: This XML file contains Tomcat configuration data related to which port numbers Tomcat is using.
- config.xml
- server.xml
- ports.xml
- server_ports.xml
A: server.xml

Q: This class contains all of methods needed for sending data back to a browser.
- Response
- HttpResponse
- SendHttp
- HttpServletResponse
A: HttpServletResponse

Q: An HTML form has an attribute with this name which defines the URL to send the request to.
- url
- http_request
- action
- method
A: action

Q: This method in the HttpSession class is used for saving information related to a specific session.
- storeAttribute
- setAttribute
- setResponse
- saveData
A: setAttribute

Q: This method in the HttpServlet class is used to process data related to a form using the POST method.
- doForm
- doMethod
- doGet
- doPost
A: doPost

Q: This method in the ServletConfig class is used to fetch configurable information from the web.xml file.
- getInitParameter
- getParameter
- getInit
- getConfig
A: getInitParameter

Q: This question is based on the Mortgage problem defined in mortgage.htm.

On the mortgage.jsp page, if I want to use "m" instead of "mort" for the tags on lines 17, 19, 27, and 29, I would have to do which of the following:
- Change the package designator appropriately
- Store a variable named "m" using a setAttribute on the pageContext
- Change the value for the prefix attribute on line 1 in mortgage.jsp
- Update the mortgage tld to have an "m" parent class tag
- It can't be done
A: Change the value for the prefix attribute on line 1 in mortgage.jsp

Q: This question is based on the Mortgage problem defined in mortgage.htm.

On line 1 of the mortgage.jsp file, the "uri" attribute needs to have a value that satisfies which of the following properties:
- A proper URL that defines the properties of the tags used on this page.
- The value really isn't used.
- A proper URL for the host where the tags in this JSP will execute.
- Any unique value that matches the "uri" property in some tld file. Once tomcat finds a match, it expects to find definitions for all of the tags on this JSP page that have the corresponding prefix.
- The URI field needs to be filled in with a "User's Rightful Information"
A: Any unique value that matches the "uri" property in some tld file. Once tomcat finds a match, it expects to find definitions for all of the tags on this JSP page that have the corresponding prefix.

Q: This question is based on the Mortgage problem defined in mortgage.htm.

On line 12 of mortgage.jsp, you will see:

${principle}

The value that will be sent back to the browser will ______________.
- come from the request object from something like:
request.getParameter("principle")
- The value must come from a call to getAttribute from the request object like:
request.getAttribute("prinicple")
- The value must come from a call to getAttribute from the session object like:
session.getAttribute("prinicple")
- The value will be obtained from a call to getAttribute from one of the objects
pageContext, request, session, application (in that order).
- When JSP evaluates $(principle}, it will only look in pageContext, because of the way Expression Language works.
A: The value will be obtained from a call to getAttribute from one of the objects
pageContext, request, session, application (in that order).

Q: This question is based on the Mortgage problem defined in mortgage.htm.

On line 12 of mortgage.jsp, you will see:

${param.principle}

The value that will be sent back to the browser will ______________.
- come from the request object from something like:
request.getParameter("principle")
- The value must come from a call to getAttribute from the request object like:
request.getAttribute("prinicple")
- The value must come from a call to getAttribute from the session object like:
session.getAttribute("prinicple")
- The value will be obtained from a call to getAttribute from one of the objects
pageContext, request, session, application (in that order).
- When JSP evaluates $(principle}, it will only look in pageContext, because of the way Expression Language works.
A: come from the request object from something like:
request.getParameter("principle")

Q: This question is based on the Mortgage problem defined in mortgage.htm.

On line 12 of mortgage.jsp, you will see:

${param.principle}

The value that will be sent back to the browser will ______________.
- come from the request object from something like:
request.getParameter("principle")
- The value must come from a call to getAttribute from the request object like:
request.getAttribute("prinicple")
- The value must come from a call to getAttribute from the session object like:
session.getAttribute("prinicple")
- The value will be obtained from a call to getAttribute from one of the objects
pageContext, request, session, application (in that order).
- When JSP evaluates $(principle}, it will only look in pageContext, because of the way Expression Language works.
A: come from the request object from something like:
request.getParameter("principle")

Q: This question is based on the Mortgage problem defined in mortgage.htm.

In the Calc.java and Data.java classes click on all of the TRUE statements
- All of the output to the browser is generated in the doTag method.
- The content between the beginning of the mortgage_calc tag and the ending mortgage_calc will be sent to the browser each time that the following call is made:
getJspBody().invoke(null)
- Expression language constructs like:
${princ}
will be evaluated by a looking for a cookie named princ
- Expression language constructs like:
${princ}
will be evaluated by making a getAttribute call on one of the objects pageContext, request, session, application. The name passed to getAttribute will be "princ".
A: All of the output to the browser is generated in the doTag method.; The content between the beginning of the mortgage_calc tag and the ending mortgage_calc will be sent to the browser each time that the following call is made:
getJspBody().invoke(null); Expression language constructs like:
${princ}
will be evaluated by making a getAttribute call on one of the objects pageContext, request, session, application. The name passed to getAttribute will be "princ".

Q: This question is based on the Mortgage problem defined in mortgage.htm.

The content between the beginning of the mortgage_calc tag and the ending mortgage_calc can be:

(Click all that apply)
- html
- Scripts (like <%= Some Java expression %>
- Expression language constructs like:
${x}
- Text like:
"She sells sea shells down by the sea shore"
A: html; Expression language constructs like:
${x}; Text like:
"She sells sea shells down by the sea shore"

Q: This JSTL tag is used for something like a Java switch statement. Inside of this tag we should see "when" tags and perhaps an "otherwise" tag.
- line 1
- line 2
- line 3
- line 4
A: line 1

Q: This container class is used for a JSP page. It has the methods getAttribute and setAttribute.
EL variables can be stored in this container.
- Page
- PageContext
- JspContext
- Context
A: PageContext

Q: This is an Expression Language construct which could show up in a JSP page to access a variable with the name of "x".
- @(x)
- %{x}
- ${x}
- $[x]
A: ${x}

Q: This is an Expression Language construct which could show up in a JSP page to access the value of a cookie named "fred".
- %(cookie.fred)
- @{cookie.fred}
- ${cookie.fred}
- ${cookie.fred.value}
A: ${cookie.fred.value}

Q: This construct will inform a container like "Tomcat" that this page is using tags.
In this page, the prefix "fun" will be associated with the definitions found in a "tld" file
that contains a uri with the value of "http://wccnet.edu/chasselb/fun".
- line 1
- line 2
- line 3
- line 4
A: line 1

Q: A _______ is a class you would write to use for Expression language.
This kind of class often has the following basic properties:

All data should be private and have appropriate "getters/setters".
- Expression Bean
- Attribute Bean
- Java Bean
- Attribute
A: Java Bean

Q: This Expression Language will access a variable by the name of "state" and call the method "getName()".
- ${state[name]}
- ${state.name}
- ${state.getName}
- [state.name]
A: ${state.name}

Q: This method in the HttpServletResponse is useful for setting the "Mime-type" of the page being sent back.
Normally, this will default to: "text/html".
- setMimeType
- setText
- setDataType
- setContentType
A: setContentType

Q: This JSTL construct can be used to skip over JSP content if a variable named "cram" does not have the value "no"
- line 1
- line 2
- line 3
- line 4
A: line 3

Q: This Expression Language construct will effectively access"
request.getParameter("name")
- ${param.name}
- ${name}
- ${request.getName}
- ${parameter.name}
A: ${param.name}

Q: This JSTL construct will loop through a variable named "states".
- line 1
- line 2
- line 3
- line 4
A: line 2

Q: This JDBC Interface allows you to call methods which receive
SQL Strings as parameters.
- Connection
- ResultSet
- Statement
- SqlExec
A: Statement

Q: SQLExceptions have the following characteristics:
(Check all that apply)
- SQLExceptions are derived from RunTimeException, so it is optional whether you provide code to deal with this exception
- SQLExceptions are only thrown when you have a bad Connection.
- SQLExceptions are thrown when your SQL has a syntax error.
- Most JDBC calls need to be wrapped with
"try ... catch(SQLException e)" logic,
or else you have to add "throws SQLException" on the method containing the JDBC call.
A: SQLExceptions are thrown when your SQL has a syntax error.; Most JDBC calls need to be wrapped with
"try ... catch(SQLException e)" logic,
or else you have to add "throws SQLException" on the method containing the JDBC call.

Q: What is the advantage of using a PreparedStatement in JDBC?
- The SQL can be checked at Java Compile Time.
- If you prepare your statement you don't have to worry about exceptions from your JDBC call.
- A PreparedStatement in JDBC prepares Java to receive a lot of rows from a Select statement.
- The syntax can be checked once at Runtime, and the statement can be reused as many times as desired. The only thing changing on each execution is the data associated with the statement.
A: The syntax can be checked once at Runtime, and the statement can be reused as many times as desired. The only thing changing on each execution is the data associated with the statement.

Q: executeQuery is:
- a property of the Connection class that enables Select statements
- a class that contains the logic for creating SQL queries.
- An interface for SQL queries.
- A method of the Statement Interface that receives an SQL string and returns a ResultSet of data.
A: A method of the Statement Interface that receives an SQL string and returns a ResultSet of data.

Q: You execute the following instruction:
int retval = state.executeUpdate("update Data1 set num = num +1" +" where num > 100");
- retval will contain 0 if the operation succeeds, otherwise retval will contain the error code.
- retval will contain the number of rows updated.
- retval will contain the total of "num" after the update is complete.
- retval will contain the winning lottery number in the Michigan lottery.
A: retval will contain the number of rows updated.

- Code Fragment A
- Code Fragment B
- Code Fragment C
- Code Fragment D
A: Code Fragment D

Q: Assume you are working with the default JDBC characteristics of the Connection class and you issue the following command:
state.executeUpdate("delete from Data1");

Which of the following is true?
- The rows in your table will be deleted if you issue the following statement:
conn.commit();
- No rows are deleted because you didn't have a where clause on your delete statement.
- All of the rows in your table will be deleted.
- This is an illegal command, because we should have issued:
state.executeDelete(...) instead of executeUpdate
A: All of the rows in your table will be deleted.

Q: The ResultSetMetaData Interface is used for:
- Obtaining information about a ResultSet such as the number of columns, and the names of the columns in a ResultSet
- extracting Meta characters (non-ASCII characters) from the data that comes back from a query.
- Creating another ResultSet similar to the first ResultSet. JDBC defines the rules for transforming a ResultSet into a ResultSetMetaData class.
- If your ResultSet contains more than one row, you are required to first transform it into a ResultSetMetaData class before fetching the data.
A: Obtaining information about a ResultSet such as the number of columns, and the names of the columns in a ResultSet

Q: You have a column in your table which is an integer. In your ResultSet, you use the getString method to fetch the integer.
Which of the following statements is correct about fetching an integer with a getString method:
- The getString will successfully fetch an integer, but some overhead is incurred because the integer needs to be converted into a string.
- An Exception occurs when an integer is converted into a String.
- Your Compiler will detect that this is an illegal combination.
- JDBC will popup a dialog box asking if it's OK to convert your integer into a string.
A: The getString will successfully fetch an integer, but some overhead is incurred because the integer needs to be converted into a string.

Q: Which of the following is true about a JDBC PreparedStatements
- Once a Statement class has been used, it can then be converted to a PreparedStatement, because it has been properly initialized with its first execution.
- The President of the US has a Speech writer who creates a Prepared Statement that the President then delivers to the Nation.
- A PreparedStatement provides a template that can be validated one time and executed many times for SQL which fits the template characteristics.
- A PreparedStatement is a hunk of data stored in your database to simplify issuing SQL. Prefetching the PreparedStatement from the database speeds up future Database accesses.
A: A PreparedStatement provides a template that can be validated one time and executed many times for SQL which fits the template characteristics.

Q: If I want to have a Shopping Cart application and I want to use the jsp:useBean tag, I should use the scope value of:
- Don't specify scope because the default will be what you want
- session
- request
- application
A: session

Q: JSP stands for:
- Java Sounds Professional
- Java Sees Pages
- Java Server Pages
- Just Say Peace
A: Java Server Pages

Q: If you want to extract a value using a get method from your Java Bean, you should consider using the following tag:
- jsp:Extract
- jsp:getProperty
- jsp:getAttribute
- jsp:getValue
A: jsp:getProperty

Q: A characteristic that is NOT necessary for a Java Bean
- Must be a public class
- Should implement the JspBean Interface
- Should have no public instance variables
- Must have a zero-argument(empty) constructor
A: Should implement the JspBean Interface

Q: The Connection Pools in JDBC have the following characteristics:

Pick the item below which is NOT a valid characteristic:
- Connection pools keep a list of already logged in connections to a database.
- Connection pools can dynamically grow new Connections as more activity occurs in your application
- If you store your Connection pool as a JavaBean, you would want to use the Request scope
- If a Connection pool hits its maximum number of connections, a new request for connections can be suspended until a currently used Connection is freed up.
A: If you store your Connection pool as a JavaBean, you would want to use the Request scope

Q: Consider the following code:

Which of the following statements is TRUE
- These statements fetch configuration information from your html Form file.
- These statements can only be executed in a Servlet.
- These statements can only be executed in a JSP file
- The ServletContext object is available to every JSP and Servlet defined in a Tomcat Project.
A: The ServletContext object is available to every JSP and Servlet defined in a Tomcat Project.

Q: Which of the following is true:
- The above statements fetch the pageSize characteristic which is always available from the ServletContext.
- The above statements will generate an error, because the string "pageSize" should be "PageSize"
- The above statements will set pageSize = null, unless your application has previously issued a statement something like:
PageSize ps = new PageSize(.....);
config2.setAttribute("pageSize", ps);
- The getAttribute method doesn't exist for the ServletContext object. However, it does exist in an HttpSession.
A: The above statements will set pageSize = null, unless your application has previously issued a statement something like:
PageSize ps = new PageSize(.....);
config2.setAttribute("pageSize", ps);

- ContactSection.jsp will be loaded and compiled each time this page is hit.
- ContactSection.jsp will be compiled along with the containing jsp page the first time the containing page is accessed.
- The ContactSection.jsp file contains data that needs to be loaded each time this page is hit.
- The ContactSection.jsp file is a special file that JSP uses for storing the interactions between each of the JSP pages.
A: ContactSection.jsp will be compiled along with the containing jsp page the first time the containing page is accessed.

- The containing JSP page is informing the browser that it should fetch ShowFactors.jsp
- This command will set the Browser Forward button with the proper address.
- The containing JSP page is transferring control to a JSP page called ShowFactors.jsp.
- When a JSP page is pouting because it has just received an Exception, the jsp:forward command tells the JSP page how to get on with its life.
A: The containing JSP page is transferring control to a JSP page called ShowFactors.jsp.

- It is very inefficient to switch back and forth between Java mode and html mode.
- The above sequence won't execute properly because you can't switch back and forth within a single if statement.
- The class java.util.Calendar is not available to JSP pages because it doesn't implement the Cloneable interface.
- The above sequence of statements is hard to read and consequently it is hard to maintain this software.
A: The above sequence of statements is hard to read and consequently it is hard to maintain this software.

Q: In a JSP page, we have access to the 4 variables: pageContext, request, session, application.

For which of these 4 variables can you access the methods setAttribute, and getAttribute.
Click on ALL that Apply.
- application
- pageContext
- session
- request
A: application; pageContext; session; request

- application
- pageContext
- session
- request
- It will blow up with an exception because the variable "x" is not a proper Java bean.
A: pageContext

Q: According to the syllabus/class policy, check all of the following that are good ways to watch the videos
- Watch the video while taking notes
- Watch the video while watching TV
- Trying to create the program described in the video while watching
- Watch the videos while sending text messages.
A: Watch the video while taking notes; Trying to create the program described in the video while watching

Q: According to the syllabus/class policy, which statements are true about late assignments. (Check all that apply)
- No assignment can be turned in after the due date.
- All assignments should be turned in after the due date.
- Assignments turned in after the due date will have a lateness deduction.
- There are 3 "free passes" which can be used to wipe out lateness deductions
A: Assignments turned in after the due date will have a lateness deduction.

Q: According to the syllabus/class policy, which statements are true about late assignments. (Check all that apply)
- If an assignment is late 1 day the lateness penalty is 25%
- If an assignment is late 2 days the lateness penalty is 27%
- If an assignment is late 2 days the lateness penalty is 25%
- If an assignment is late 7 days the lateness penalty is 40%
- If an assignment is late 25 days the lateness penalty is 40%
- If an assignment is late 35 days the lateness penalty is 50%
A: If an assignment is late 1 day the lateness penalty is 25%; If an assignment is late 2 days the lateness penalty is 25%; If an assignment is late 7 days the lateness penalty is 40%; If an assignment is late 25 days the lateness penalty is 40%

Q: If something bad happens such that I am late on an assignment, which of the following actions can be taken?
- Ask to use of of my "Free Passes" to waive the lateness penalty.
- Get a an appropriate note (such as a note from the doctor) to document the problem and bring it to the instructor.
- Enter into the assignment comments a description of the problem and turn in the assignment once it is completed. Get caught up as soon as possible. Come see the instructor on the last day of classes.
- Request an extension of the deadline. The instructor can usually give out one extension.
A: Enter into the assignment comments a description of the problem and turn in the assignment once it is completed. Get caught up as soon as possible. Come see the instructor on the last day of classes.

Q: According to the "Getting Help" button in blackboard, what are the good options available for getting help. (Check all that apply)
- Come to one of the MM sections or any available office hours
- Come to one of the "On Campus Group Study Sessions"
- Post a question on a class discussion board and hope to get an answer from a fellow student.
- Looking for a completed solution posted on the discussion board.
A: Come to one of the MM sections or any available office hours; Come to one of the "On Campus Group Study Sessions"; Post a question on a class discussion board and hope to get an answer from a fellow student.

Q: Which of the following are true about email. (Check all that apply)
- Class emails will automatically come to your Student email address, so it is good to monitor this on a regular basis.
- Blackboard knows your personal non-student email addresses and that is where you will receive class emails
- Sending an email to the teacher is the best way to get help. This should be done immediately whenever I am stuck on anything.
- It is a good idea to send an email to the teacher when I want to schedule a Go-to Meeting.
A: Class emails will automatically come to your Student email address, so it is good to monitor this on a regular basis.; It is a good idea to send an email to the teacher when I want to schedule a Go-to Meeting.

Q: Check all of the possible times to have a "Go-to Meeting"
- During any available office hour. Calling the posted "office phone number" will allow me to request the "go-to meeting".
- During an on Campus Group study session
- In the morning when Clem plays Raquetball
- During an MM section meeting.
- Anytime, because clicking on the provided link will alert the teacher to your need.
A: During any available office hour. Calling the posted "office phone number" will allow me to request the "go-to meeting".; During an MM section meeting.

Q: Which of the following is true about Class Participation (Check all that apply).
- For each assignment, I must make a post of 1 question AND 1 answer AND 1 discovery AND 1 set of lecture notes
- Just posting 1 question on the discussion board will satisfy my Class participation requirement.
- Just posting 1 answer on the discussion board will satisfy my Class participation requirement.
- Just posting 1 Discovery on the discussion board will satisfy my Class participation requirement.
- Just posting 1 set of lecture notes on the discussion board will satisfy my Class participation requirement.
- Just posting a copy of my completed assignment on the discussion board will satisfy my Class participation requirement.
A: Just posting 1 question on the discussion board will satisfy my Class participation requirement.; Just posting 1 answer on the discussion board will satisfy my Class participation requirement.; Just posting 1 Discovery on the discussion board will satisfy my Class participation requirement.; Just posting 1 set of lecture notes on the discussion board will satisfy my Class participation requirement.

Q: According to the syllabus/class policy, it is OK to team up with another student and turn in the same code for an assignment as long as we indicate this in the Student comments section.
- True
- False
A: False

Q: According to the syllabus/class policy, if I am stuck on an assignment, I can ONLY get help from the Group study facilitator or the teacher.

Another student can't help me with my problem.
- True
- False
A: False

Q: Good reasons to show up to a Mixed Mode class session. Check all that apply.
- I can watch video lectures with "Ear buds" and ask questions whenever something needs clarification.
- I can work on assignments and get timely help when I am stuck
- I can use the WCC computers to do my Facebook
- I will improve my grade because of the "MM bribe formula"
- Programming requires consistent practice. Coming to an MM class section gives me an opportunity to practice my programming skills by working on my assignments.
A: I can watch video lectures with "Ear buds" and ask questions whenever something needs clarification.; I can work on assignments and get timely help when I am stuck; I will improve my grade because of the "MM bribe formula"; Programming requires consistent practice. Coming to an MM class section gives me an opportunity to practice my programming skills by working on my assignments.

Q: When I take a test and I am allowed to access the web, then this means that I can do the following: (Check all that apply)
- I can access the Class web site(Course Content), and any links found in the class web site
- I can post a question on "Stack-Overflow" to get assistance
- I can post my completed solution on a "Web Test Bank"
- I can post my completed solution on the Discussion board associated with the class
A: I can access the Class web site(Course Content), and any links found in the class web site

Q: Which of the following is true about Mixed Mode (MM) and Distance Learning(DL) (Check all that apply)
- A DL student is not allowed in an MM section.
- A DL student can attend any MM section listed in the "Getting Help" button in Blackboard.
- MM students can show up in any MM section listed in the "Getting Help" button in Blackboard .... including the MM sections related to other classes. i.e. a cps161 student can attend an MM cps261 class.
- If an MM student gets 80% on all of his work and fails to show up to some of his MM sections, his grade will be lower than 80%.
- An MM or DL student who gets 80% on all his work will get a higher grade by attending some of the MM sections.
A: A DL student can attend any MM section listed in the "Getting Help" button in Blackboard.; MM students can show up in any MM section listed in the "Getting Help" button in Blackboard .... including the MM sections related to other classes. i.e. a cps161 student can attend an MM cps261 class.; An MM or DL student who gets 80% on all his work will get a higher grade by attending some of the MM sections.

Q: Good reasons for attending MM class meetings (Check all that apply)
- You will get answers to the tests and to hear the extra lectures that are not online.
- Provide a regular class time to make progress for those students who would otherwise procrastinate and put things off to the last minute.
- Find a job in the industry
- To do your facebook
- To allow you to pair up with another student and do the work as a group project.
- To earn MM-bribe points and to have an opportunity to ask questions as needed
A: Provide a regular class time to make progress for those students who would otherwise procrastinate and put things off to the last minute.; To earn MM-bribe points and to have an opportunity to ask questions as needed

Q: Class Participation: (check all that apply)
- To get credit for class participation, you will need to post a Question AND an Answer AND a sharing.
- A single question will give you your credit for Class Participation
- You can get credit for Class Participation by posting on the "Questions for the Instructor" discussion board.
- The Sharing discussion board can be used for sharing your phone number and address so you can meet new friends. This will count as "Class Participation".
- You can get emails when some one answers your question if you use the blackboard subscribe feature.
- You don't have to worry about the subject line because the default blackboard subject line provides the information we need.
A: A single question will give you your credit for Class Participation; You can get emails when some one answers your question if you use the blackboard subscribe feature.

Q: Group Study questions: (check all that apply)
- The instructor will be present at group study
- A trained facilitator will be present at a group study
- Group study is scheduled in class rooms that have computers.
- You can do "goto meetings" with the instructor during group study sessions
A: A trained facilitator will be present at a group study; Group study is scheduled in class rooms that have computers.

Q: Goto-meeting questions: (check all that apply)
- You can have a goto meeting anytime
- If a student calls the instructor on his office phone number during office hours, he can usually do an on the spot goto-meeting.
- Using "goto meeting", a  student can be at home and show the problem on his computer with an instructor who happens to be on campus.
- To schedule a goto meeting, a student should send an email request to the instructor for the goto meeting.
A: If a student calls the instructor on his office phone number during office hours, he can usually do an on the spot goto-meeting.; Using "goto meeting", a  student can be at home and show the problem on his computer with an instructor who happens to be on campus.; To schedule a goto meeting, a student should send an email request to the instructor for the goto meeting.

Q: Some of the course lectures are only available by attending the Mixed Mode section
- True
- False
A: False

Q: This class is the easiest class at Washtenaw Community College.
- True
- False
A: False

Q: If you are having trouble getting your program to work, the class policy recommends doing which of the following:

(check all that apply)
- Sending an email to the instructor as soon as you are stuck.
- Coming to one of the instructor's office hours.
- Calling the instructor on his office phone during an office hour.  Often it is possible to remotely debug the problem using "goto meeting".
- Coming to any of the Mixed Mode (MM) sections that the instructor has scheduled even if the meeting is for a different class than the class the student is signed up for.  Distance Learning (DL) students can also take this approach.
- Coming to a Group study session and getting help from a trained facilitator or another student in group study.
- Requesting  a "goto meeting" with the instructor during one of the  Mixed Mode (MM) sessions.  The request is done by sending an email to the instructor early enough such that the instructor sees the request before the scheduled class.
- Posting a question on one of the "Class Participation" discussion boards and hoping to get an answer from a fellow student.  It would be helpful to subscribe to the question so you will know when someone might be answering the question.
A: Coming to one of the instructor's office hours.; Calling the instructor on his office phone during an office hour.  Often it is possible to remotely debug the problem using "goto meeting".; Coming to any of the Mixed Mode (MM) sections that the instructor has scheduled even if the meeting is for a different class than the class the student is signed up for.  Distance Learning (DL) students can also take this approach.; Coming to a Group study session and getting help from a trained facilitator or another student in group study.; Requesting  a "goto meeting" with the instructor during one of the  Mixed Mode (MM) sessions.  The request is done by sending an email to the instructor early enough such that the instructor sees the request before the scheduled class.; Posting a question on one of the "Class Participation" discussion boards and hoping to get an answer from a fellow student.  It would be helpful to subscribe to the question so you will know when someone might be answering the question.