Package classes

Examples of classes.User


        String username = request.getParameter("username");
        String password = request.getParameter("password");
        String userType = "Admin";

        /* create new user */
        User user = new User(username, password, userType);

        /* instance of database */
        DAO dao = DAO.getInstance();

        /* all fields must be filled && pass must match */
 
View Full Code Here


         * Users and Company Users
         * Note! At this DB model the unique ID si the username
         */

        //Normal Users
        User user = new User("ion.morozan", "test", "User");
        dao.put(user);

        user = new User("milan", "test", "User");
        dao.put(user);

        user = new User("andreea.sandu", "test", "User");
        dao.put(user);

        //Company Users
        User companyUser = new User("KLM", "test", "Company");
        dao.put(companyUser);

        companyUser = new User("Luthansa", "test", "Company");
        dao.put(companyUser);

        companyUser = new User("AirFrance", "test", "Company");
        dao.put(companyUser);


        //Admin User
        User admin = new User("admin", "admin", "Admin");
        dao.put(admin);


        //User Profile
        Profile profile = new Profile("ion.morozan", "test", "ion", "morozan",
View Full Code Here

        /* get the confirmation number */
        int confirmNumber = 0;
        if (!confNumber.isEmpty()) confirmNumber = Integer.valueOf(confNumber);

        /* create new user */
        User user = new User(username, password, userType);


        /* all fields must be filled && pass must match */
        if (username.isEmpty() || password.isEmpty() || !dao.exists(user.id, username)
                /*extract the pass from the DB and compare with the one that
View Full Code Here

            RequestDispatcher rd = request.getRequestDispatcher("register.jsp");
            rd.forward(request, response);
            /* add the user to the database*/
        } else {
            /*create an user for the login database */
            User user = new User(username, password, "User");

            /*create admin*/
            //User user = new User(username, password, "Admin");

            dao.put(user);
View Full Code Here

            RequestDispatcher rd = request.getRequestDispatcher("register.jsp");
            rd.forward(request, response);
            /* add the user to the database*/
        } else {
            /*create an user for the login database */
            User user = new User(username, password, "Company");
            dao.put(user);

            dao.put(profile);
            request.setAttribute("username", "<font size=\"3\" "
                    + "face=\"arial\"> You are logged as " + username + "</font>");
View Full Code Here

        String username = request.getParameter("username");
        String password = request.getParameter("password");
        String userType = request.getParameter("group");
       
        /* create new user */
        User user = new User(username, password, userType);

        /* instance of database */
        DAO dao = DAO.getInstance();
       
        /* all fields must be filled && pass must match */
 
View Full Code Here

TOP

Related Classes of classes.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.