From the main menu, select View, then Application Navigator. In the Application Navigator, expand the Projects panel. Expand Web Content, then wcm, and then templates. Right-click page and select New. From the Categories list, expand Web Tier, then select

1-10 Oracle Fusion Middleware Developers Guide for Site Studio for External Applications ■ Subtemplate : Like a page template, but is typically responsible for a portion of a page after being assigned to a placeholder. May contain other wcm:placeholder tags. Template Registration Templates are registered with a unique identifier in the wcm-config.xml file. This identifier is used to identify the template throughout the Site Studio application. The identifiers are used in the project file to identify page templates either primary or secondary and are used in placeholder definitions, to identify a region template or subtemplate. This template maps the name homepage to the path wcmtemplatespage homepage.jspx. When the homepage identifier is encountered, the RequestDispatcher is invoked to include the path. mappings pageTemplates mapping path=wcmtemplatespagehomepage.jspx id=homepage pageTemplates mappings There is no requirement that the template has to point to a JSP or JSPX file. The mapping can point to any valid web application resource. For example, a section could point to another servlet for processing: mappings pageTemplates mapping path=servletsreserveMeetingRoom.do id=reserveMeeting pageTemplates mappings

1.10.1 Creating a Local JSPX Template

Follow these steps to create a JSPX template stored locally on JDeveloper typically, in a subdirectory within your project on JDeveloper.

1. From the main menu, select View, then Application Navigator.

2. In the Application Navigator, expand the Projects panel.

3. Select a Site Studio project.

4. Expand Web Content, then wcm, and then templates.

5. Right-click page and select New.

The New Gallery dialog opens.

6. From the Categories list, expand Web Tier, then select JSP.

7. From the Items list, select JSP.

8. Click OK.

The Create JSP dialog opens. 9. For File Name, provide a descriptive file name that identifies this file as a template for this site. 10. For Directory, accept the default or provide a different directory. By default, the Site Studio template directory in JDeveloper is used. If you want to store the files outside of the JDeveloper directory structure, specify the location. About Site Studio for External Applications 1-11

11. Select Create as XML Document. This creates a JSP page written in XML syntax

using JSPX as the file extension.

12. Select Register Site File to register the template with your site. In most cases, you

will want your template registered with your site. 13. Select the template type from the Asset Type drop-down list. 14. Provide a site file ID that identifies this file as a template for this site. 15. Provide a description for the new template.

16. Click OK.

17. From the main menu, select File, then select Save All.

See the topic Creating and Editing Local Templates in the online help for additional information on creating and editing JSPX templates stored locally on JDeveloper.

1.10.2 Creating a Remote JSPX Template