HowTo:Create a JSP Page and Java Controller
From AgileApps Support Wiki
Revision as of 20:05, 30 March 2012 by imported>Aeric
For: Developers 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:
- Class Directory.java
- Class DirectoryController.java
- Page AddUpdate.jsp
- Page Directory.jsp
- Page SearchPage.jsp
To add the Pages and Classes:
- 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
- Create the class Directory.java from: Directory.java
- 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
- Create the page AddUpdate.jsp from: AddUpdate.jsp
- 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://{yourDomain}/networking/pages/Directory.jsp</nowiki>
After logging in, the user can perform these actions in the Directory object:
- search for records based on specified criteria
- add records
- update records