Results 1 to 6 of 6
  1. #1
    Viv
    Viv is offline Member
    Join Date
    Aug 2014
    Posts
    1
    Rep Power
    0

    Default Determining in a Java program whether the user has visited a website on Inetrnet

    In my project I am required to create a website. The user (the customer) who visits the website will login and get authenticated. On his/her (the user's) machine a java Swing program would also run which is required to determine whether that website has been visited (in a browser) by the user and whether the user has successfully loggedin in that website. If the java Swing program on the user's machine finds on checking that the user has successfully logged in then the control of the program will proceed in a specific direction and if the program finds that the user was not authenticated then the Java program would proceed in a different direction.
    My question is How can I determine in my Java program what I am looking for?

    Thanks you very much.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,041
    Rep Power
    10

    Default Re: Determining in a Java program whether the user has visited a website on Inetrnet

    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    SurfMan's Avatar
    SurfMan is online now Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,094
    Rep Power
    4

    Default Re: Determining in a Java program whether the user has visited a website on Inetrnet

    There is no (easy) way you can check a browsers state and/or history using Swing.

    Why don't you let the Swing client login into the website? Post a username/password to an HTTPS address using Apache HttpComponents, get a xml/json result back with the state (logged out, logged in, wrong password, etc).
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,367
    Rep Power
    6

    Default Re: Determining in a Java program whether the user has visited a website on Inetrnet

    - upon successful authentication, set a flag in a database

    - Swing application periodically invokes a webservice (or possibly just does a HTTP request to a servlet of your website) which checks the state of this flag in the database and if set to true, allows the user in


    For what purpose is this? Security? Java applications running on the client are very easily decompiled so any security code can easily be disabled.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: Determining in a Java program whether the user has visited a website on Inetrnet

    If you don't understand my response, don't ignore it, ask a question.

  6. #6
    Join Date
    Sep 2014
    Posts
    1
    Rep Power
    0

    Default Re: Determining in a Java program whether the user has visited a website on Inetrnet

    use session tracking mechanisms by using session tracking mechanism we can track user based on sessioncode,for more details [Moderator edit: spammy link removed]
    Last edited by DarrylBurke; 09-19-2014 at 05:28 AM.

Similar Threads

  1. Replies: 7
    Last Post: 05-19-2014, 04:57 PM
  2. How to make a Java Console Program save user made changes?
    By Chad.Curtiss in forum New To Java
    Replies: 3
    Last Post: 07-14-2012, 08:58 PM
  3. Replies: 13
    Last Post: 04-16-2010, 03:51 AM
  4. Determining the readiness of another program
    By jmHoekst in forum New To Java
    Replies: 10
    Last Post: 06-19-2008, 09:56 AM
  5. Java program that stores user inputs
    By staticy2003 in forum Advanced Java
    Replies: 6
    Last Post: 01-24-2008, 08:46 PM

Tags for this Thread

Posting Permissions

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