[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

WEB BASED PL/SQL LOGIN NEED HELP

Posted on 2003-11-25
6
Medium Priority
?
1,436 Views
Last Modified: 2013-12-12
I havnt worked with Oracle on the Web before so i need help in changing this login script into a web based login. I would like a working solution for the web, based on the same principle as the login below and i will again offer all the points i have in my possession which at the moment is 70. If you have any questions please dont hesitate to make a post to this thread and i will reply

PRE-FORM TRIGGER

BEGIN
:global.quit := 'FALSE';
:global.v_attempt := 0;
END;

WHEN-WINDOW-ACTIVATED-TRIGGER

--MAXIMIZE WINDOWS
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);
SET_WINDOW_PROPERTY('LOGIN_FORM', WINDOW_STATE, MAXIMIZE);

IF :global.quit='TRUE' THEN
  koniec;
END IF;

ON-LOGON TRIGGER

logon(get_application_property(USERNAME),
      get_application_property(PASSWORD)||'@'||get_application_property(CONNECT_STRING), FALSE);
if not form_success then
  :global.bad := 1;
  raise form_trigger_failure;
end if;

LOGON BUTTON CODE

WHEN-BUTTON-PRESSED TRIGGER

if :LOGIN_BLOCK.USERNAME is null then
  message('User must be entered !');
  go_item('LOGIN_BLOCK.USERNAME');
  return;
end if;
if :LOGIN_BLOCK.PASS_WORD is null then
  MESSAGE('Password must be entered !');
  go_item('LOGIN_BLOCK.PASS_WORD');
  return;
end if;
set_application_property(CURSOR_STYLE,'BUSY');
:global.bad  := 0;
if :LOGIN_BLOCK.CONNECT_STRING is null then
  logon(:LOGIN_BLOCK.USERNAME,:LOGIN_BLOCK.PASS_WORD, FALSE);
else
  logon(:LOGIN_BLOCK.USERNAME,:LOGIN_BLOCK.PASS_WORD||'@'||:LOGIN_BLOCK.CONNECT_STRING, FALSE);
end if;
if :global.bad = 0 and form_success then
  set_application_property(CURSOR_STYLE,'DEFAULT');
  open_form('MAIN_MENU');
ELSE
  :global.v_attempt  := :global.v_attempt  + 1;
  set_application_property(CURSOR_STYLE,'DEFAULT');
  if :global.v_attempt  < 3 then
    MESSAGE('Username/Password was invalid. Please re-enter !');
    go_item('LOGIN_BLOCK.USERNAME');
  else
    MESSAGE('Three Invalid Login Attempts. Account Locked');
    exit_form(no_validate);
  end if;
end if;

CANCEL BUTTON

WHEN-BUTTON-PRESSED TRIGGER

BEGIN
EXIT_FORM(no_validate);
END;

PROGRAM UNIT koniec

PROCEDURE koniec IS
BEGIN
  :global.quit := 'TRUE';
  exit_form(no_validate);
END;

Awaiting your replies. Any Assistance will be greatly appreciated :)
0
Comment
Question by:learning_oracle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 22

Expert Comment

by:Helena Marková
ID: 9817214
There is no need of changing anything in your code. You have to read this article:
http://otn.oracle.com/products/forms/pdf/forms9icstowebmigration.pdf
and you will see what are differences between client/server and WEB Forms.
0
 

Author Comment

by:learning_oracle
ID: 9817550
How will i go about changing the login into HTP so i can call program units using like http://oraprod:7778/pls/connect_string/login_form$.startup or is there anyway way to like generate the login form to the web i have oracle 6i working with oracle 8.17 Personal Addition. I read that pdf carefully Henka it was very information rich on tiers and advantages of using web based applications over GUI and database tiers :) i heard alot about those at an Oracle Conference i went to quite recently
0
 
LVL 22

Accepted Solution

by:
Helena Marková earned 280 total points
ID: 9822956
You have to install Oracle9iAS. I have found this on Metalink.

Target Audience: Support Engineers, Consultants, Developers, System Administrators, DBAs, Application Architects
The article is applicable to Unix and MS Windows operating systems but ONLY to Oracle Forms 6i / Oracle 9iAS Rel 1

About the Forms Listener Servlet

