鬼泣3补丁百度网盘:JSP问题,帮我看看

来源:百度文库 编辑:中科新闻网 时间:2024/04/29 14:38:23
package com.often ;

import java.sql.*;

public class often
{
/*
函数名:Cint
作用:转换Integer
*/
public int Cint(String cint)
{
try {
int n;
n= Integer.parseInt(cint);
return n;
}
catch (NumberFormatException e) {
return 0;
}
}

/*
函数名:getStr
作用:转换中文编码
*/
public String getStr(String str)
{
try
{
String temp_p=str;
byte[] temp_t=temp_p.getBytes("ISO8859-1");
String temp=new String(temp_t);
return temp;
}
catch(Exception e)
{
e.printStackTrace();
return null;
}
}
/*
函数名:alert
作用:退出程序提示错误
*/
public String alert(String message)
{
try
{
String str;
str="<script language=\"javascript\">";
str+="alert(\""+message+"!\");";
str+="window.location.href=document.referrer;";
str+="</script>";
return str;
}
catch(Exception e)
{
e.printStackTrace();
return null;
}
}

}
四个错误呢/那里,告诉我,QQ185259693
alert这边一定有错误

这个编译没有问题的,哪个有错误