0 Replies Latest reply on Oct 22, 2010 5:48 AM by babbarkrishan

    Struts2 - Escape form values while submitting


      I am using struts2 and annotations for validations.

      In my form, when i put following text in any textbox and say validation gets failed then same form display again but the textbox (Where I entered following text) shows wrongly, i mean text box shown with prefilled text "cross script <input type=" and other text (Airplane" type="text" class="txtbox" id="company.name" maxlength="255" />) next to textbox.

      "cross script <input type="radio" name="vehicle1" value="Airplane"> Airplane"

      Any inbuilt way in struts2 to escape special characters and quotes so that it should not disturbed the form and its values in case of server side error in saving the data in DB?

      Krishan Babbar