Saturday 9 May 2015

OCEJWCD - 3. Implementing an MVC Design (part1)

OCEJWCD (SCWCD) - 1Z0-899 - Web Component Developer Certification

In this post we are going to implement a simple application step by step:

The behaviour will be:
  1. Start the application (start.jsp).Introduce data in input fields and click the submit button.
  2. The servlet Login1 will be called.
  3. Welcome page (welcome.jsp) will be displayed with the name of the user.
Deployment descriptor:

Note: When creating a project in Eclipse use DynamicWeb Project. 

3.1. Code a controller using a servlet

The servlet code is created under src folder.

3.2.  Code a view using a JSP

The JSPs have been created directly under WebContent.

start.jsp
welcome.jsp

Executing the application:
-Start the application : http://localhost:8080/ExampleServlets/start.jsp



OCEJWCD (SCWCD) - 1Z0-899 - Web Component Developer Certification

No comments:

Post a Comment