Web - What is easiest way to implement User Security and User Profiles

Hi, I am new to these forums and kind of new to Java. Sorry if this is in the wrong forum!
Bit of background to my experience with java
I have been playing about with java for a number of years and have created a few basic programs such as a screen shot tool that allows you to capture to default locations and look at previews first etc. I am now venturing into web related stuff. I work in IT doing systems testing and have done bits of basic development on various things.
What I've done so far
I am using Netbeans IDE 6.7 and MySQL 5.0
I am trying to learn more complex java and have decided to try build a basic web / database system that basically implements adding / amending / deleting data from a MySQL database through web pages. I am now trying to implement basic user access and profiles. I have so far got the following:
- MySQL table with user info - username / password
- JSP page with usual login stuff
- Servlet that validates the username and password - if correct forwards to main menu page.
Its as simple as that - there is nothing stopping you just typing in the URL of the main menu page and going from there.
What I want
I am wanting to eventually get the following:
- User authentication so that you have to logon before you can access anything else
- User profiles that determine what each user can or can't do, restricting the pages / services / options available (i.e. normal user can't delete etc)
- Would it need some sort of session manager to allow multiple users etc?
I appreciate this is a fairly open question but what is the easiest way to start implementing this? Not after specific code as I would prefer to try figger things out myself, but a point in the right direction would be great. It doesn't have to be extremely secure as this is just for me at the minute.
I have spent all day looking at things like session data / url rewriting / security settings in web.xml / bespoke servlets and am now in java overload!

Hi everyone,
I've now actually gone back to the tutorial that I linked to above and implemented that using form login and j_security_check.
Agree with Saish, and although I don't know enough about the other options to give a good reason, using realms and j_security_check just seems to be a bit cluncky and messy. I would also prefer something a bit more generic, that doesn't rely on setting users in glassfish, hence why I started with my own user table.
Anyway, I will leave it as is for now and maybe come back and try one of the other options.
The only problem I can see now is that to add users i will need to go through all the steps of adding users in glassfish and web.xml... Is there a way to do this through a servlet or something so I can have a jsp page to add users that also creats all the other bits for it to work?
Thanks everyone for your help

