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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:26:50+00:00 2026-05-27T10:26:50+00:00

In the university we must develop an android application, which grabs our marks from

  • 0

In the university we must develop an android application, which grabs our marks from the website.

We use the JSoup Framework to grab and parse the HTML pages. The problem now is that our University uses a self-signed certificate for HTTPS connection, which is not trusted by a larger trusted CA.

I’ve seen for these frequently occurring problems, some general solutions, but they use a extended DefaultHttpClient with a own SSLSocketFactory. These solutions do not look very nice, is there a simple beautiful solution for this by usage of the JSoup Framework?

private LoginState connect(String username, String password) {
        try {
            if (isOnline()) {
                Log.i(TAG, "Sending POST.");

                Connection connection = Jsoup.connect(LOGIN_URL)
                        .data(USER_FIELD, username).data(PASS_FIELD, password)
                        .data(LOGIN_BUTTON, "Anmelden")
                        .data(LOGIN_TYPE, "login").data(PID, "2")
                        .timeout(DEFAULT_TIMEOUT);

                mDocument = connection.post();

                mCookies.putAll(connection.response().cookies());

                if (isConnected()) {
                    Log.i(TAG, "Login successful.");
                    setState(LoginState.LOGIN_SUCCESSFUL);
                } else {
                    Log.i(TAG, "Login failed.");
                    setState(LoginState.LOGIN_FAILED);
                }
            } else {
                Log.i(TAG, "No Internet Connection.");
                setState(LoginState.BAD_CONNECTION);
            }
        } catch (IOException ex) {
            Log.e(TAG, ex.getStackTrace().toString());
            setState(LoginState.BAD_CONNECTION);
        }

        return getState();
    }
  • 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-27T10:26:51+00:00Added an answer on May 27, 2026 at 10:26 am

    Unless JSoup exposes some API that lets your pass your own trust store, no. If you have a rooted device you can install the university’s cert to the trust store using this. If you have an Android 4.0 (ICS) device, there is an UI for installing trusted CA certificates. Another idea: use HttpClient to get the data, and then use JSoup for parsing only (that should be possible).

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

Sidebar

Related Questions

For my university class we are developing a multi-threaded Blackberry application which allows us
While going through university and from following the development of SO, I've heard a
I am doing a project in the university which requires running of multiple instances
I need a regex (JavaScript) which will extract shortforms from a string for example
for my final exam (to graduate from university) I’ve been asked to create a
I started Intelligent System studies at a university and our first language is Haskell.
I am working in android. i am trying to display name of university using
I am in the middle of developing a Django application, which has quite complicated
I watched my lecturer's video from my university and he says about the Rational
At university, we were given task to use ADO.NET or LINQ to SQL and

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.