This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Mock question -- security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Mock question -- security" Watch "Mock question -- security" New topic
Author

Mock question -- security

Tiffiny Yang
Ranch Hand

Joined: Mar 29, 2006
Posts: 124
The following web page is defined as the custom form login page for authentication. Assuming that you have attempted to access a protected resource and been redirected to this web page, what is the result of filling in the user name and password fields and pressing SUBMIT? (Choose one.)
<html>
<head><title>Login Form</title></head>
<body>
<form action="jsecuritycheck" method="POST>
<br />Name: <input type="text" name="jusername" />
<br />Password: <input type="password" name="jpassword" />
<br /><input type="submit" value="Log In" />
</form>
</body>
</html>
A.You will not be redirected to this page in the first place.
B.HTTP 401 or 403 error (forbidden/not authorized).
C.HTTP 404 error (page not found).
D.HTTP 500 error (server error).
E.The page is redisplayed.

answer is E.

I think it should be C, and I tried it, it's HTTP 404 error (page not found). I am using TomCat 5.5.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41180
    
  45
I would have guessed C as well, since an action of "jsecuritycheck" has no special meaning. In order to invoke the authentication check it should be "j_security_check".


Ping & DNS - my free Android networking tools app
Tiffiny Yang
Ranch Hand

Joined: Mar 29, 2006
Posts: 124
Thanks Ulf.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Mock question -- security
 
Similar Threads
Doubt in custom form login page for authentication
Spring Login problem "Request processing failed; nested exception is java.lang.NullPointerException"
login config resource not available
JSP Tag Error
How to send Parameters from JSP to a Servlet?