Dr. Dobb's Journal - February 2009 - (Page 31) d02will_p1db 12/12/08 10:32 AM Page 31 an Oracle database to fulfill an HTTP request.” In other words, a DAD is used to call a stored procedure from a web browser. In this case, the procedure is show_video(). To set up the DAD: 1. Access the Oracle HTTP Server’s main page. Generally, the URL might be http://hostname:port. 2. Select the mod_plsql option by clicking the mod_plsql communication menu link. 3. Click on the Gateway Database Access Descriptor Settings Link. 4. Click the Add Default (blank configuration) link. 5. Enter the DAD name, username, password, and connect string of the database schema to be associated with this DAD. It isn’t required that usernames/passwords be entered; if left blank, users must enter them when accessing the videos. 6. Click OK at the top of the page. Invoking Stored Procedures In my form, I create a button and a when-button-pressed trigger for that button. Within this trigger, I added the URL to call the procedure and wrapped Web.Show_Document() around it. This URL was built from the previous sections. The URL without the Web.Show_Document() looks like this: http://hostname:port/mod_plsql _directory/data_name/procedure_name where mod_plsql_directory is the directory alias of the mod_plsql module of the HTTP Server (usually this is pls), dad_name is the name of the DAD created in step 5, of the section titled “Create a Database Access Descriptor (DAD).” The procedure_name is the name of the database procedure created to show the video on the Web using Oracle’s HTP package. Therefore, the URL looks like this: http://localhost:80/pls/video /show_video?p_file_number=1 where p_file_number is the name of the parameter that’s being passed to procedure show_video(). Now when I wrap the previous discussed URL with Web.Show_document() (Oracle’s Forms built-in package) it looks like: Web.Show_Document('http://localhost:80/pls/video/show _video?p_file_number=1','_blank'); where p_file_number=1 is the parameter that is passed to the procedure show_video() and _blank opens a new window to display the video. Conclusion It seems that you can do most anything with the Web.Show_Document() package. Besides being able to call a stored procedure by wrapping Web.Show_Document() around a URL, you can use it to call Oracle Reports and Java Server Pages (JSP) all from Oracle Forms. All in all, Oracle has made Forms 10g easier to work with Java than in past releases. DDJ February 2009 l www.ddj.com l Dr. Dobb’s Journal 31 http://www.imagix.com http://www.ddj.com
Table of Contents Feed for the Digital Edition of Dr. Dobb's Journal - February 2009 Dr. Dobb's Journal - February 2009 Contents Friday Night Fish Fry Alia Vox Developer Diaries Conversations Computing in the Clouds Software Development in the Cloud Videos and Oracle Forms 10g Parallel LINQ Decoupling C Header Files Effective Concurrency Disciplined Agility Swaine’s Flames Dr. Dobb's Journal - February 2009 Dr. Dobb's Journal - February 2009 - (Page BB1) Dr. Dobb's Journal - February 2009 - (Page BB2) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page Cover1) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page Cover2) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page 1) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page 2) Dr. Dobb's Journal - February 2009 - Dr. Dobb's Journal - February 2009 (Page 3) Dr. Dobb's Journal - February 2009 - Contents (Page 4) Dr. Dobb's Journal - February 2009 - Contents (Page 5) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 6) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 7) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 8) Dr. Dobb's Journal - February 2009 - Friday Night Fish Fry (Page 9) Dr. Dobb's Journal - February 2009 - Alia Vox (Page 10) Dr. Dobb's Journal - February 2009 - Alia Vox (Page 11) Dr. Dobb's Journal - February 2009 - Developer Diaries (Page 12) Dr. Dobb's Journal - February 2009 - Developer Diaries (Page 13) Dr. Dobb's Journal - February 2009 - Conversations (Page 14) Dr. Dobb's Journal - February 2009 - Conversations (Page 15) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 16) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 17) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 18) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 19) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 20) Dr. Dobb's Journal - February 2009 - Computing in the Clouds (Page 21) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 22) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 23) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 24) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 25) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 26) Dr. Dobb's Journal - February 2009 - Software Development in the Cloud (Page 27) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 28) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 29) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 30) Dr. Dobb's Journal - February 2009 - Videos and Oracle Forms 10g (Page 31) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 32) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 33) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 34) Dr. Dobb's Journal - February 2009 - Parallel LINQ (Page 35) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 36) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 37) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 38) Dr. Dobb's Journal - February 2009 - Decoupling C Header Files (Page 39) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 40) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 41) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 42) Dr. Dobb's Journal - February 2009 - Effective Concurrency (Page 43) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 44) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 45) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 46) Dr. Dobb's Journal - February 2009 - Disciplined Agility (Page 47) Dr. Dobb's Journal - February 2009 - Swaine’s Flames (Page 48) Dr. Dobb's Journal - February 2009 - Swaine’s Flames (Page Cover3) Dr. Dobb's Journal - February 2009 - Swaine’s Flames (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.