Oracle APEX Architecture Free Tutorial

This free tutorial explains APEX architecture, i.e. how the HTTP request/response cycle works, how an APEX application works (prerequesite knowledge), then introduces the options for an HTTP listening service: the embedded PL/SQL gateway, the Apache mod_plsql module, and the APEX listener deployed to either a Glassfish or a WebLogic container.

We summarize with benefits and recommendations for the various listener options.

Audience:  Oracle DBA’s, Internet Architects, System Admins, APEX Developers, anyone interested in learning how APEX works.

Presenter: John Watson, Oracle Certified Master and SkillBuilders’ Director of Oracle Database Services.

Moderator: Dave Anderson, SkillBuilders President and Oracle DBA

his free tutorial is segmented into the following modules:

  1. Introduction to John Watson, SkillBuilders Director of Oracle Database Services (1:59)
  2. Tutorial Agenda (2:35)
  3. Understanding the HTTP Request / Response Cycle (6:56) (click on video below)
  4. How an APEX Application Really Works (A Bit of Architecture) (12:21)
  5. Listener Options Part 1: Embedded PL/SQL Gateway & Apache (5:26)
  6. Listener Options Part 2: The Oracle APEX Listener (9:18)
  7. Recommendations and Next Steps (1:27)

Date: Jul 25, 2013

NOTE: Some corporate firewalls will not allow videos hosted by YouTube.


Understanding the HTTP Request / Response Cycle

Oracle APEX Architecture and Listener Options


Session 3 – The HTTP Request Response Cycle


>> John:  To begin with, the HTTP request-response cycle. HTTP is a stateless protocol. You issue an HTTP request using typically a post or get method. 


I’ll go to the most basic get method here. This shouldn’t be the URL. The URL doesn’t have to come from a browser of course, it can come from pretty much anything, but the URL just doesn’t get request. It contacts the web listener sending it a message requesting a page. The web listener does whatever is necessary and returns the page usually in the form of HTML but not necessarily. 


To break down what a URL actually is. You specify a protocol then delimiter colon, slash, slash (://), username delimiter colon (:) and the password and an at symbol (@), host.domain delimiter colon (:), port number delimiter a slash (/), then a path delimited with slash (/), filename with a dot (.) has a delimiter and then extension followed by a question mark (?) and then a set of parameters, parameter=value pass. Your entire URL may have all of these elements. It usually won’t. 


For example, a typical URL – I have on the slide just that. FTP – if I were to launch my browser




and give it an FTP, type URL FTP://. I’ll log on. What might my log on be? Perhaps give it a username, Oracle. Password, Oracle. Not working high security here, @ and then my server . and see what we’ve got. 


I didn’t specify the entire URL at that point, just part of it. If we look down here, check my status line in the bottom. If I hover over hello world there, you’re seeing the status line at the bottom of the browser FTP://oracle:oracle is the username and password, @, the host name and then specifying a file helloworld.txt. Clicking on that, we get “message is sent” and back comes the content of the file. 


That’s all a URL is. You issue a URL, the client then hangs until the server side returns the page of HTML or whatever it may be. That will be a fairly basic URL. 




In the APEX environment your URL is more likely going to be of this form. 




You’ll be at the form http://machine, then a port typically 8080, then the path probably APEX or it could be something else, and then the / and then f and the question mark (?). What’s that – the f and the question mark? We’re breaking it down again. 


An example, I’ll go to http:// and the destination I’m going to go to, just at this point, one of Oracle’s demonstration sites. We could go to 


[pause] I happen to know this listener is listening on port 80, the virtual path is being configured is pls/otn. This is part of the Oracle Technology Network. And then f as a filename. Remember after the filename, we can have a question mark (?) and the parameter string. The parameter string I will give it is p=31517. Machine name, port, path, filename f, parameter string p=31517. Send that URL off and we get back a page for a demonstration APEX application. 




What actually happened when we ran that? The web listener on the other side received the HTTP request and path it. It looks at that path pls/otn and the web listener, whatever it is, maps that onto something else. In the case of my FTP URL, it maps it onto a filename and copied it back. In the case of an APEX Listener, that gets mapped onto a call to run a PL/SQL procedure. Which procedure? 




The procedure called f, which is perhaps not the most helpful procedure but the procedure called f. What is f? 




On any database where APEX being stored – if I select owner and object 5 from DBA objects where object name = f, this does need to be in quotes (“), we see there’s a public synonym and if we investigate further we see that’s mapped onto that procedure. Now we know that f in this state is not a file name, it’s a PL/SQL procedure. And what is it? That’s the procedure. 


This is the procedure, the f procedure, this is the heart of APEX. You invoke the procedure with optionally one or more parameters. I pass through one parameter which is p equals (=) and I gave it p=31517 and that is the page identifier. You request a page by name or by number and there are few other extras you’re going to add on to the p arguments which should be subsession identifier, a few other parameters you can drive it with, and in some circumstances you’ll set extra ones. 


That’s what an APEX application is. It’s a URL that invokes the f procedure, the f procedure then generates a page of HTML which is sent back to you. 




How is that page generated? That becomes the next major point of discussion.


Copyright 2017

Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!