aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JWebPlus questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JWebPlus questions" Watch "JWebPlus questions" New topic
Author

JWebPlus questions

Leandro Sales
Greenhorn

Joined: Oct 03, 2004
Posts: 10
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,


Leandro Sales<br />SCJP 1.4<br />SoftSite Tecnologia
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
May be these posts would help you

Answer for Q.1

Answer for Q.2

Answer for Q.3


Siva
Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
Leandro Sales
Greenhorn

Joined: Oct 03, 2004
Posts: 10
Thanx Sivasundaram
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JWebPlus questions