views:

34

answers:

1

I have a .jsp page I'm compiling with ant and deploying to a Tomcat 7 server. A couple of times the output source document has a double-quote character added at a point where it shouldn't be added. It seems to persist through multiple compiles and deploys, but they've always gone away after a while.

Here is a section of the jsp:

  <form action="SetDocName" method="post" accept-charset="UTF-8">
    <input type="text" name="new-doc-name" /> <input type="submit" value="<%= uiStrings.getString("change_doc_name") %>" />
  </form>

and here's the final output:

  <form action="SetDocName" method="post" accept-charset="UTF-8">
    <input type="text" name="new-doc-name" /> <input type="submit" value="Change document name" />"
  </form>

notice the double-quote next to the second input element.

Any idea what's going on here? It's not a major problem at the moment, but it is puzzling.

A: 

That uiString you are using seems to be messing things up I would try the following (single quotes):

value='<%= uiStrings.getString("change_doc_name") %>'

Raul Lapeira Herrero
That should not form a problem. JSP is processed at webserver, not at webbrowser. Have you read OP's comments on the question?
BalusC
The JSP is processed in the servlet container, and it seems to me it is a problem with the parsing done by uiString at the server
Raul Lapeira Herrero
I'm fairly confident it isn't anything to do with the UI strings - I have dozens of them between double quotes like this in this application, and a couple of hundred in another.
Dr. Monkey
The issue seems to be the web page editor plugin somehow inserting some sort of character that shows up as whitespace in the editor but is interpreted differently by Tomcat. Replacing the whitespace with new whitespace fixed it and it hasn't happened since.
Dr. Monkey