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"
相关问答:
我JSP的页面是:
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
table怎么绑定数据库,并且用JavaScript实现翻页。。。。。。。。。。JavaScript能向JSP页面传递参数吗
你说的问题有点那个。。,不好回答。。。。
jsp中table是需要html代码与页面端获取数据库查询后的信息进行 ......
大家好,我在JSP的初学者,在编程中遇到了一个问题:
<jsp:useBean id="accountBiz" class="bank.AccountBiz"
scope="application">
这个标签中application和sessi ......
比如说DB.class是在包com/zhl/jdbc下的
那么DB.class放在什么地方 如果用<jsp:useBean id="d" class=""/>来引入bean 那么class属性应该怎么写
需不需要像servlet那样还要配置web.xml的& ......
程序如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page language="java" %>
<%@ page import="com.mysql.jdbc.Driver" %>
<%@ page import ......