View Full Version : how to get the response string directly when using FileUploadFiled and FormPanel

22 Jun 2010, 8:24 PM
public class ProfilePhotoUploadServlet extends HttpServlet {

protected void doPost(HttpServletRequest pReq, HttpServletResponse pResp)
throws ServletException, IOException {

//receiving the file...

pResp.getWriter().println("you can got the url");

in the client-side code , i used FormEvent.getResultHtml() to get the servlet response, but this method seems give different results on different browsers.
on IE8: you can got the url
on Firefox: <pre>you can got the url</pre>
on Chrome: <pre style="word-wrap: break-word; white-space: pre-wrap;">you can got the url</pre>

it seems only on IE8 the result is exactly what I want.

23 Jun 2010, 8:01 AM
Why don't you parse it?
I mean, if pre is there, remove it.

23 Jun 2010, 8:20 AM
Or set a correct type. You probably also want to use the forum search, because this was asked about 1000 times.