Tuesday, 5 November 2013
Saturday, 21 September 2013
Certified Web Component Developer Mock Exam by JavaRanch (69 questions)
- Attend SCWCD before final exam
- SCWCD 1.5
Mock Exam 100 questions by CertChamp
Certified Web Component Developer for J2EE - Exam CX-310-080 by ExamCram
- SCWCD 1.5
Mock Exam 120 questions
questions by topic for SCWCD Certification by javaprepare.com (60 questions)
Component Developer Exam by Eduardo Cobian (60 questions)
Mock Exam by Anand Chawla (59 questions)
Mock Tests by JDiscuss.com (285 questions)
Mock Exams by j2eecertificate.com (90 questions)
Preparation Kit Trial Version by Whizlabs (80 questions)
V4 Trial Version by Enthuware (20 questions)
Mock Exam on JPilotTest Exam Simulator by S.M.Rahman (59 questions)
Sample Questions for SCWCD for the J2EE 1.3 ( questions)
Sample Questions for SCWCD for the J2EE 1.4 ( questions)
Mock Exam by Jiris.com (50 questions)
- SCWCD 5.0
Monday, 11 March 2013
A container runs and controls the servlets.
A full J2EE application server must have both a web container and an EJB container.
When a request is received by the webserver and needs to access a servlet, the webserver hands the
request to the servlet-helper app : the container. Then the container hands the request to the servlet
- Match the request URL to a specific servlet;
- Creates request and response objects used to get informations from the client and send back informations to him;
- Creates the thread for the servlet;
- Calls the servlet’s service() method, passing request and response objects as parameters;
- service() method will call the doXxx() method of the servlet depending on request type;
- Get the response object from the finished service() method and converts it to an HTTP response;
- Destroys request and response objects;
- Sends back response to the webserver
Capabilities of containers
Containers provide :
- Communications support : handles communication between the servlets and the webserver
- Lifecycle management : controls life and death of servlets, class loading, instantiation, initialization, invocation the servlets’ methods, and making servlet instances eligible for GC
- Multithreading support : Automatically creates a new thread for every servlet request received. When the Servlet service() method completes, the thread dies.
- Declarative security : manages the security inside the XML deployment descriptor file. Security can be configured and changed only by modifying this file.
- JSP support : Manages the JSPs.
URL to servlet mapping
The servlet container uses the deployment descriptor to map URL to servlets. Two DD elements
are used to achieve this :
<servlet> : maps internal name to fully qualified class name;
<servlet-mapping> : maps internal name to public URL name.
Model-View-Controller (MVC) Design
MVC does not only separates the Business Logic from the presentation, the Business Logic doesn’t
even know there is a presentation.
MVC : separate Business Logic (model) and the presentation, then put something between them toconnect them (controler), so the business can become a real re-usable code, and the presentation layer can be modified/changed at will.
- HTTP stands for HyperText Transport Protocol, and is the network protocol used over the web. It runs over TCP/IP.
- HTTP uses a request/response model. Client sends an HTTP request, then the server gives back the HTTP response that the browser will display (depending on the content type of the answer) If the response is an HTML file, then the HTML file is added to the HTTP response body
- An HTTP response includes : status code, the content-type (MIME type), and actuel content of the response
- A MIME type tells the browser what kind of data the response is holding URL stands for Uniform Resource Locator: starts with a protocol, then a server name, optionnaly followed by a port number, then the path to the resource followed by the resource name. Parameters may appear at the end, separated from the rest by a ?
GET Gets the data identified by an URI
POST Same, the request’s body is passed to the resource specified by the URI
HEAD Sends back only the header of the response that would be sent by a GET
PUT Sends to the server data to store at specified URI. Server does not process the
data ; it only stores them
DELETE Delete specified resource
TRACE When it receives this request, the server sends it back to the client
OPTIONS Ask server informations about a resource or about its own capabilities
CONNECT Ask for a connction (tunnelling)
Differences between GET and POST
POST has a body.
GET parameters are passed on the URL line, after a ?. The URL size is limited.
The parameters appear in the browser URL field, hence showing any password to the world...
GET is supposed to be used to GET things (only retrieval, no modification on the server).
GET processing must be idempotent.
A click on a hyperlink always sends a GET request.
GET is the default method used by HTML forms. Use the method=”POST” to change it.
In POST requests, the parameters are passed in the body of the request, after the header. There is no
size-limit. Parameters are not visible from the user.
POST is supposed to be used to send data to be processed.
POST may not be idempotent and is the only one.
IDEMPOTENT : Can do the same thing over and over again, with no negative side effect.