Creating a web page

Each mode of a portlet can be composed of multiple JSPs and JSF Handler parts. Each mode has an initial JSP that is specified as a parameter in the portlet.xml file for the application.

To add additional pages to the portlet:
  1. In the Project Explorer view, select EGL portlet project.
  2. Click File > New > Other. The New window opens.
  3. Expand Web and click Web page, not JSP.
  4. Click Next.
  5. In the File Name field, enter the name of the new web page. The accompanying JSF handler will have the same name with an *.egl extension. It is a good practice to append the file name with the name of the mode to which the content belongs.
  6. In the Folder field, select the location for the new web page. The location must be in the Web Content folder of the EGL Portlet project. The accompanying JSF handler will be put into the project's jsfhandlers package unless you specified a different package in the workbench preferences.
  7. Make sure that the template you use for the web page is the Portlet JSP template. This template is creates a JSP fragment, rather than an entire web page.
  8. Click Finish.

The new web page and its JSF Handler part are created in your web project. Additionally, EGL creates a navigation rule in the JSF configuration file that allows you to forward users to this page.

After the page has been created, you can use the EGL forward statement to navigate from the main page to the newly created page.


Feedback