Creating a Login

I'm having abit of trouble creating a login can someone rune this code and see if it works
JAVA DAO
package SportsUserwebsite;
import java.io.*;
import java.sql.*;
import javax.naming.*;
import javax.sql.*;
import java.util.*;
public class SporticusUsersDAO
     private Connection con;
     private ResultSet loginSportsReset;
     private ResultSet checkSportsUserReset;
     private PreparedStatement insertSportsUser;
     private PreparedStatement loginSportsUser;
     private String Sportsusername;     
     private String FullName;          
     private String Address;     
     private String city;                         
     private String country;          
     private String emailaddress;          
     private String userpassword;
     private boolean UserLoginValid;
     public SporticusUsersDAO() throws SQLException, NamingException
Context init = new InitialContext();
     Context ctx = (Context) init.lookup("java:comp/env");
     DataSource ds = (DataSource) ctx.lookup("jdbc/myDatabase");
     con = ds.getConnection();
     System.out.println("DB Connected");
     insertSportsUser = con.prepareStatement("INSERT into SPORTSUSERS values(SportsuserID_seq.nextval,?,?,?,?,?,?,?,?,?,?,?,'','','','','1')");
     loginSportsUser = con.prepareStatement("SELECT Sportsusername,userpassword FROM SPORTSUSERS");
