• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

form action default request type

 
Terence Doyle
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In question # 34 of the JavaRanch mock exam it says that the default action for a form is get.
I thought it was post???

Anyway I got 92% on the mock. Can anyone who's passed the certification compare this mock exam ( yes I know it's short ) to the real thing in terms of difficulty?
Thanks,
Terry
 
Tim Duncan
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Terence Doyle:
I thought it was post???

Nope, definitely GET. Of course in practice most people will use POST for a form, but the default is GET.

 
Allan Moster
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if the question is "standard action for form" instead of "default action for a form"? Will the answer be "POST" instead of "GET"?
 
Tim Duncan
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's how I'd read it, but I'd say it was badly phrased.

 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3752
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allan, I know where you are coming from I think it was fixed. I'll double check it.
------------------
SCJP2, SCWCD Resources, Free Question A Day, Mock Exam Results and More!
www.jdiscuss.com
Get Certified, Guaranteed!
JQPlus - For SCJP2
JWebPlus - For SCWCD
JDevPlus - For SCJD
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"the login page must include a form with a POST to the URL �j_security_check� with a username sent as j_username and a password j_password"
I got question about "Form based authentication". How actually servlet container uses j_secrity_check,j_username,j_passwrd to do the authentication. please adivse. Thanks

 
Tim Duncan
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(Note: We've changed topic now)
Form-based authentication is very similar to basic authentication, except that you define the page that collects the username and password rather than relying on the browser.
In BASIC the server returns "WWW-Authenticate: Basic realm="Default"" in the response header when user tries to access a protected resource. The browser then pops up the familiar window requesting username and password for the specified realm. These are then sent back to the server in a new request for the resource with "Authorization: Basic TXJQb2ludHlIYWlyOk1yUG9pbnR5SGFpcg==" or similar, where the encrypted string is is simply a Base64 encoding of "username:password". The server then decides whether to allow access or not.
With FORM-based authentication, when user tries to access a protected resource, the server goes to the login page specified in the deployment descriptor. The server can then use the username/password to authenticate the user.
The chapter in Jason Hunter's book has a good description, and there are examples online: http://www.servlets.com/jservlet2/examples/ch08/index.html


[This message has been edited by Tim Duncan (edited October 30, 2001).]
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim. I understand now.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic