Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: To call a java class from javascipt and pass a variable to the java servelet too

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default To call a java class from javascipt and pass a variable to the java servelet too

    function login(response, info){
    if (response.authResponse) {
    var accessToken = response.authResponse.accessToken;
    userInfo.innerHTML = '<img src="https://graph.facebook.com/' + info.id + '/picture">' + info.name
    + "<br /> Your Access Token: " + accessToken;
    button.innerHTML = 'Logout';
    showLoader(false);
    }
    }

    I have to pass the access token to a java servlet or java class how to do it
    (UserService.java)


  2. #2
    Member
    Join Date
    Dec 2011
    Posts
    50
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: To call a java class from javascipt and pass a variable to the java servelet too

    To servlet: call a URL of the servlet and pass the parameter either by POST or GET.

Similar Threads

  1. How do I call a class in a main class
    By Leprechaun_hunter in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 26th, 2011, 03:11 AM
  2. Replies: 0
    Last Post: February 12th, 2011, 07:44 PM
  3. how to pass a variable from a method to another
    By amr in forum Java Theory & Questions
    Replies: 1
    Last Post: November 20th, 2010, 10:32 PM
  4. Replies: 0
    Last Post: April 17th, 2010, 08:29 AM
  5. problem with data access when a class call another class
    By ea09530 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 4th, 2010, 05:20 PM

Tags for this Thread