Solution for garbled characters when JAVA front-end to back-end values

 var factoryname= $('#factory').combobox('getText');
                       // The foreground handles it like this
                      alert(encodeURI(encodeURI(factoryname)));
                   var url = 'lineManageAction!loadLineListForComBox3.action?  factoryname='+encodeURI(encodeURI(factoryname));  
 

Backstage:
      * @date 2018 - 04 - 11
           * @mark add user to add factory information
           */
           try {
               // handle like this
               lie.setFactoryname( java.net.URLDecoder . decode ( this .getFactoryname(), "UTF-8" ));
              List<Line> list = lineService .queryForListByIdI( "getLineBylinenamesFactor" , lie, CustomerContextHolder. BASE ) ; //queryForListI("getLineBylinenames",)
              Line temp = null ;





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325782811&siteId=291194637