Difference between revisions of "HowTo:Create a JSP Page and Java Controller"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 7: Line 7:


The following files are used:
The following files are used:
:#Class [[AddUpdateController.java|AddUpdateController.java]]
:#Class [{{DOCHOST}}/training/AddUpdateController.java AddUpdateController.java]
:#Page [[AddUpdate.jsp|AddUpdate.jsp]]
:#Page [{{DOCHOST}}/training/AddUpdate.jsp AddUpdate.jsp]


;Prerequisites:
;Prerequisites:

Revision as of 22:17, 2 August 2012

For:   Developers
Level: Intermediate
Time: 15 minutes

See more:
    ◾ HowTo Guides

This example shows how a JSP Page and a Controller Class interact to let the user:

  • add records to a Mailing List object
  • do a SQL search for (one or more) records
  • update records

The following files are used:

  1. Class AddUpdateController.java
  2. Page AddUpdate.jsp
Prerequisites
  • A "Mailing List" object must be created, with two fields: contact_name and contact_email

To create the Java class:

  1. Follow the instructions at Add a Class
  2. Copy and paste the contents of AddUpdateController.java into the Class
  3. Save the class

To create the JSP Page:

  1. Follow the instructions at Add a Page to create AddUpdate.jsp
  2. Copy and paste the contents of AddUpdate.jsp
  3. Save the JSP page

To test the project, visit the following URL:

https://{yourDomain}/networking/pages/AddUpdate.jsp
(A valid username and password is required to log in to the platform.)