Similar Messages

  • What is easiest way to set up a remote network between countries online?

    What is easiest way to set up a remote network between countries online?
    My main Mac is in England, UK and I'm spending time in the USA with my Mac laptop for 3 months. I'm in the USA right now, but neighbour in the UK has keys to my apartment so he can go in there and follow my instructions.
    How can I access my Mac back in England via my Mac laptop in the USA as there are files on my UK computer that I need to transfer back/forth while I'm here in America.
    I know there are things like Log-me-In as in per link below, but I don't think you need things like this on the Mac do you, isn't there an easy way to set something like this up via the Mac's OS?
    https://secure.logmein.com/welcome/access/fasteasy/2/?wt.srch=1&originid=4373&ut pk=log%20me%20in&destination=/welcome/access/fasteasy/2/
    Any advice on the easiest way for me to get this set up finally would be great as I just can't figure out the most straight forward way of doing this.
    Thanks a ton all.

    Is there any chance of being able to set up and use something such as
    the Apple Remote Desktop in these computers? Sure, there is a matter
    of setting up the computer on the far end, including any update to the OS
    and having the Apple Remote Desktop client side ready and able.
    And then having (owning) the ARD software within the computer you have
    there while traveling so as to contact and control the remote computer.
    This should be capable of allowing you to move files between the Macs
    but may be cumbersome without planning ahead; before traveling away.
    • Apple - Remote Desktop - Tutorials - Easy Set Up
    To install or upgrade to Apple Remote Desktop 3 on either admin or client...
    1- http://www.apple.com/remotedesktop/tutorials/easysetup.html
    2- http://www.apple.com/remotedesktop/tutorials/
    • Apple - Support - Remote Desktop
    The Apple Remote Desktop Support page provides new users with plenty of ...
    http://www.apple.com/support/remotedesktop/
    While this is not exactly a network in one sense, it would allow you to see
    and control the other Mac at some distance; depending on IP connection
    bandwidth and other preparation before leaving the home computer. A
    backup power supply and other matters would be recommended so you
    won't have a hung computer or grid issues while at a distance, for example.
    {And this does not sound so easy when away from the remote computer to me.}
    Good luck & happy computing!

  • I have a mid year 2007 24 inch iMac and will be purchasing a new 27 inch Retina iMac, what is the easiest way to transfer the data and files from my old machine to the new one?

    I have a mid year 2007 24 inch iMac and will be purchasing a new 27 inch Retina iMac, what is the easiest way to transfer the data and files from my old machine to the new one?

    Following up on this thread,
    I have a new iMac on the way and my current is from 2008, never had a problem but I am sure there are internal issues that I would prefer not to transfer.
    I have no issues other then the slowness in certain programs and that is the main reason to buy a new one.
    Programs like numbers and pages seem to take a longer time to open after I update to Yosemite.
    I only use 272GB of 500 GB, my memory is 4GB and I am upgrading to 8Gb and bought the 4.0 processor.
    Question:
    Is there a way to manually transfer items or would that be a waste of time in that if there are issues they could be anywhere and would transfer anyway?

  • What's the easiest way of resetting my security question answers?

    What's the easiest way of resetting my security question answers?

    Rescue email address and how to reset Apple ID security questions

  • Does anyone know whats the easiest way to tranfer files from pc to mac

    Does anyone know whats the easiest way to tranfer files from pc to mac

    What kind of files, how many files, total amount of file space? There are many ways to move files from platform to platform, but until you tell us what the nature of the task is we can't give you a proper solution.

  • Time machine only copies User Info and Users (Applications, Library, and System are missing) from my quad core Mac Pro.  45 Gb of 162 Gb are missing.  Any one having success with time machine copying all folders using Mavericks?   What do I need to do dif

    Time machine only copies User Info and Users (Applications, Library, and System are missing) from my quad core Mac Pro.  45 Gb of 162 Gb are missing.  Any one having success with time machine copying all folders using Mavericks?
    What do I need to do differently?

    The late, great Pondini was investigating that issue before he passed away.
    See here: https://discussions.apple.com/thread/5125969
    I think there might be information there on how to reset Time Machine to do a full backup. I think you basically have to reset it and start over.

  • Updating User Status and Status Profile for a Project

    Hi,
          I am creating a Project using  BAPI_BUS2001_CREATE.
          which uses a structure  BAPI_BUS2001_NEW for storing details of a New Project.
          It <b>does not have fields for User Status and Status Profile</b> , if any one of you worked on Project Systems, please tell me is there any way to update these 2 fields.
      I have tried lot of FuncModules and BAPIs which deal with PROJECT CHANGE and PROJECT MODIFY but none of them has these 2 fields.
    Please provide me some solution for this.
    Thanks in Advance.

    Hello,
    U need to do like this:
      PERFORM CHANGE_STATUS_CLSD.
    FORM CHANGE_STATUS_CLSD.
      DATA: LR_PROJ LIKE PROJ,
            WA_JEST LIKE JEST,
            LT_PRPS LIKE PRPS OCCURS 0 WITH HEADER LINE,
            LT_JEST LIKE JEST OCCURS 0 WITH HEADER LINE,
            RA_PRPS TYPE RANGE OF POSID WITH HEADER LINE.
      CLEAR: LR_PROJ.
      SELECT SINGLE * FROM PROJ INTO LR_PROJ WHERE PSPID = SP_PSPID.
      IF SY-SUBRC = 0.
        SELECT * FROM JEST INTO TABLE LT_JEST WHERE OBJNR = LR_PROJ-OBJNR.
        LOOP AT LT_JEST INTO JEST.
          IF JEST-STAT = 'I0001' OR JEST-STAT = 'I0002'.
            JEST-INACT = 'X'.
            UPDATE JEST.
          ELSE.
            JEST-INACT = SPACE.
            UPDATE JEST.
          ENDIF.
        ENDLOOP.
        CLEAR: LT_JEST.
        REFRESH: LT_JEST.
        SELECT * FROM PRPS INTO TABLE LT_PRPS WHERE PSPHI = LR_PROJ-PSPNR.
        IF SY-SUBRC = 0.
          SELECT * FROM JEST INTO TABLE LT_JEST FOR ALL ENTRIES IN LT_PRPS
                                                WHERE OBJNR = LT_PRPS-OBJNR.
          LOOP AT LT_JEST INTO JEST.
            IF JEST-STAT = 'I0001' OR JEST-STAT = 'I0002'.
              JEST-INACT = 'X'.
              UPDATE JEST.
            ELSE.
              JEST-INACT = SPACE.
              UPDATE JEST.
            ENDIF.
          ENDLOOP.
        ENDIF.
        LOOP AT LT_PRPS.
          CLEAR WA_JEST.
          SELECT SINGLE * FROM JEST WHERE OBJNR = LT_PRPS-OBJNR
                                      AND  STAT = 'I0046'.
          IF SY-SUBRC NE 0.
            WA_JEST-MANDT = SY-MANDT.
            WA_JEST-OBJNR = LT_PRPS-OBJNR.
            WA_JEST-STAT = 'I0046'.
            WA_JEST-INACT = ' '.
            WA_JEST-CHGNR = '001'.
            INSERT INTO JEST VALUES WA_JEST.
          ENDIF.
        ENDLOOP.
        COMMIT WORK AND WAIT.
      ENDIF.
    ENDFORM.                    " CHANGE_STATUS_CLSD
    REagrds,
    Vasanth

  • Does the SI_ID for 'User Folders' and 'Users' remains same in CMC?

    Does the SI_ID for 'User Folders' and 'Users' remains same across the environments. For my CMS it is coming as 18 and 19 respectively.
    String siName = "User Folders"; // Users
    IInfoObjects rpts = iStore.query("SELECT SI_ID FROM CI_INFOOBJECTS, CI_SYSTEMOBJECTS WHERE SI_NAME='"+ siName +"'");
    IInfoObject iObj = (IInfoObject)rpts.get(0);
    System.out.println("iObj.getTitle() = " + iObj.getTitle());
    System.out.println("iObj.getID() = " + iObj.getID());
    Any reference text/link for better understanding on this will help a lot.
    Thanks & Regards

    Typically I believe anything that is created by BOE when you install the product stays consistent across multiple environments that were deployed the same.
    You probably should ask in the other [BOE forum|Business Intelligence Solution Architecture;  just to confirm.
    Jason

  • Users Guide and Users Manual for iPod Touch 4?

    Has anyone located the PDFs for the "Users Guide" and "Users Manual" for iPod Touch 4? I can't seem to find them.
    TIA
    Judie

    In addition to the "User's Guide" there has also been a PDF "Features Guide" for each version of the iPod touch. (The one iwell provided a link for is not for the 4th generation iPod touch. (The 'at a glance' sketch shows the on/off button on the left. It's on the right on the 4th generation iPod touch.) It's possible Apple hasn't posted it yet. But I appreciate you both for trying. Thank you.

  • Whats the easiest way to get data from R/3 from XI

    Hi there
    I would like to know if there is a way to to access a database table in the R/3 system in a user defined function in Message Mapping? I have to map some fields where I have to get data from a table. What would be the easiest way?
    Thanks,
    Jan

    This article provides details on the usage of Generic Lookup API used for calling RFC from user defined functions.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    RFC Lookup.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439

  • What are some ways to allow downloads after a user makes payment?

    Hi everyone,
    I want to setup a web site and sell some digital documents on it. After a user makes payment, he/she will be able to download the documents. What are some popular ways to approach this goal? how to connect the payment and download efficiently and securely?
    Thanks
    Hu Lee

    Hi Haritha,
    Go to Tcode SE16, give your ODS active Table name and give width of output list as 1023.
    Now run transaction to see your data and then click Settings --> User parameters and Select ALV Grid Display.
    Now you should see and Excel Icon on top, click on it then select Table , then
    Microsoft Excel and it will open your data with all columns you want.
    I just tried for 213 columns
    Hope this helps.
    Thanks
    CK

  • Whats the easiest way to put a thin line around an image?

    Can anyone tell me the easiest way to put a thin line around
    an image? I'm also interested in the use of thin lines as part of
    the graphic design on a page, how are they generated?
    Thanks

    .oO(cdeatherage)
    >In Dreamweaver, you can set a border for each image but
    be aware that some
    >versions of some browsers may not display it.
    This shouldn't be an issue in any used browser today.
    >If it is a consistent look you're
    >after, I'd say the most permanent thing to do would be to
    edit the image in
    >Photoshop or Fireworks. In Photoshop, e.g, I'd create a
    background fill with
    >the color I wanted the border, then add the image,
    centered, in a new layer on
    >top of that. Merge the layers, then save optimized for
    the web.
    Way too complicated. If you want to change the color or style
    of the
    border, you have to modify the image. With CSS you can
    directly change
    the line style in a much easier and faster way.
    Micha

  • What's the easiest way to move app data and data structures to a server?

    Hi guys,
    I've been developing my app locally with Apex 4.2 and Oracle 11g XE on Windows 7. It's getting close to the time to move the app to an Oracle Apex server. I imagine Export/Import is the way to move the app. But what about the app tables and data (those tables/data like "customer" and "account" created specifically for the app)? I've been using a data modeling tool, so I can run a DDL script to create the data structures on the server. What is the easiest way to move the app data to the server? Is there a way to move both structures and data in one process?
    Thanks,
    Kim

    There's probably another way to get here, but, in SQL Developer, on the tree navigation, expand the objects down to your table, right click, then click EXPORT.. there you will see all the options. This is a tedious process and it sucks IMO, but yeah, it works. It sucks mostly because 1) it's one table at a time, 2) if your data model is robust and has constraints, and sequences and triggers, then you'll have to disable them all for the insert, and hope that you can re-enable constraints, etc without a glitch (good luck, unless you have only a handful of tables)
    I prefer using the oracle command line EXP to export an entire schema, then on the target server I use IMP to import the schema. That way, it's near exact. This makes life messy if you develop more than one application in a single schema, and I've felt that pain -- however -- it's a whole lot easier to drop tables and other objects than it is to create them! (thus, even if the process of EXP/IMP moved more than you wanted to "move".. just blow away what you don't want on the target after the fact..)
    You could use oracle's datapump method too.
    Alternatively, what can be done, IF you have access to both servers from your SQL developer instance (or if you can tnsping them both already from the command line, you can use SQL*PLUS), is run a script that will identify your apex apps' objects (usually by prefix to object names, like EBA_PROJ_%, etc) and do all the manual work for you. I've created a script that does exactly this so that I can move data from dev to prod servers over a dblink. It's tricky because of the order that must be executed to disable constraints and then re-enable them, and of course, trickier if you don't consistently prefix ALL of your "application objects"... (tables, views, triggers, sequences, functions, procs, indexes, etc)

  • Whats the easiest way to transport large files from my old laptop to my new ipad?

    can anyone tell me the easiest way or what app i need to transport file from my old lad top to my new ipad? im really not technical so the easiest way would be appreciated :)

    1. Install Dropbox on computer
    2. Copy all files to Dropbox in computer
    3. Install Dropbox on iPad; all files will be waiting for you there
    Note: you need a fast internet connection

  • Whats the easiest way to transfer pics from my SD car to my mac

    I am upgrading from an LG Revolution droid to an iPhone shortly and would like to know if anybody knows what the quickest easiest way would be to transfer all the pictures on my SD card onto my apple computer. I would love it if they could go directly into iphoto but am not sure if thats an option. Any help would be greatly appreciated

    Just plug it in using the USB cord, find the phone storage on your computer (it will show up as a removable drive), then drag and drop.

Maybe you are looking for

  • How to setup an ssd in a new macbook pro?

    Hi, I have a 2010/11 iMac 27", iPad 2, plus a new iPhone 5 soon. :-) Am waiting for the arrival of a new MBP mid-2012 model with 8GB RAM & std 500GB HDD . I will upgrade the machine to SSD & wanted to check if I have the process/setup for this correc

  • Hotmail issues

    I cannot sync email folders in the application for email. My gmail accounts sync without any issue.

  • Why the SCN do not change?

    I have three databases running for the test of stream replication. Today I alter the data of the N0.1 database. Applied_scn is the identify of data exchange between oracle databases. But I find that it's applied_scn keep the same as before I alter th

  • What is the best program for editing pdf documents and filling in forms

    Whats the best program to use for editing pdf documents and filling in pdf forms?

  • Why is my sleep button not working

    When i try to press the Button on the top of my iphone 4s, i almost have to jam it until it finally connects and turns off my screen... why is it doing this? i havent spilled anything on it...it just randomly stopped responding/working one afternoon.