Web tier: servlets, JSP, Web frameworks: What is the best practise for encoding the form data?

  1. Hi all My current application is using struts 1.3.8 , what is the best practise to encode the form data before putting those form data into a javascript variable.. as I worry the encoding could slower the performance... Shoud I use the encodeURL by jdk or using the struts library TaguUtils? Or is there any other choices? Many Thanks
  2. As an option: keep them as is on the server side and encode on the client. Anyway you need that for JS variable. Coldtags suite - the largest collection of custom JSP tags