Previous Next JavaScript must be enabled to correctly display this content

## 3.8.2 Understanding f?p URL Syntax

f?p URL Syntax is a legacy syntax that creates a unique URL structure that identifies the address of Oracle APEX, the application ID, page number, and session ID.

- About f?p URL Syntax
  f?p URL Syntax creates a unique URL structure that identifies the location and address of Oracle APEX, the application ID, page number, and session ID.
- About Using f?p Syntax to Link Pages
  Create links between application page using `f?p` syntax.
- Calling a Page Using an Application Alias or Page Alias
  Use URL syntax to call a page using an application alias and/or page alias.
- Calling a Page from a Button URL
  Use URL syntax to call a page from a button URL.

Parent topic: Understanding URL Syntax

### 3.8.2.1 About f?p URL Syntax

f?p URL Syntax creates a unique URL structure that identifies the location and address of Oracle APEX, the application ID, page number, and session ID.

f?p URL Structure and Syntax

f?p URL Syntax creates a URL with the following structure and syntax:

    https://hostname:port/ords/f?p=app_id:page_number:session_id

f?p URL Example

    https://hostname:port/ords/f?p=392:3:13766599855150

This example indicates:

- `https:` stands for HyperText Transfer Protocol and operates at the application layer.
- `hostname` is the domain name of the server. It can also include a port number or an IP address.
- `port` is the port number assigned when configuring Oracle REST Data Services.
- `ords` is the service name defined when configuring Oracle REST Data Services.
- `f?p=`is a prefix used by Oracle APEX to route the request to the correct engine process.
- `392` is the ID of the application being called. The application ID is a unique number that identifies each application.
- `3` is the number of the page within the application. Page number must be unique within the application.
- `13766599855150` is the session number. When you run an application, the APEX engine generates a session number that serves as a key to the user's session state.

See Also:

- Understanding Session State Management
- About Publishing an Application URL

Parent topic: Understanding f?p URL Syntax

### 3.8.2.2 About Using f?p Syntax to Link Pages

Create links between application page using `f?p` syntax.

App Builder includes many wizards that automatically create these references for you. However, you may have to create the syntax yourself in some situations.

To create links between pages in an application, use the following `f?p` syntax:

    f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly

The following table describes the arguments you can pass when using `f?p` syntax.

Table 3-1 f?p Syntax Arguments

Syntax | Description
--- | ---
`App` | Indicates an application ID or alphanumeric application alias. An application alias is a unique alternate alphanumeric application identifier that developers can use in place of the application ID. You define an Application Alias editing the Application Definition. See Also: Managing Application Attributes
`Page` | Indicates a page number or alphanumeric page alias. A page alias is a unique alternate alphanumeric for a page number. Developers can use a page alias in place of the page number ID. You define a Page Alias by editing the page attributes. See Also: Managing Page Attributes
`Session` | Identifies a session ID. You can reference a session ID to create hypertext links to other pages that maintain the same session state by passing the session number. You can reference the session ID using the syntax: Short substitution string: `&SESSION`. PL/SQL: `V('SESSION')` Bind variable: `:APP_SESSION`
`Request` | Sets the value of `REQUEST`. Each application button sets the value of `REQUEST` to the name of the button which enables accept processing to reference the name of the button when a user clicks it. You can reference `REQUEST` using the syntax: Substitution string: `&REQUEST`. PL/SQL: `V('REQUEST')` Bind variable: `:REQUEST`
`Debug` | Displays application processing details. Valid values for the DEBUG flag include: YES. `LEVEL` `n` NO Setting this flag to `YES` displays details about application processing. Setting this flag to `LEVEL` `n` (where `n` is between 1 and 9) controls the level of debug detail that displays. The value of YES equals `LEVEL4`. You can reference the Debug flag using the following syntax: Short substitution string: `&DEBUG`. PL/SQL: `V('DEBUG'`) Bind variable: `:DEBUG` See Also: Debugging an Application
`ClearCache` | Clears the cache. This sets the value of items to null. To clear cached items on a single page, specify the numeric page number. To clear cached items on multiple pages, use a comma-separated list of page numbers. Clearing a page's cache also resets any stateful processes on the page. Individual or comma-separated values can also include collection names to be reset or the keyword `RP`, which resets region pagination on the requested page. The keyword `APP` clears cache for all pages and all application-level items in the current application and removes sort preferences for the current user. The keyword `SESSION` achieves the same result as the `APP` keyword, but clears items associated with all applications that have been used in the current session. See Also: Clearing Session State
`itemNames` | Comma-delimited list of item names used to set session state with a URL.
`itemValues` | List of item values used to set session state within a URL. To pass a comma in an item value, enclose the characters with backslashes. For example: `\123,45\` Every character sequence except `backslash comma` (`\,`) can be enclosed with backslash.
`PrinterFriendly` | Determines if the page is being rendered in printer friendly mode. If PrinterFriendly is set to Yes, then the page is rendered in printer friendly mode. The value of PrinterFriendly can be used in rendering conditions to remove elements such as regions from the page to optimize printed output. You can reference the printer friendly preference by using the following syntax: `V('PRINTER_FRIENDLY')` When referenced, the page displays using a printer friendly template. The APEX engine displays all text within HTML form fields as text. The printer friendly template does not need to have the `#FORM_OPEN#` or `#FORM_CLOSE#` tags. The objective is to be able to display information with few tables and in a format suitable for printing.

Parent topic: Understanding f?p URL Syntax

### 3.8.2.3 Calling a Page Using an Application Alias or Page Alias

Use URL syntax to call a page using an application alias and/or page alias.

Application and page aliases must consist of valid Oracle identifiers, cannot contain any whitespace, and cannot be case-sensitive. The following example calls a page from within an application using an application alias and a page alias. This example runs the page `home` of the application `myapp` and uses the current session ID.

    f?p=myapp:home:&APP_SESSION.

Application aliases must be unique within a workspace. If an application in a different workspace has the same application alias, use the `&c` argument to specify the workspace name. For example:

    f?p=common_alias:home:&APP_SESSION.&c=WORKSPACE_A

Parent topic: Understanding f?p URL Syntax

### 3.8.2.4 Calling a Page from a Button URL

Use URL syntax to call a page from a button URL.

When you create a button, you can specify a URL to redirect to when the user clicks the button. This example runs page 6001 of application 6000 and uses the current session ID.

    f?p=6000:6001:&APP_SESSION.

Note that this is only one approach to using a button. This method bypasses page submission and acts as a hyperlink on the page. You can also have a button click submit a page. In that approach, clicking the button submits the page for processing, allowing forms to be submitted and session state to be saved.

See Also:

Managing Buttons and APP_SESSION

Parent topic: Understanding f?p URL Syntax