```
public class ConnectionTest extends AsyncTask<Void, Void, Void> {
    String connection;
    String loginFormUrl = "https://intranet.tam.ch/";
    @Override
    protected Void doInBackground(Void... voids) {
        try{
            Connection.Response loginForm = Jsoup.connect(loginFormUrl).method(Connection.Method.GET)
                    .execute();
            connection = loginForm.toString();
            System.out.print(title);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}

```

My Activity should just display the **connection** in a TextView. I have also tried making a Thread and running it in the new Thread but it also won't work.

[![enter image description here](https://i.stack.imgur.com/EE72M.png)](https://i.stack.imgur.com/EE72M.png)[![enter image description here](https://i.stack.imgur.com/wfud1.png)](https://i.stack.imgur.com/wfud1.png)

**Here is my Activity**

```
public class Test extends AppCompatActivity {
TextView textView;
ConnectionTest connectionTest = new ConnectionTest();
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_test);
    connectionTest.getWebsite();
    textView = findViewById(R.id.sdweedew);
    textView.setText(connectionTest.connection);
}

```

}