jeudi 25 février 2016

InputStreamReader in doGet servlet

i am trying to send parameters (int and string) to servelet doGet method and use with InputStreamReader like:

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        HttpSession UserSession = request.getSession();
        InputStreamReader isr = new InputStreamReader(request.getInputStream());
        BufferedReader br = new BufferedReader(isr);
        //Get all content from the buffer
        String bufferContent = br.readLine();

But for some resone its not working. When I tried to use with doPost its work.

What can i do to solve it?




Aucun commentaire:

Enregistrer un commentaire