JSP中的中文字符处理
<%@ page contentType = "text/html;charset =gb2312"%>
<%!
public String codeToString(String str)
{
String s =str;
try{
byte[] tb = s.getBytes("ISO-8859-1");
s=new String(tb);
return s;
} catch(Exception e){
return s;
}
}
%>
<html>
<body>
<form name="form1" action="chinessString.jsp" method ="post">
please input your name
<input type ="text" name = "username">
<input type ="submit" name ="submit" value="submit">
</form> <br>
<%
if(request.getParameter("username")==null)
out.println("you don't input name");
else
out.println("your name is :"+codeToString(request.getParameter("username"
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
一个JSP页面接收其他页面提交过来的FORM表单,但是要求只接收当前站点及其子站点提交过来的FORM表单,其他站点提交过来的表单不接收,这个怎么设置?
用过滤器
filter
将当前站点及其子站点放一个目录
然 ......
table怎么绑定数据库,并且用JavaScript实现翻页。。。。。。。。。。JavaScript能向JSP页面传递参数吗
你说的问题有点那个。。,不好回答。。。。
jsp中table是需要html代码与页面端获取数据库查询后的信息进行 ......
大家好,我在JSP的初学者,在编程中遇到了一个问题:
<jsp:useBean id="accountBiz" class="bank.AccountBiz"
scope="application">
这个标签中application和sessi ......
我写了个jsp页面,然后改动了一下,改动的内容就是在jsp页面的js函数里加了个alert()语句,但是我访问这个页面时,死活都是原来页面的内容,我加了很多alert函数还是没改动前的页面内容;tomcat重启了,也重新部署这 ......