modify server response format

38 views
Skip to first unread message

sreenivas

unread,
Nov 21, 2012, 3:44:46 AM11/21/12
to google-we...@googlegroups.com
Hi,

I am sending the response back from my servlet to the client. in onSubmitComplete() method when i get event.getResults(), I am getting my string in <pre>my string </pre> format. How should i get only my string and no <pre> tags....?

-sri

Thad

unread,
Nov 21, 2012, 6:53:56 AM11/21/12
to google-we...@googlegroups.com
Try if (results.contains("...")) where "..." is whatever your key phrase is.

Thomas Broyer

unread,
Nov 21, 2012, 9:22:25 AM11/21/12
to google-we...@googlegroups.com


On Wednesday, November 21, 2012 9:44:46 AM UTC+1, sreenivas wrote:
Hi,

I am sending the response back from my servlet to the client. in onSubmitComplete() method when i get event.getResults(), I am getting my string in <pre>my string </pre> format. How should i get only my string and no <pre> tags....?

That generally means you server doesn't send a text/html response (more likely text/plain), which can cause other issues; see http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/FormPanel.html#FormPanel()

Thad

unread,
Nov 21, 2012, 10:12:04 AM11/21/12
to google-we...@googlegroups.com
Thomas,

I've found that some browser plugins will screw up the response regardless of what I do (I'm thinking in particular about an IE audio-film control plugin who's name escapes me). To work around it I had to bracket my answer with something like -FOO-/-FOO-. It was a real pain in the ass to run that one down.
Reply all
Reply to author
Forward
0 new messages