Starting with Forms / Reports 6i patchset 4 the Forms Listener Servlet is introduced as an alternative architecture to the original Forms Listener Server. This new functionality, in effect, is a backport of the functionality used to deploy Oracle 9iAS / 9iDS Rel 2 Forms Services (Forms 9i)

The Forms Listener Servlet architecture is especially targeted at forms applications which are to delivered over the internet (i.e through firewalls and proxy servers) as well as intranet. In this respect, it overcomes many of the problems / limitations faced when using the original Forms Server in HTTP and HTTPS mode.  

-Because the Forms Listener Server process manages the initial connections from the client, the machine on which the Forms Server process is running and the port number on which it is listening must be exposed at the firewall level.
-The connecton between the client and the Forms Server Runtime process is expected to be persistant i.e network endpoints must be maintained. If the network connection at either end is dropped the end user experiences a significant interruption and has to restart the application
-The data being passed uses HTTP. This, in effect, 'turns' the Forms Listener Server process into a pseudo HTTP Server. Due to the slightly different HTTP formats, security and protocol settings used by different browsers, firewalls, proxy servers a number of compatibility issues were found. These could not easily be resolved without making major changes to the internal Forms Listener Server code.

The Forms Listener Servlet, as written in java, is designed to allow a more robust and standard deployment of forms over the web. Compared to the original Forms Listener Server it offers the following benefits:
-Broader range of firewalls and proxy servers supported
-No protocol restriction (HTTP 1.1 or HTTP 1.0)
-No extra process (i.e the Forms Listener Server) to manage
-No specific certificate to purchase/ manage for SSL deployment
-Load Balancing achieved via standard HTTP Apache Server/ JServ methodology

As well as bug fixes, the Forms Listener Servlet for Forms 6i has been further improved / enhanced and made easier to configure in patchset releases subsequent to patchset 4.
The Forms Listener Servlet is not to be confused with the Forms Servlet.

How to Configure the Forms 6i Listener Servlet?

It is highly recommended that the latest Forms/ Reports 6i is applied first before configuring the Forms Listener Servlet due to the number of fixes and enhancements provided since patchset 4.

Quick Guide

The following is a handy summary of the basic configuration steps:

** Important Notes **

The Forms Listener Servlet is installed as part of Forms 6i patchset 4 or higher. The patchset should be installed on top of an existing Oracle 9iAS Rel 1 install. (Note: Forms Listener Servlet cannot be configured to work with a standalone Oracle 9iDS Forms 6i install. This is because it requires the JServ component packaged with Oracle 9iAS). Install the patchset in the 9iAS 806 (MS Windows naming convention) / 6iserver (Unix naming convention) Oracle Home. It is very important to choose the custom install method, and only select the patchset components labelled Forms Server. Do NOT select other components such as Forms Builder.)

Ensure that all Oracle 9iAS components are shutdown before applying the patchset / manually configuring the Forms Listener Servlet

Location of the relevant configuration files
Jserv.properties                         Oracle_Home/apache/jserv/conf
Jserv.conf                                 Oracle_Home/apache/jserv/conf
zone.properties                         Oracle_Home/apache/jserv/servlets
default.env                               Oracle_Home/806/forms60/server
httpd.conf                                Oracle_Home/apache/apache/conf
formsweb.cfg                           Oracle_Home/806/forms60/server

Step 1: Configure servlet engine CLASSPATH for the Forms Listener Servlet

The CLASSPATH environment setting is configured in the Jserv.properties file using the wrapper.classpath directive. Edit Jserv.properties and add the line:

wrapper.classpath=d:\oracle\806\forms60\java\f60srv.jar

Step 2: Set the FormsServlet initialization parameter configFileName

Usually the servlet configuration file is the formsweb.cfg file in the /forms60/server directory. Edit the Jserv zone.properties file, the following line may exist already, if not add it:

servlet.f60servlet.code=oracle.forms.servlet.FormsServlet

Underneath this line add:
servlet.f60servlet.initArgs=configFileName=d:\orant\forms60\server\formsweb.cfg

Optional:
It is possible to create an alias to the Forms Listener Servlet in the zone.properties e.g

servlet.f60listener.code=oracle.forms.servlet.ListenerServlet

Step 3: Create or edit the environment file (usually named default.env)

Note: The full instructions given here in this step and step 4 will not work unless Forms 6i patchset 8 or higher is applied.

