• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JWebPlus questions

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Sivasundaram
reply
    Bookmark Topic Watch Topic
  • New Topic