I am using a text area in a jsp page. In a servlet, I am trying to fetch multiple lines from the text area. I used
textarea.getParameter("textarea");
and
textarea.getParameterValues("textarea");
both return 2 sentences in the text area with a newline in between them. My requirement is that I should use the 2 sentences in the text area separately. How do I separate the 2 sentences in servlet?
Edit:
The input is
I need to get these two sentences in a servlet and split them and use them individually.