Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

form action default request type

 
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
 
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.

 
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.

 
Enthuware Software Support
Posts: 4428
41
  • 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
 
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.
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic