操作的Eclipse 版本4.2.2
操作的Eclipse 版本4.2.2
首先设置eclipse,在file->properties->resourse->textfile encoding 设置为GBK编码格式;
在window->general->editors->file associations,file types添加*.jsp *.js,associated editors选择text editor;
接着在window->general->content types,选择text,添加*.jsp *.js,在下方default encoding中设置为GBK,执行update(这一步一定要执行);
Update之后jsp窗口会刷新,这时候中文编码就正常了。
试了好多查到的方法,最终这样顺利解决了jsp中文乱码问题。