Hmm I think that's how I had it originally. I just changed it to text/ html again, and it didn't seem to have any effect.
public class LoadXmlServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException { response.setContentType("text/html"); ServletOutputStream out = response.getOutputStream(); //StringWriter sw = new StringWriter(); //PrintWriter pw = new PrintWriter(sw); DiskFileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); List items; try { items = upload.parseRequest(request); FileItem item = (FileItem)items.get(0); out.print(item.getString()); } catch(FileUploadException e) { //e.printStackTrace(pw); //out.print(sw.toString()); } } } On Dec 21, 9:40 pm, "todd.sei...@gmail.com" <todd.sei...@gmail.com> wrote: > It looks like you are using a FormPanel. For IE to work you need to > have your response content type be set to text/html. This will work > for the other browsers as well. > > On Dec 19, 5:05 pm, D L H <thed2...@gmail.com> wrote: > > > Hello. > > > I have a Java servlet that reads an xml-based file and sends the > > contents to my gwt application as an HttpServletResponse. I have the > > content type set to text/plain in the servlet. On the client side I > > use event.getResults() inside the onSubmitComplete method of the form > > handler. > > > Everything runs smoothly in Firefox, but when I tested in IE7, it > > would not work properly. I used a Label for debugging to see what > > exactly the application was reading from the servlet, and in IE i'm > > getting a buncha HTML stuff like this: > > > <DIV class=e><SPAN class=b> </SPAN> <SPAN class=m><?</ > > SPAN><SPAN class=pi>xml version="1.0" </SPAN><SPAN class=m>?></ > > SPAN> </DIV> > > > How do I get IE7 to format my servlet response as plain text instead > > of html? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---