Results 1 to 4 of 4

Thread: Login Security

  1. #1
    amitabh is offline Member
    Join Date
    Apr 2010
    Posts
    51
    Rep Power
    0

    Default Login Security

    Hello Every One

    I am developing many website,and all has the same problem on user login part.
    the problem is that if user not logged even and direct copy the admin homepage
    path in address bar the admin home page opens.I want to prompet this by coding.I have tried to check session on admin home page.

    like this

    [ String id=(String)session.getAttribute("id");
    if(id.equals("")||id.equals(null))
    {
    response.rendredirect("login.jsp");
    }

    else
    {
    response.rendredirect("adminhome.jsp");
    }
    ]



    thank you

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,802
    Rep Power
    19

    Default

    And?
    What happens?

    What is the value of id?

  3. #3
    amitabh is offline Member
    Join Date
    Apr 2010
    Posts
    51
    Rep Power
    0

    Default reply

    Sir When User view the admin page without login .then i want to rediret to the login page.

    The overall moto is no one can view admin page without login.

    I set the id in the session.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,802
    Rep Power
    19

    Default

    You didn't answer my last question?
    What is the id when it hits that bit of code you posted?
    That is, what is the value of id when you go directly to the admin page?

Similar Threads

  1. security
    By danghieu in forum New To Java
    Replies: 3
    Last Post: 04-26-2010, 07:24 PM
  2. Security
    By manticohd in forum Reviews / Advertising
    Replies: 1
    Last Post: 02-03-2010, 08:17 AM
  3. Replies: 0
    Last Post: 06-25-2008, 12:41 PM
  4. Replies: 1
    Last Post: 07-23-2007, 11:59 PM
  5. Acegi Security 1.0.4
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-26-2007, 12:16 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
  •