A sample environment settings file - default.env is provided as part of the patchset install (patchset 8 or higher), located in the /forms60/server directory. A different name can be used, but the extension .env should be kept the same. On NT, registry settings are used for environment variables that are not set in the default.env file.
On Unix, this file should also include the PATH and LD_LIBRARY_PATH / SHLIB_PATH (for HP platforms)
Make sure the ORACLE_HOME setting is present and correct, and FORMS60_PATH is set to include the directories containing the forms application runtime modules (fmx, mmx, plls, plx files) For applications using run_product or run_report_object to run Reports or Graphics modules, set the appropriate Reports or Graphics environment variables in the default.env file (or other environment file).

Example default.env file for NT
ORACLE_HOME=d:\oracle\806
PATH=d:\oracle\806\bin
FORM60_PATH=d:\oracle\806\forms60

Step 4: Create or edit required settings in the Forms Servlet configuration file (usually called formsweb.cfg)

To make the configuration easier and clearer to understand / maintain create a config section at the bottom of the formsweb.cfg file e.g

[servlettest]

baseHTML=base.htm
baseHTMLie=baseie.htm
baseHTMLJinitiator=basejini.htm
envFile=default.env
serverURL=/servlet/oracle.forms.servlet.ListenerServlet
;Use/ uncomment this line if an alias has been created in the zone.properties
;serverURL=/servlet/f60listener
form=test.fmx

Useful Notes:

The first four applet parameters give file names. If no paths are given (as in this example), the files are assumed to be in the same directory as the Forms Servlet configuration file (formsweb.cfg).

Prior to patchset 8 the default.env was referenced by adding the following example line to the zone.properties

servlet.f60listener.initArgs=envfile=/my/oracle9iAShome/6iserver/forms60/server/default.env

If patchset 8 or higher is applied it is recommended that such a line is removed, and the formsweb.cfg envFile parameter used instead.

When using the Forms Listener Server, the Forms Java client connects to the Forms Listener using the values provided in the serverHost and serverPort applet parameters. However, when using the Forms Listener Servlet, the serverURL applet parameter must be set. The serverURL parameter specifies the URL to access the Forms Listener Servlet. Specify it as a relative URL i.e relative to the web server from which the HTML page containing the Forms applet tag was loaded.

A typical value is /servlet/oracle.forms.servlet.ListenerServlet.

This value works with a standard 'out of the box' Oracle9iAS Rel 1 Enterprise Edition Installation.  

If serverURL is specified then serverHost and serverPort applet parameters are ignored and the Forms Listener Servlet used instead. The applet parameter connectMode is also ignored. Instead, the connection protocol is determined by the serverURL value (if it is a full URL with the protocol) or by the protocol used to access the page, (http:// or https://).

Step 5: Determine whether to run JServ in Auto-Start mode

Depending on the number of concurrent users that you expect, decide whether to start JServ automatically or manually:
If the number of concurrent users will be less than 100, run JServ in Auto-Start mode. If the number of concurrent users will be more than 100 or if the JServ process(es) will run on a machine separate from the Apache web listener, the Oracle 9iAS administrator must explicitly start the JServ engine or engines. (There is a "Load Balancing JServ" section in the white paper which gives details regards how to set up and start JServ in manual mode.)

To run JServ in Auto-Start mode:
In the jserv.conf file (which is included into httpd.conf or httpds.conf), check that the following parameter is set to ?off?:

ApJServManual off

Note: The ApJServManual parameter is set to "off" by default. When set to "off", JServ runs in automatic mode, that is, a single JServ process is used and is automatically started and stopped by the Apache Web Listener.

Step 6: Use the Forms Servlet to start the application

The configuration steps described above allow you to run Forms applications using the FormsServlet by going to a URL such as the following:

http://myHost.myDomain/servlet/f60servlet?config=servlettest 


I have not installed Oracle 9iAS, I am only a programmer.

Henka
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:learning_oracle
ID: 9841441
Thankyou again for your assistance towards this matter Henka :) Greatly appreciate it :)
0
 

Author Comment

by:learning_oracle
ID: 9841443
Thankyou again for your assistance towards this matter Henka :) Greatly appreciate it :)
0
 

Author Comment

by:learning_oracle
ID: 9841448
lol it posted twice :$ my computer froze :'(
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question