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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:52:38+00:00 2026-05-21T16:52:38+00:00

how to do authentication in REST web service using jersey framework and java? I

  • 0

how to do authentication in REST web service using jersey framework and java?
I used NetBean IDE and create Rest web service, the application server is glassfish.
I don’t use javadb or derby. My database is mongodb.
I have google and i found http://weblogs.java.net/blog/mhadley/archive/2008/03/authentication.html.
But that site described he used derby database.
How should i configure in web.xml for authenticate?

  • 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-21T16:52:39+00:00Added an answer on May 21, 2026 at 4:52 pm

    You can as well use file realm of glassfish to test if your code & basic authentication works.
    For that add your users into file realm and modify your configuration in web.xml:

    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>file</realm-name>
    </login-config>
    <security-role>
        <description/>
        <role-name>USERS</role-name>
    </security-role>
    

    Later you can switch to jdbc realm and add jdbc data source to use with mongodb and realm.

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

Sidebar

Related Questions

I'm creating a REST web service using spring and I need to implement login/logout
I'm adding an API to a Symfony-application which should act as a REST web-service.
i used Zend Rest Controller for developing a web service, and now i need
I am using windows authentication within an ASP.NET application. I am wondering how to
I am using forms authentication. My users are redirected to a page (written in
We're using Forms Authentication in SharePoint. When the account is created, the administrator can
I am using an authentication attribute on some of my actions in an asp.net
I have authentication mode set to forms in my asp.net web.config but am still
I'm using Forms Authentication (and the built in Login controls) and letting users click
What type of authentication would you suggest for the service that is: implemented as

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.