Hi again guys I've managed to solve the problem with more search....
this is what I've done:
String results = event.getResults();
HTML htmlResult = new HTML(results);
Window.alert(htmlResult.getText());
The result was the number I've sent on the server. Now I'm
wondering... is there another way to do it?
Thanks anyway
On 18 set, 10:20, Marcelo Emanoel <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---