AgileApps Support Wiki Pre Release

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

From AgileApps Support Wiki
imported>Aeric
(Created page with "This example describes how to use a Page to perform the following actions on records in the ''Directory'' object: :*search for records based on specified criteria :*add recor…")
 
imported>Aeric
Line 1: Line 1:
{| border="1" cellpadding="5" cellspacing="1" align="right"
|''See more:''
* [[HowTo Guides]]
|}
This example describes how to use a [[Page]] to perform the following actions on records in the ''Directory'' object:
This example describes how to use a [[Page]] to perform the following actions on records in the ''Directory'' object:
:*search for records based on specified criteria
:*search for records based on specified criteria

Revision as of 23:31, 24 January 2012

See more:

This example describes how to use a Page to perform the following actions on records in the Directory object:

  • search for records based on specified criteria
  • add records
  • update records
Considerations
It is important to create the Classes files first, then create the Pages. Five files are provided, including two Classes, and three Pages. The files should be created in this order:
  1. Class Directory.java
  2. Class DirectoryController.java
  3. Page AddUpdate.jsp
  4. Page Directory.jsp
  5. Page SearchPage.jsp

To add the Pages and Classes:

  1. To create the (.java) Java pages, follow the instructions at Add a Class
    Create the class Directory.java from: Directory.java
    • Copy and paste the contents into the Class
    • Save the file as Directory.java
    Create the class DirectoryController.java from: DirectoryController.java
    • Copy and paste the contents into the Class
    • Save the file as DirectoryController.java
  2. To create the (.jsp) Java Server Pages, follow the instructions at Add a Page
    Create the page AddUpdate.jsp from: AddUpdate.jsp
    • Copy and paste the contents into the Page
    • Save the file as AddUpdate.jsp
    Create the page Directory.jsp from: Directory.jsp
    • Copy and paste the contents into the Page
    • Save the file as Directory.jsp
    Create the page SearchPage.jsp from: SearchPage.jsp
    • Copy and paste the contents into the Page
    • Save the file as SearchPage.jsp
  3. To invoke the Directory page from the URL, copy and paste the following into a web browser. A valid username and password is required to log in to the platform.
https://{domain}/networking/pages/Directory.jsp

After logging in, the user can perform these actions in the Directory object:

  • search for records based on specified criteria
  • add records
  • update records