Create a login page using when button is pressed trigger

I need to write a code that allows users to enter their name and password and there organisation type. If the organisation type entered is staff they are takeing to the appropriate block if it is courts they are taken to another block. This is what I am stuck on. If anyone could help I would be extremley grateful.
declare
staff_id varchar2(4);
user_password varchar2(8);
org varchar2(10);
alert_button number;
begin
select employee_no,n_password,organisation_type
into staff_id, user_password,org
from organisation
where :login.text_item_user_name=organisation.employee_no and :login.text_item_type= organisation.organisation_type;
if(staff_id =:login.text_item_user_name AND user_password =:login.text_item_password)
then go_block('Driving_Test');
else
else
alert_button := show_alert ('Alert_Incorrect_Login');
if alert_button= alert_button1 then
clear_block;
end if;
end if;
end if;
end;

OK. So does the code work? Are you getting a compilation error? Please be more descriptive. Also, it is helpful if you use the tags round your code so it will be formatted and easier to read. :)  Check out the <a href="http://forums.oracle.com/forums/help.jspa">FAQ </a>link for a list of other useful formatting tags.
Craig...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How do you create a login page using dashcode for the iPhone's mobile safari that will transfer you to the next page?

         Hey I have created a login page in Dashcode for a mobile safari app (aka iphone web app) and I am having trouble since I can not find any useful info about multiple pages. I don't want to use a stack layout view because it is only a login page and I need to check with a database to make sure the user's login info is correct. Right now I have it set up so that it loads another iphone web app project once it validates the info.
         The only problem with this is I am having a good bit of trouble trying to pass values from my php code to javascript or html. For some reason calling the javascript inside the php code makes the actual code inside the app not be called and same with the echo statment for the html.
    So I would like to be able to create the app in this way:
    Login page > PHP > MS SQL > PHP > UNKNOWN (if I can't get the javascript or html to output both) > Secure info on the next page
         I believe It would be a lot easier if I had the option for a multiple page but instead I am having to load up an entirely new dashcode project. If anyone knows a better way please let me know. Or if anyone knows a link to good information on passing values from php to javascript, because I couldn't get any of the code I tried to work, I would really appreciate it.

    Addendum to previous reply:
    OK.  This is weird--but I should be used to that, and just grateful that it seems to work (for now).
    What I had done is FTPd some image files to my site using Filezilla, but when I had tried to access them, I was unsuccessful.  I am almost sure that I used the same url (and variations of it) as you suggested, namely,  http://mysite.verizon.net/username/filename , and it either did not work, or gave me the "Page under construction", or, in some cases asked me for my username and password.
    But, when I did it this time, it worked.  So I probably had something off, but I can now do what I want.
    By the way, if you'll permit another question, while on the site-builder site, it said that there was a "Web Photo Manager", and said that "To download the Web Photo Manager: Open the Site Builder application and go to the All My Sites page. Click on the Web Photo Manager link (listed under Advanced Building Tools )."  I can't find it--would you happen to know where it is?
    In any case, thanks a lot for all your help--it solved my problem. 

  • I m using ms access as database and i want to create a login page in java

    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Login extends JFrame
    //Component Declarations
    JLabel jlb1,jlb2;
         JTextField jtf1;
         JPasswordField jpf1;
         JButton jb1,jb2;
         //Constructor
         Login()
         //frame settings
              setTitle("Login Dialog");
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
              setBounds(d.width/2-175,d.height/2-100,350,200);
              gbc.insets=new Insets(7,7,7,7);
         //adding components
              jlb1=new JLabel("User ID");
              gbc.gridx=0;
              gbc.gridy=0;
              add(jlb1,gbc);
              jlb2=new JLabel("Password");
              gbc.gridx=0;
              gbc.gridy=1;
              add(jlb2,gbc);
              jtf1=new JTextField(10);
              gbc.gridx=1;
              gbc.gridy=0;
              add(jtf1,gbc);
              jpf1=new JPasswordField(10);
              gbc.gridx=1;
              gbc.gridy=1;
              add(jpf1,gbc);
              jb1=new JButton("Login");
              gbc.gridx=0;
              gbc.gridy=2;
              add(jb1,gbc);
              jb1.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                   Connection conn=null;
                        Statement stmt=null;
                        boolean found=false;
                   try
                             Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
                             String dataSourceName = "Inventory";
                             String dbURL = "jdbc:odbc:" + dataSourceName;
                             conn=DriverManager.getConnection(dbURL, "","");
                             stmt=conn.createStatement();
                             ResultSet rst=stmt.executeQuery("Select * from User");
                             System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
                             while(rst.next())
                                  System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
              if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
                                       found=true;
                                       rst.close();
                                       dispose();
                                       MainWindow mw= new MainWindow();     /*created min window object created to be opend after login but not working*/     
                                       break;
                             rst.close();
                             stmt.close();
                             conn.close();                    
                        catch(ClassNotFoundException e){System.out.print(e);}
                        catch(Exception e){System.out.print(e);}
                        if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
                             JOptionPane.showMessageDialog(null,"Invalid username or password",
                                  "Error Message",JOptionPane.ERROR_MESSAGE);
              jb2=new JButton("Clear");
              gbc.gridx=1;
              gbc.gridy=2;
              add(jb2,gbc);
              jb2.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        jtf1.setText("");
                        jpf1.setText("");
                        jtf1.requestFocus();
              setSize(350,200);
              setVisible(true);
              jtf1.requestFocus();
         public static void main(String args[])
    Login l=new Login();
    }

    http://forums.oracle.com/forums/ann.jspa?annID=599
    Oh, and by the way, your keyboard seems to be broken as your words are not getting spelled correctly.

  • Plz help using ms access as database,i want to create a login page in java

    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Login extends JFrame
    //Component Declarations
    JLabel jlb1,jlb2;
         JTextField jtf1;
         JPasswordField jpf1;
         JButton jb1,jb2;
         //Constructor
         Login()
         //frame settings
              setTitle("Login Dialog");
              setLayout(new GridBagLayout());
              GridBagConstraints gbc = new GridBagConstraints();
              setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
              setBounds(d.width/2-175,d.height/2-100,350,200);
              gbc.insets=new Insets(7,7,7,7);
         //adding components
              jlb1=new JLabel("User ID");
              gbc.gridx=0;
              gbc.gridy=0;
              add(jlb1,gbc);
              jlb2=new JLabel("Password");
              gbc.gridx=0;
              gbc.gridy=1;
              add(jlb2,gbc);
              jtf1=new JTextField(10);
              gbc.gridx=1;
              gbc.gridy=0;
              add(jtf1,gbc);
              jpf1=new JPasswordField(10);
              gbc.gridx=1;
              gbc.gridy=1;
              add(jpf1,gbc);
              jb1=new JButton("Login");
              gbc.gridx=0;
              gbc.gridy=2;
              add(jb1,gbc);
              jb1.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                   Connection conn=null;
                        Statement stmt=null;
                        boolean found=false;
                   try
                             Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
                             String dataSourceName = "Inventory";
                             String dbURL = "jdbc:odbc:" + dataSourceName;
                             conn=DriverManager.getConnection(dbURL, "","");
                             stmt=conn.createStatement();
                             ResultSet rst=stmt.executeQuery("Select * from User");
                             System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
                             while(rst.next())
                                  System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
              if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
                                       found=true;
                                       rst.close();
                                       dispose();
                                       MainWindow mw= new MainWindow();     /*created min window object created to be opend after login but not working*/     
                                       break;
                             rst.close();
                             stmt.close();
                             conn.close();                    
                        catch(ClassNotFoundException e){System.out.print(e);}
                        catch(Exception e){System.out.print(e);}
                        if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
                             JOptionPane.showMessageDialog(null,"Invalid username or password",
                                  "Error Message",JOptionPane.ERROR_MESSAGE);
              jb2=new JButton("Clear");
              gbc.gridx=1;
              gbc.gridy=2;
              add(jb2,gbc);
              jb2.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        jtf1.setText("");
                        jpf1.setText("");
                        jtf1.requestFocus();
              setSize(350,200);
              setVisible(true);
              jtf1.requestFocus();
         public static void main(String args[])
    Login l=new Login();
    Edited by: 795772 on Sep 19, 2010 4:44 AM

    795772 wrote:
    hye frnz... plz help me m new to java
    m using ms access as database and try to create a login page where user type username and pw
    i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
    now there is an error class not found exception sun:jdbc...... error
    plz help me i had stuck frm 4 days */
    <snip>The subject of this forum is Oracle databases. How does your problem relate to that subject?
    Two bits of advice:
    1) Make sure you ask questions in a forum related to your problem.
    2) If you want to be taken seriously as a professional, drop the MS IM Speak and use the language of the forum. In this forum it is English, which is successfully used by many people for whom English is far from their native language.

  • How to create login page using OAF

    Hi,
    I am using Jdeveloper 11.1.1.6.0
    Plese give me Sample Code creating the log in page .
    Thanks
    Ram

    Hi,
    here i am using the webcenter application using the adf faces need secured login page using the OAM.
    Thanks
    Ram

  • Create login page using jsp, servlet  & Oracle

    hi,
    i need the sample application for creating login page using jsp, servlet & Oracle,can you please post one sample application.
    thanks
    sona

    See
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adfstrutsj2eesec.pdf
    Frank

  • Create a login page that does not link to database

    Hi,
    I am really new to muse and would like to seek some help....sorry if any similar questions have been asked.
    I am making a website interface for my assignment, and i need to create a login page,
    how can i make a text box for entering the login ID and the password? and how can i add a login button?
    By the way, this does not have to link to a database, it is just  a template........so the solution using codes may not help i guess

    Hi,
    check this thread Re: Can I create a login/password protection in Muse for a HTML5 page or two?

  • Running into Exception while Creating new Login Page for Security

    Hi,
    I am following ADF Developers Guide to create a new login page ,so that whenever a page is run , first it redirects to Login page first and on Button click it
    goes to the Original page which was run.
    This is my Login bean code for doLogin()
    public String doLogin(){
    String un = _username;
    byte[] pw = _password.getBytes();
    FacesContext ctx = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest)ctx.getExternalContext().getRequest();
    try {
    CallbackHandler handler = new URLCallbackHandler(un, pw);
    Subject mySubj = weblogic.security.services.Authentication.login(handler);
    weblogic.servlet.security.ServletAuthentication.runAs(mySubj, request);
    ServletAuthentication.generateNewSessionID(request);
    //String loginUrl = "/adfAuthentication?success_url=/faces/viewactivityname";
    //sendForward(loginUrl);
    } catch (FailedLoginException fle) {
    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,"Incorrect Username or Password","An incorrect Username or Password" +" was specified");
    ctx.addMessage(null, msg);
    setPassword(null);
    } catch (LoginException le) {
    reportUnexpectedLoginError("LoginException", le);
    return null;
    Now the Dev guide says that :: "Specifically, without specifying a view activity as the
    redirect target, command components, such as the commandButton
    component, will always return to the original page after login."
    Hence I have commented out the code for the call to sendForward().
    As soon as I press the button I am running into an error :: "javax.faces.el.EvaluationException: java.lang.NullPointerException"
    ]] Root cause of ServletException.
    javax.faces.el.EvaluationException: java.lang.NullPointerException
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.NullPointerException
         at oracle.sample.view.LoginBean.doLogin(LoginBean.java:60)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    These are the steps which I followed ::
    a) Created Managed bean class and registered it to adfc.config.xml
    b) Created a Custom Login Page say Login.jspx and created a DataBound Page say EmpDetails.jspx
    c) Made sure that My Login page is custom Login Page
    d) Command Button has the Action Property set to LoginBean.doLogin
    e) Configured security and has only one user, no roles and assigned the user to access the page
    e) When I run EmpDetails.jspx , I am redirected to Login page as expected but as soon as I press
    Login "CommandButton" it throws this error.
    Any pointers.
    Regards,
    Nikhil Misra

    Hi Puthanampatti,
    In that ase what would be my sendForward() mthod look like.
    Currently as per the Dev guide it is :
    private void sendForward(String forwardUrl) {
    FacesContext ctx = FacesContext.getCurrentInstance();
    try {
    ctx.getExternalContext().redirect(forwardUrl);
    } catch (IOException ie) {
    reportUnexpectedLoginError("IOException", ie);
    ctx.responseComplete();
    I understand tat there would be change in parameters like sendForward(HttpServletRequest request,HttpServletResponse response,String forwardUrl),
    but how would the other parameters work.
    Regards,
    Nikhil Misra

  • How to: create a Login page with data tags

    hi, how could i create a jsp login page using the data tags.. and how to associate it with the other jsp pages that should be displayed in case of the correct insertion of the password .

    http://technet.oracle.com:89/ubb/Forum2/HTML/006025.html

  • Need to create a login page to my Adobe Muse site - how do I do that?

    Hi all,
    I need to create a login page on my Adobe Muse site, as I need to post information that only authorized personnel have acces to. Is that possible. I use Business Catalyst to host my site.
    Thanks,

    Hi Michael,
    The Business Catalyst site should be on web Marketing plan.
    You can create the secure zone in Business Catalyst and then place the secure zone login form code from Business Catalyst to the page in Muse.
    Business Catalyst Help | Add a secure area to your site
    Regards,
    Gaurav Aggarwal

  • Creating a login page in php for login to certain pages in the website

    I need to create a login page where I would assign user a password and when they input the password it would take them to pages only accesabile by that password. Can someone lead me to some good articles on how to do this? Everyting I have found so far doesn't seem to make sense or the coding doesn't work right when I input it into my html and php pages.
    Thank you.

    The simplest method is to add .htaccess and .htpasswd text files to the protected folder of your site.
    http://www.javascriptkit.com/howto/htaccess3.shtml
    http://www.panix.com/web/faq/htaccess.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Plz help! How to create a login page

    Hi!
    is there anyone who knows to create a login page from java

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>login1.html</title>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <SCRIPT LANGUAGE="JavaScript">
    function validate(){
    if(document.form1.text1.value.length<1){
    alert("Please enter UserName");
    return false;
    if (document.form1.pwdtext.value.length<3){
    alert("please enter the Password");
    return false;
    return true;
    </SCRIPT>
    </head>
    <body>  <br>
    <form method="get" name="form1" style="" action="./logdb1" enctype ="text/plain" onSubmit = "return validate(this);">
    <p> </p><p> UserName:    <input type="text" maxlength="20" name="text1"></p><p> Password:      <input type="password" maxlength="20" name="pwdtext"></p><p>            <input type="submit" value="Login" name="loginbutton">    <input type="reset" value="Cancel" name="cancelbutton"></p><p> ForgotPassword?     SignUp</p>
    </form>
    </body>
    </html>

  • Create a login page with NI Security Programmatic Login.vi

    Hi everyone,
    I'm trying to create a login page that inputs username and password of users, then authorize user information with the Domain Account Manager to recognize user identification.
    I google and see the NI Security Programmatic Login.vi can allow me to create a login page and it works. However, I got a problem is to redirect to other pages after authorizing. 
    NI Security Programmatic Login.vi only outputs some string to show the status of the authentication, it doesnt output boolean like true or fall.
    Does anyone has a solution to help me?
    Thank you.
    This is my screen shot:

    Thank you for suggesting me. I've done the checking task but I don't know how to call a subVi.
    As you can see in the images I post below, I have a login page with its diagram, and the main page that I want to show after logging in conrrectly.
    So should the main page is the subVi or the login page? And can you tell me how to show the main page after logging correctly?
    I also don't know how to refresh the page if logging information is incorrect. Do you have any solution?
    Thank you so much.

  • Does anyone here knows how to create a login page thru JDBC?

    Anyone here knows how to create a login page which connect to database thru JDBC but not JDBC-ODBC bridge?

    Hi..pls you'll do people here a great good if you could explain yourself better..!
    Anyway if you are trying to connect to an Oracle Database you dont need the jdbc-odbc bridge as oracle provides a special driver for java applets/applications that is "the thin driver" and the "oci driver"..so if you are connecting to Oracle your connection will look like this:
    Class.forName("oracle.jdbc.driver.OracleDriver"); //not sun.jdbc.odbc.JdbcOdbcDriver
    Connection con = DriverManager.getConnection ("blah blah, blah");
    no need for the jdbc-odbc bridge.
    I hope i've answered your question.
    Thanks.

  • What's the best way to create a login page in muse?

    Hi.
    Busy exploring muse I came across another problem:
    What’s the best way to create a login page in muse?
    I want to create 1 page on a site with access for people with login details only.
    Sorry for beeing a newbie
    Dutch greets
    Toin Corten

    Hi Toin,
    Never need to apologize for being a newbie...we all were at one point or another. 
    I am going to move this question to the main Muse forum where you'll have a much better chance of getting a response.  This particular forum is for questions around our Muse getting started project.
    You may also want to check this thread out: http://forums.adobe.com/thread/1004543.
    Thank you,
    Ed Sullivan

Maybe you are looking for

  • How to see a null or empty value in JFormattedTextField

    Hello, I am having a problem. I'm trying to use a JFormattedTextField, and I keep getting errors. I know what is causing the error, but I don't know how to fix it. Here is my code: String cf = countFTX.getText(); if(cf.equals(" ")) {   i = Integer.va

  • Photoshop CC window is solid black on 2nd monitor

    What version of Photoshop? Photoshop CC 14.0 x64 Have you installed the recent updates? Yes What operating system? Mac OS X 10.8.4 What kind(s) of image file(s)? Affecting PSDs and JPGs. Not PNGs, those are working If you are getting error message(s)

  • URGENT! Need help with scrolling on a JPanel!

    Hello Guys! I guess there has been many postings about this subject in the forum, but the postings I found there.... still couldn't solve my problem... So, straight to the problem: I am drawing some primitive graphic on a JPanel. This JPanel is then

  • Cash Flow & Funds Flow Statement

    Hi Can we create the Cash Flow & Funds Flow Statement in SAP as per Schedule 6 of Comapnies Act? Regards Shelia

  • The IRM Issue of PDF File

           Hi,now there is a demand in my project,we know that we can encrypt a pdf file,set the permissions that whether the users can copy/print from pdf-files,             now we want to set a timespan of these permissions, for example: before Dec 31,