Results 1 to 2 of 2
  1. #1
    435.mahesh is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default sample rolebased application


    I have an appication developed in struts. I have two interfaces one for student and another for admin. when I login as student I can access pages of Admin if I want to and vice sa versa. I want to stop this example if i log on as student and I cut copy paste a url from admin side i should not be able to view it.

    Is there any way by which i can acheive this in struts.
    plz send me the code


  2. #2
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Hong Kong
    Rep Power


    for every request, you need to check the login
    that means in actions of admin, you need to check the user is student or admin, if is student, return "fail" and redirect to other page

    maybe you can store their role in session
    Last edited by mtyoung; 05-04-2009 at 09:20 AM.

Similar Threads

  1. Sample ListViewer
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-07-2008, 05:41 PM
  2. Struts 2.x sample application .......?
    By prabhurangan in forum Web Frameworks
    Replies: 7
    Last Post: 06-26-2008, 11:50 AM
  3. Sample Spring Application
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-29-2008, 01:41 PM
  4. Sample ANT Script
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-24-2008, 04:22 PM
  5. A Sample spring Application
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 09-26-2007, 09:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts