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 3426794
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:45:31+00:00 2026-05-18T06:45:31+00:00

I have a GWT based application. I want to add access control to it.

  • 0

I have a GWT based application. I want to add access control to it. Is there a way to add custom access control for GWT components?

My idea about adding access control/permissions would be as following.

  1. Add access control annotation (if there exists one) to the class (GWT component) for which I need to add access control.
  2. When this component gets rendered, my custom method which checks for access control rules get called and depending on its results the component gets rendered.

Any ideas of how this can be achieved.

  • 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-18T06:45:32+00:00Added an answer on May 18, 2026 at 6:45 am

    In a GWT app I’ve done access control two ways, both assume that access control is enforced on the server – in every AJAX (GWT RPC) call. The javascript side is inherently unsafe, so any controls there would be pointless.

    Depending on how fine grained access control I’ve needed, I’ve either used URL-based control by the servlet container protecting the GWT RPC end point. I.e.

    /public/gwt.rpc.endpoint
    /private/gwt.rpc.endpoint
    

    Protect the private one using either bog standard web.xml, or spring security. However this then led me to handle logins the “normal” form-based way before launching the GWT application.

    A more fine grained approach has been to use an exception on every GWT RPC exposed method:

    interface MyService extends RemoteService {
      SomeData getPublicData();
      SomeSecret getPrivateData() throws AccessDeniedException; 
      Result login(String username, String password);
    }
    
    interface MyServiceAsync {
      void getPublicData(AsyncCallback<SomeData> callback);
      void getPrivateData(AsyncCallback<SomeSecret> callback);
      void login(String username, String password, AsyncCallback<Result> callback);
    }
    

    By making AccessDeniedException RPC serializable, I will receive that exception in the AsyncCallback – this makes it possible to throw up a login-dialog inside the GWT app.

    However the actual login call and server side session handling I’ve then done completely manually not relying on any framework for that (though you could do it with Spring Security).

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

Sidebar

Related Questions

I have a couple of questions regarding a modular GWT based application framework. I
I have a clean GWT application which I want to secure with Spring Security.
Is there a way to compile a GWT application so that all the files
I have an ARM-based platform and I'd like to use it to serve GWT
I have a GWT application which I would like to run from within a
We have a very large GWT project that results in a monolithic app about
I want to build a GWT application that doesn't use a database. I thought
I'm currently building a SmartGWT-based web application (using the Portlet Layout). So I have
We are developing a web based application on glassfish V3. We have 2 application
I have a GWT MVP application using Activities and Places. This is inspired by

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.