Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3840694
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:33:34+00:00 2026-05-19T15:33:34+00:00

I’m in little trouble with designing GWT application. I am trying to develope RIA

  • 0

I’m in little trouble with designing GWT application. I am trying to develope RIA app (with just one main widget, lets call it Main). First, user must be logged. Here’s my way to do that, but it does have a problem, you’ll see.

  1. Show login components on root panel
  2. If login was successfull (checks database), show Main widget
  3. Widget is added to root panel

Everything works, but when you press Refresh it shows again login components … It all happens in onModuleLoad method.

How should I redesign this logic? I’d like to let user logged (that means RootPanel will hold Main widget) for certain amount of time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:33:34+00:00Added an answer on May 19, 2026 at 3:33 pm

    http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ

    How to remember logins

    Our login
    system so far misses a useful feature:
    For now it requires users to log in
    again every time.

    We can use Cookies to allow the user’s
    web browser to ‘remember’ the login.
    In GWT, to set the cookie (which you’d
    do right after your GWT code receives
    the response as we did in the previous
    code fragment):

    String sessionID = /*(Get sessionID from server's response to your login request.)*/;
    final long DURATION = 1000 * 60 * 60 * 24 * 14; //duration remembering login. 2 weeks in this example.
    Date expires = new Date(System.currentTimeMillis() + DURATION);
    Cookies.setCookie("sid", sessionID, expires, null, "/", false);
    

    Now you can run the following code
    right after your !EntryPoint begins
    execution:

    String sessionID = Cookies.getCookie("sid");
    if ( sessionID != null ) checkWithServerIfSessionIdIsStillLegal();
    else displayLoginBox();
    

    Remember – you must never rely on the sessionID
    sent to your server in the cookie
    header ; look only at the sessionID
    that your GWT app sends explicitly in
    the payload of messages to your
    server.

    I’m not sure what how your GWT app implemented communication with the login service, but if you want to see another example, I followed the example here:

    http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html#user

    While it uses the Google App Engine as the backend authentication service, I think it’s generic enough to be adapted to any server that supports the GWT RPC server side and has authentication services.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.