CSIS355, Portal Primer
This is a brief primer on how to create a web page that accesses one
of your database tables. The idea is to get you started with Portal so you
can explore it more on your own. There is extensive online help available.
- If you want to use SQLPlus to create tables and insert data:
Using the accounts described to you earlier, telnet to
oraserv.cs.siena.edu, go into sqlplus, and create a table. Put some data in it. (Reminder: both your oraserv and Oracle sqlplus accounts have
the same name as your athena accounts.)
- Go to http://oraserv.cs.siena.edu:7778/pls then choose "login"
from the upper right corner. Your login is the same as your oraserv and
Oracle (sqlplus) logins, with an initial password the same as your login
name.
- If you want to use Portal to create your tables: use the
"Navigator" then the go to the "Database Objects" tab to create your
tables. To insert data, you can use a form (similar to reports; see below)
or you can use "insert" in SQLPlus (see above). Remember that one
drawback of this approach is the lack of object-relational features available
in Portal.
- In the upper right corner, one of the choices is "Navigator"; go there
and then to the Applications section. Create an application.
One of the actions listed after you create it is "grant access". Click on that and expose the application so
the items you create in it (forms, reports, SQL queries embedded in a web page, etc.) are allowed to appear in web pages you'll create later.
- Click on the link for your application to see more options for
what you can do. One of these things you can do is create a new report. Choose
that, and choose to build a report based on the Query Wizard, using
a single table. To parameterize the query (e.g., so the end users
can enter a condition that a column has to meet), use the "Customization Form
Display Options" tab when you get to it. List the names of columns you want
users to be able to specify conditions on.
You can click "finish" to accept all the
defaults. You can always change these later. To test the report to
see if it works, click on the "Customize" option (the "Run" option will
skip the initial step where it prompts the user for parameter values).
Before leaving this area,
go to the "access" tab and make sure you "publish" the report so it can be
used in web pages.
- Now you can create a web page that will contain a link to your
new report. Go to the Portal home page (link is in upper right corner
of screen), then choose the "create new page" link. Most of the process from
here is self-explanatory -- feel free to accept the defaults again for
most things. When you get to Step 3 (Add portlets), you add a portlet (e.g.,
a link to the report you just created) by clicking on the leftmost
icon (the one with the gray arrow pointing to a little blue rectangle).
- By default, the page you create will be accessible to anyone. If you named the page "myfirstpage", for example, it's accessible via the
following URL: http://oraserv.cs.siena.edu:7778/pls/portal30/url/page/myfirstpage To restrict access to the page, use the page's "access" tab.
Notice, though, that even though anyone can get to the page, the various
items on the page can only be accessed by users with the right permissions.
For nearly everything you create in Portal, the "access" tab will allow
you to decide who gets to see it. To allow anyone to view and execute a
parameterized report, for example, grant the user "PUBLIC" the "customize" level
of access to the report.
- Another way to publish your report is to
give
users direct access to the report via a URL:
If the report you created earlier is called "myreport" and
your schema is called "myschema", for example, it
is directly accessible via the following URL: http://oraserv.cs.siena.edu:7778/pls/portal30/myschema.myreport.show_parms.
- One other common request is how to put a URL onto a Portal web page (e.g., a link to some external site). One easy way is to use a menu, in
which the items are URLs.
The best way to learn Portal at this point is to use it.
Additional information and documentation on portal is available in the
online help, which is extensive. Some of the links in the online
help lead you to pages at the Oracle Technology Network site. If you
want to access those, you can create yourself an account at otn.oracle.net
to allow you access (it's free).