Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JWebPlus questions

 
Leandro Sales
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm answering some questions, from JWebPlus mock exam, and some of the answers I don't agree...

1. Questin ID: 1079622431618

A web.xml for a web application contains the following:

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>sales</realm-name>
<form-login-config>
<form-login-page>/formlogin.html</form-login-page>
<form-error-page>/formerror.html</form-error-page>
</form-login-config>
</login-config>
What should formlogin.html contain?

A.A base 64 encoded username and password.
B.A header that prompts the browser to pop up th username/password dialog.
C.A form that POSTs to j_security_check url.
D.Any html page that does not require the user to login.
E.Code to redirect the user to the login page.

The correct answer was C, it's really OK??
My answer was A, because letter C shoul be if the method was FORM... Am I right?


2.QUESTION ID: 1074483096010

Given:

<%@ taglib uri="example" prefix="example" %>
<example:aTagWithBody>
<%="Body Content"%>
</example:aTagWithBody>

If the aTagWithBody handler extends from TagSupport and returns EVAL_BODY_BUFFERED from doStartTag(), what will the above page print?



Select 1 correct option.

A. The tag handler class would not compile.
B. An exception at request time.
C. "Body Content" will NOT be printied.
D. "Body Content" will be printied.
E. None of these.

The correct answer was B, but how can it compile if EVAL_BODY_BUFFERED it's not defined in
TagSupport? EVAL_BODY_BUFFERED is only defined in BodyTag, isn't it?

3. Question ID: 1078934555548


<%@import package='java.util.*' %>
<html>
<head>
<title> Test Page </title>
<body>
Today's Date is <%=new Date()%>
</body>
</html>

It was the answer of a "Complete..." question where you have to choose between:

1 - <%@import package='java.util.*'%> or <%@ page import package='java.util.*' %>
2 - <%=new Date()%> or <%new Date()%>

I chose <%@ page import package='java.util.*' %> and <%=new Date()%>, but for my surprise
the first was wrong as you can see on the answer... Is it REALLY correct??




Sorry about the big post,
 
Sivasundaram Umapathy
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be these posts would help you

Answer for Q.1

Answer for Q.2

Answer for Q.3
 
Leandro Sales
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Sivasundaram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic