Hi people I'm getting a weird error :(

I've built a httpServlet that returns me a number... as an answer of
an upload... but the returned string is surrounded by tags <pre></pre>
am I doing anything wrong??


In my code I set the content-type to "text/plain" but I still get the
same result :(

Someone can help me with it?

here is my code:

response.setContentType("text/plain");
        PrintWriter out = response.getWriter();

        if(!ServletFileUpload.isMultipartContent(request)){
            return;
        }

        FileItem uploadItem = getFileItem(request);

        if (uploadItem == null) {
            out.print("NO-SCRIPT-DATA");
            return;
        }
        else{
            InputStream inputStream = uploadItem.getInputStream();
            BufferedInputStream in = new
BufferedInputStream(inputStream);

            try {
                out.write(myNumber+"");
            }
            catch (Exception e) {
                e.printStackTrace();
            }

        }
        out.close();

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to