jsp的编码方式

<%@page language="java" contentType="text/html; charset=GBK"%>它的作用是什么,是不是设置文件的编码方式

它的作用是什么,是不是设置文件内容的编码方式
哪一个设置在jsp页面显示的时候起作用呢?

下面是关于request的编码方式,页面的编码是GBK的,点击‘上传’发起一个post请求,
我在action中用request.getCharacterEncoding()得到的确是GB2312,这是为什么呢
是不是post请求时获取了weblogic服务器设置的编码方式吗???

我怎样才能在action中获得request.getCharacterEncoding()的编码方式为GBK呢?????

function exp(){ var thefile; var thefilepath; thefilepath=lqbaopanForm.theFile.value; thefile=thefilepath.split("\\"); thefilepath=thefile[thefile.length-1]; lqbaopanForm.filepath.value="C:\\temp\\"+thefilepath; lqbaopanForm.tablecode.value=formpages.TABLECODE.value; lqbaopanForm.hidden_case_code.value=formpages.hidden_case_code.value; lqbaopanForm.submit(); }




/html:form

[quote]下面是关于request的编码方式,页面的编码是GBK的,点击‘上传’发起一个post请求,
我在action中用request.getCharacterEncoding()得到的确是GB2312,这是为什么呢
是不是post请求时获取了weblogic服务器设置的编码方式吗??? [/quote]

看看是不是存在charset的过滤器,过滤器设置了编码为GB2312。如果存在的话可以将GB2312修改为GBK就可以了。

[quote]<%@page language="java" contentType="text/html; charset=GBK"%>它的作用是什么,是不是设置文件的编码方式 [/quote]

[color=darkblue]这个是设置jsp页面的编码格式,这个设置会在jsp页面中起作用[/color]

它的作用是什么,是不是设置文件内容的编码方式

[color=darkblue]这个是设置html的编码格式[/color]

[quote]下面是关于request的编码方式,页面的编码是GBK的,点击‘上传’发起一个post请求,
我在action中用request.getCharacterEncoding()得到的确是GB2312,这是为什么呢
是不是post请求时获取了weblogic服务器设置的编码方式吗???[/quote]

服务器也是可以设置编码方式的!(配置文件中可以看到!)
还有你项目里面的过滤器什么的夜可以改变 项目的编码方式!

<%@page language="java" contentType="text/html; charset=GBK"%>
一般这么用就可以了!