//set methods
     public void setSportsUsername(String SportsUsernameS)
          Sportsusername = SportsUsernameS;
     public void setFullName(String FullNameS)
     FullName = FullNameS;
     public void setAddress(String AddressS)
     Address = AddressS;
     public void setcity(String cityS)
     {city=cityS;
     public void setcountry(String countryS)
     { country = countryS;
     public void setemailaddress(String emailaddressS)
     emailaddress = emailaddressS;
     public void setuserpassword(String userpasswordS)
     userpassword = userpasswordS;
     //get methods
     public String getSportsUsername()
          return Sportsusername;
     public String getFullName()
          return FullName;
     public String getAddress()
          return Address;
     public String getcity()
          return city;
     public String getcountry()
          return country;
     public String getemailaddress()
          return emailaddress;
     public String getuserpassword()
          return userpassword;
     public boolean getUserLoginValid()
          return UserLoginValid;
     private boolean SportsUserNotFound = false;
     public boolean getSportsUserNotFound()
     return SportsUserNotFound;
     public void SportsUserLogin()
          String usernameLogin;
          String passwordLogin;
          System.out.println(getSportsUsername());
          System.out.println(getuserpassword());
          System.out.println(getUserLoginValid());
          try
               Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
               loginSportsReset=stmt.executeQuery("SELECT Sportsusername,userpassword FROM SPORTSUSERS WHERE Sportsusername='"+getSportsUsername()+"'");
               while(loginSportsReset.next())
                    usernameLogin=loginSportsReset.getString(1);
                    passwordLogin=loginSportsReset.getString(2);
                    if(usernameLogin.equals(getSportsUsername())&&passwordLogin.equals(getuserpassword()))
                         System.out.println("The user is now logged in");
                         UserLoginValid=true;
                    else if(!usernameLogin.equals(getSportsUsername())||!passwordLogin.equals(getuserpassword()))
                         System.out.println("The user is not logged in, please try again");
                         UserLoginValid=false;
          catch (SQLException e)
               System.out.print("Unfortunately an error has occurred");
               e.printStackTrace();
          finally
               try{loginSportsReset.close(); }
               catch(Exception ex) {}
          System.out.println("Connection to DataBase closed");
     private boolean RegisterSuccess;
     public boolean getRegisterSuccess() { return RegisterSuccess;}
     public void RegisterToSite()
          String usernameRegister;
          try
               Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
               checkSportsUserReset = stmt.executeQuery("SELECT Sportsusername FROM SPORTSUSERS WHERE Sportsusername='"+getSportsUsername()+"'");
                    if(checkSportsUserReset.next())
                    usernameRegister = checkSportsUserReset.getString(1);
                    if(usernameRegister.equals(getSportsUsername()))
                         System.out.println("Username already taken");
                         RegisterSuccess = false;
                    else
                    try
                         insertSportsUser.setString(1,getSportsUsername());
                         insertSportsUser.setString(2,getFullName());
                         insertSportsUser.setString(3,getAddress());
                         insertSportsUser.setString(4,getcity());
                         insertSportsUser.setString(5,getcountry());
                         insertSportsUser.setString(6,getemailaddress());
                         insertSportsUser.setString(7,getuserpassword());
                         insertSportsUser.executeUpdate();
                         RegisterSuccess=true;
                         System.out.println("User has been successfully added to the Database for the site\n");               
                    catch (SQLException e)
                         System.out.print("Unfortunately an an error has occurred");
                         RegisterSuccess = false;
                         e.printStackTrace();
          catch (SQLException e)
               System.out.print("Unfortunately an an error has occurred");
               e.printStackTrace();
JSPcode
<jsp:useBean id="myForm" class="SportsUserwebsite.SporticusUsersDAO" scope="session" />
<jsp:setProperty name="myForm" property="*"/>
<%
myForm.SportsUserLogin();
if(myForm.getUserLoginValid() == true)
%>
<jsp:forward page="Home.htm" />
<%
else if(myForm.getUserLoginValid() == false)
%>
<jsp:forward page="login.htm" />
<%
else if(myForm.getSportsUserNotFound() == true)
%>
<jsp:forward page="login.htm" />
<%
%>
Database Tables
CREATE TABLE SPORTSUSERS
     SportsuserID          NUMBER          NOT NULL,
     SportsUsername     VARCHAR2(20)          NOT NULL,
     FullName          VARCHAR2(20)     NOT NULL,
     Address      VARCHAR2(20)     NOT NULL,
     city          VARCHAR2(15)     NOT NULL,
     country          VARCHAR2(20)     NOT NULL,
     emailaddress          VARCHAR2(100)     NOT NULL,
     userpassword     VARCHAR2(15)     NOT NULL,
     creditCardNo     VARCHAR2(16),
     creditCardType     VARCHAR2(10)
);

Hello, I can get you 2/3's the way there. Open System Preferences>Accounts then make sure your account is highlighted. Then, above your pic, click on "login Items".
These are the items that will automatically start when you boot. To add Safari and Messenger, click on the "+" in the lower left. Navigate to the Applications folder and choose the apps.
I will have to look at opening two tabs but that will get you started.
Cheers,
Glynn

Similar Messages

  • Is there a way to create user logins or some other way to ...

    Is there a way to create user logins or some other grouping for a set of applications to use (memory) resources optimally -- for example only mail and Safari and Word in one grouping and another for Safari and an audio recording application, etc.?

    It is possible to use Parenal Controls to limit which applications can be used be a particular user account.
    But it's not really necessary as far as managing memory.
    Matt

  • How do I create a Login in feature for a site created with MUSE

    I am working on a web site and the client needs a Login feature. How can this be achieved with MUSE?

    Hi,
    please take a look to this thread Can I create a login/password protection in Muse for a HTML5 page or two?

  • 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.

  • Need help to create a login for maintenance of a single database in a multiple databases, single instance environment

    Hi,
    We are in the process of consolidating several databases on a single instance of SQL Server 2012.
    Databases are developed by outside vendors; they have to be able to install and support their databases but they shouldn't be able to do any thing with the other databases.
    When I tried to migrate the first database, the vendor told me that on the former server he used the sa account in some batch.
    On a previous thread
    https://social.technet.microsoft.com/Forums/sqlserver/en-US/dc1f802f-d8de-4e2b-87e5-ccb289593fb7/security-for-multiple-applications-on-a-single-sql-server-2012-instance?forum=sqlsecurity
    it was suggested to me that I create a login for each vendor and that this login should map a user in their respective databases.
    To test, I simulated the process in a test database:
    1 - I create the login and I scripted the command:
    USE [master]
    GO
    /* For security reasons the login is created disabled and with a random password. */
    /****** Object:  Login [M02_Test]    Script Date: 2014-12-02 16:23:58 ******/
    CREATE LOGIN [M02_Test] WITH PASSWORD=N'ÈS^y¡¶=Å€"+y¤j|úªhÖféÎЕœEu
    c', DEFAULT_DATABASE=[M02], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
    GO
    ALTER LOGIN [M02_Test] DISABLE
    GO
    2 - I create the user and scripted it
    USE [M02]
    GO
    /****** Object:  User [M02_Test]    Script Date: 2014-12-02 16:29:41 ******/
    CREATE USER [M02_Test] FOR LOGIN [M02_Test] WITH DEFAULT_SCHEMA=[dbo]
    GO
    Questions:
    What should we do with te scrambled password: is it saved as it was entered and should it be kept somewhere in a safe place?
    Would that do the job for the vendor who used sa before?
    Thanks for your advice

    I'm not sure why you would save the script. Why not create the login, in one way or another give the vendor the password. Keep the login disabled until needed.
    I don't recall exactly what we said last time, but it occurs to me that the application setup things on server level. Jobs is the prime thing that comes to mind, but there could be other things.
    Now, here is an important observation. As long as the vendor's application was alone on the server, that was OK, and it was OK to give the vendor sysadmin rights. In this situation this is less OK, and as we said, you should only give the vendor db_owner
    in the database.
    But the vendor will need to tell you what they do on server-level. They should know this - unless they sell their app as a "alone-on-a-server application". (And there are indeed such applications out there, even from Microsoft.) But there is a
    risk that they will bill you extra if you make their installation more difficult.
    Maybe you will have to give some vendors sysadmin for the installation, but in such case, you should ask them why they need it. If they don't, give them db_owner, and they will have to find out their hard way. (And you don't pay them for learning
    their own application.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Is it possible to add/create a login prompt for my website through iWeb?

    So I was tasked to create a "info" site for my family.  In an effort to keep it private from everyone except my family members I would like to create a login so that only family members can log in and view site.  Is it possible to do this through iWeb?  If so could someone help explain to me how this can be done?
    Thanks

    Its not so difficult. I host with Host Excellence and it only takes a few minutes to set up password protection using the WebShell wizard.
    Once you have done this, you can easily add and/or delete authorized users, change the password etc.
    If you use .htaccess, there are online generators to help you set it up. The main thing to remember about these files is that they are normally hidden so you need to turn on "show hidden files" in your hosting account file manager.

  • How to create a login interface in labview PDA module?

    How to create a login interface in labview PDA module? So that it checks with a list of usernames and passwords and allow to go to another VI?
    Anu

    Anu,
    I've attached a really short example that does something like what you're talking about.  It just compares the user's username and password a pre-determined username and password and then "logs the user in" based on that comparison.  Like Greycat said, you probably want to store this username and password info in some sort of file on the PDA that's in an encrypted format for both security and flexibility of your application.
    I hope this helps,
    Justin D.
    Applications Engineer
    National Instruments
    Attachments:
    LoginVI.vi ‏17 KB

  • 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. 

  • 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?

  • 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.

  • 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 screen.

    I saw another post by some-one trying to create a login screen. I used the example that someone responded with and managed to get it working.
    However I then tried to edit it to connect to a database and then got a Tomcat error saying "The value for the useBean class attribute Website.Login is invalid."
    Can anyone see anything wrong with this code?
       <html>
                 <body>
                           <form    method=post    action=do-log.jsp>
                             <input   type=text      name='text1'>
                                     <input   type=text      name='text2'>
                              <input   type=submit>
                            </form>
                     </body>
                     </html>
                     <html>
    <%@ page import="java.util.Date"%>
    <%@ page import="java.net.*"%>
    <jsp:useBean id="myForm" class="Website.Login" scope="session" />
    <jsp:setProperty name="myForm" property="*"/>
    <%
    myForm.MakeConnection();
    myForm.login();
    String name = myForm.getUser();
    System.out.println("\nusername from String: "+name);
    System.out.println("\nusername from database: "+myForm.getUser());
    System.out.println("\nresult of boolean: "+myForm.getbool());
    if(myForm.getbool() == true && myForm.getpreferences().equals("Golf"))
    %>
    <jsp:forward page = "Golf.jsp"/>
    <%
    else if(myForm.getbool() == true && myForm.getpreferences().equals("Rugby"))
    %>
    <jsp:forward page= "Rugby.jsp"/>
    <%
    else if(myForm.getbool() == true && myForm.getpreferences().equals("Soccer"))
    %>
    <jsp:forward page= "Soccer.jsp"/>
    <%
    else
    System.out.println("failure");
    %>
    <jsp:forward page = "Login.html"/>
    <%
    %>
    package Website;
    import java.io.*;
    import java.sql.*;
    import java.text.*;
    public class Login
         Connection db;     
           Statement  st;     
           private ResultSet rsetlogin;
        String user;
        String pass;
        public void setUser(String user) {
            this.user = user;
        public String getUser() {
            return this.user;
        public void setPass(String pass) {
            this.pass = pass;
        public String getPass() {
            return this.pass;
        public Login(String args[]) throws ClassNotFoundException, FileNotFoundException, IOException, SQLException
           MakeConnection();
            System.out.println("Now closing the connection");
        st.close();
        db.close();
        public void MakeConnection()throws ClassNotFoundException, FileNotFoundException, IOException, SQLException
            String url = "jdbc:postgresql:database";
        String usr = "postgres";
        String pwd = "dune";
        // Load the driver
        Class.forName("org.postgresql.Driver");
        // Connect to database
        System.out.println("Connecting to Database URL = " + url);
        db = DriverManager.getConnection(url, usr, pwd);
        System.out.println("Connected...Now creating a statement");
        st = db.createStatement();
         public void userLogin(String user, String pass) {
        this.user = user;
        this.pass = pass;
         boolean validpass = false;
    //method to log in.
        public boolean getbool(){return validpass;}
         public void login()
              String usernameIn;
              String passwordIn;
              try
                   Statement stmt = db.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   rsetlogin = stmt.executeQuery("SELECT Username,Cust_Password, Prefered_Sport  FROM Customer WHERE Username ='"+getUser()+"'");
                   while(rsetlogin.next())
                        usernameIn = rsetlogin.getString(1);
                        passwordIn = rsetlogin.getString(2);
                        if(usernameIn.equals(getUser()) && passwordIn.equals(getPass()))
                             validpass = true;
                             System.out.println("log in success");
                             setUser(rsetlogin.getString(1));
                             setPass(rsetlogin.getString(2))     ;
                        else if(!usernameIn.equals(getUser()) || !passwordIn.equals(getPass()))
                             System.out.println("log in failure");
                             validpass = false;
              catch (SQLException e)
                   System.out.print("Error at login");
                   e.printStackTrace();
         public static void main(String args[])
        System.out.println("PostgreSQL basic test v6.3 rev 1\n");
    }

    Ok thanks for all your help. It's abit too selfish to ask you are help again (I'm using a different screen-name as I had difficulty logging back in).
    But if anyone else has any suggestion please feel free to share. Basically the login is failing and is promting the user to the index.htm file even though I entered the right password.
       <html>
                 <body>
                           <form    method=post    action=do-log.jsp>
                             <input   type=text      name='Username'>
                                     <input   type=text      name='Cust_Password'>
                                     <input   type=text      name='PreferedSport'>
                              <input   type=submit>
                            </form>
                     </body>
                     </html>
                     <html>
    <%@ page import="java.util.Date"%>
    <%@ page import="java.net.*"%>
    <jsp:useBean id="myForm" class="Website.Login" scope="session" />
    <jsp:setProperty name="myForm" property="*"/>
    <%
    myForm.MakeConnection();
    myForm.getUsername();
    myForm.getCust_Password();
    myForm.getPrefered_Sport();
    if(myForm.getbool() == true && myForm.getPrefered_Sport().equals("swimming"))
    %>
    <jsp:forward page = "swimming.jsp"/>
    <%
    else if(myForm.getbool() == true && myForm.getPrefered_Sport().equals("Tennis"))
    %>
    <jsp:forward page= "Tennis.jsp"/>
    <%
    else if(myForm.getbool() == true && myForm.getPrefered_Sport().equals("Soccer"))
    %>
    <jsp:forward page= "Soccer.jsp"/>
    <%
    else
    System.out.println("failure");
    %>
    <jsp:forward page = "index.htm"/>
    <%
    myForm.close();
    %>
    package Website;
    import java.io.*;
    import java.sql.*;
    import java.text.*;
    public class Login
         Connection db;     
           Statement  st;     
           private ResultSet rsetlogin;
        String Username;
        String Cust_Password;
        String Prefered_Sport;
        public void setUser(String Username) {
            this.Username = Username;
        public String getUsername() {
            return this.Username;
        public void setCust_Password(String Cust_Password) {
            this.Cust_Password = Cust_Password;
        public String getCust_Password() {
            return this.Cust_Password;
        public void setPrefered_Sport(String Prefered_Sport)
             this.Prefered_Sport=Prefered_Sport;
        public String getPrefered_Sport()
             return this.Prefered_Sport;
        public Login() throws ClassNotFoundException, FileNotFoundException, IOException, SQLException
        public void MakeConnection()throws ClassNotFoundException, FileNotFoundException, IOException, SQLException
            String url = "jdbc:postgresql:database";
        String usr = "postgres";
        String pwd = "dune";
        // Load the driver
        Class.forName("org.postgresql.Driver");
        // Connect to database
        System.out.println("Connecting to Database URL = " + url);
        db = DriverManager.getConnection(url, usr, pwd);
        System.out.println("Connected...Now creating a statement");
        st = db.createStatement();
         boolean validpass = false;
    //method to log in.
        public boolean getbool(){return validpass;}
         public void login()
              String usernameIn;
              String passwordIn;
              try
                   Statement stmt = db.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   rsetlogin = stmt.executeQuery("SELECT Username,Cust_Password,  FROM Customer WHERE Username ='"+getUsername()+"'");
                   while(rsetlogin.next())
                        usernameIn = rsetlogin.getString(1);
                        passwordIn = rsetlogin.getString(2);
                        if(usernameIn.equals(getUsername()) && passwordIn.equals(getCust_Password()))
                             validpass = true;
                             System.out.println("log in success");
                             setUser(rsetlogin.getString(1));
                             setCust_Password(rsetlogin.getString(2))     ;
                        else if(!usernameIn.equals(getUsername()) || !passwordIn.equals(getCust_Password()))
                             System.out.println("log in failure");
                             validpass = false;
              catch (SQLException e)
                   System.out.print("Error at login");
                   e.printStackTrace();
         public void close()
             try
                  db.close();
             catch (Exception e)
                   System.out.print("error at database close");          
                   e.printStackTrace();
         public static void main(String args[])
        System.out.println("PostgreSQL basic test v6.3 rev 1\n");
    }

  • Can I create a login/password protection in Muse for a HTML5 page or two?

    Hi,
    I'm new to Muse.  Can I create a login/password protection for
    one of my pages in Muse?
    thanks,

    PASSWORD PROTECTING A PAGE WITH A NICE BOX DESIGNED INTO YOUR PAGE
    FINALLY, I'VE FOUND AN ANSWER TO PASSWORDING A PAGE OR SECTION WITH ADOBE MUSE WITH GREAT SIMPLICITY AND ALLOWING YOU TO 'DESIGN' THE PASSWORD BOX INTO YOUR PAGE!!!
    Even better is that you don't HAVE to have username AND password (although you could if you wanted to), so just a simple PASSWORD box and enter button DESIGNED BY YOU WITHIN YOUR PAGE, rather than nasty popups etc.  Importantly, the password itself is NOT within the source code of your page either!!
    The solution is at Jotform.com. I believe you can do this with a FREE ACCOUNT, although it's SUCH a great service for Musers that I paid for a proper account.
    Before you do this, create a page on your site saying "Wrong Password. Please go away" or something to that effect. You'll need it for when they enter the wrong password.
    So, in Jotform, you just create a new form and:
    1. Drag on a password box (it's in the power tools section)
    2. Select it and go to Conditions
    3. Go to Change Thank You URL after submission
    4. Enter: If [name of your password box] field EQUALS TO [enter your password]
    5. In the "Then redirect to" box, enter the URL of your protected page and click save
    6. In the resulting box click "ADD A NEW CONDITION" and do the SAME as stets 3 to 5 but this time say NOT EQUALS TO" with your same password and in the "Then redirect to" box, enter the URL of your WRONG PASSWORD page and click save
    7. Embed the button on your page and you're done!!!
    If you want to mess about with the EXACT alignment of a right aligned button and text box, you can go to Preferences and in the box which allows you to add your own custom CSS, enter the following code and mess about with the values until it's perfect for you:
    .form-buttons-wrapper { padding-top:3px !important; }#id_2 {margin-left: -50px !important;}
    Here's an example, built in Muse: www.hileytv.com/about.html
    I hope this helps my fellow Musers!
    Marcus

Maybe you are looking for

  • ITunes store won't open and iPod won't sync after I updated to 10.5 on Windows 7

    So I recently upgraded iTunes to 10.5 on my Windows 7 running PC and the minute I did that the store would no longer open up.  I get the "accessing" bar and it moves about halfway and then stops and disappears, then leaves my screen with a bunch of b

  • 500 Internal error while accessing any tab

    Hi Friends, cann you suggest on below error. where need to make chages 500   Internal Server Error SAP NetWeaver Application Server 7.00/Java AS 7.00 Failed to process request. Please contact your system administrator. [Hide] Error Summary While proc

  • 0Material problem

    Hi Frieds I have one small query I am using the 0matrial infobject in various cubes. All the cubes are in production.Now i got a requirement to add few attributes to the 0material. Is that possible to change the 0materail attributes in development an

  • 1st child of the node in essbase/BSO application script/command

    Hello Experts I was trying to write controlled aggregation via web-form and was wondering if there is any way i can find 1st child of the node for @ANCESTORS function that i would like to use. e.g. i have product tree node name 100 has 3 children 100

  • Iphoto & illustrator failing to open

    Recently iphoto, illustrator 10 and some webpages will unexpectedly quit before the programmes even opened, the icon bounces and starts to load but then dies without reason. Ive tried disk utlity recover permissions but that did not work. I really ne