If you use the GET method, you should build the request as follows:
http://localhost:8080/myApp/myServlet/?habits=Movies&habits=Writing&habits=Singing
If you use the POST method, you should use the application/x-www-form-urlencodedContent Type or just use the Post method in your HTML form. For instance:
<form method="post">
Habits :
<input type="checkbox" name="habits" value="Reading">Reading
<input type="checkbox" name="habits" value="Movies">Movies
<input type="checkbox" name="habits" value="Writing">Writing
<input type="checkbox" name="habits" value="Singing">Singing
<input type="submit" value="Submit">
</form>
Then in both cases in your servlet:
String[] outerArray=request.getParameterValues('habits');
your array will be filled with separated values: