I am just learning how to use servlets and I have to make a simple lotto program. I have created 6 numbers all I need to do is write a behavior that checks that the numbers are valid lotto numbers(not bigger number then 49), sort them and display them via response back to the user. This is the code i have so far. I will be very appreciated if someone can help me out with this. Thank you.

import java.io.IOException;import java.io.PrintWriter;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class MyLottoServlet extends HttpServlet{ private static final long serialVersionUID = 1L; public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String numberOne = request.getParameter("numberOne"); String numberTwo = request.getParameter("numberTwo"); String numberThree = request.getParameter("numberThree"); String numberFour = request.getParameter("numberFour"); String numberFive = request.getParameter("numberFive"); String numberSix = request.getParameter("numberSix"); int number = Integer.parseInt("numberOne"); int[] numbers = new int[49]; int i; for(i = 0; i < numbers.length; i++){ numbers[i] = i + 1; out.println(numbers[i]); } out.println(""); out.println(""); out.println("Hello world!," + numberOne +"\n"+ numberTwo + numberThree + numberFour + numberFive + numberSix + ""); out.println(""); out.println(""); out.println("Whats up

"); out.println("