主题:jsp中怎样包含文件?
我将一个中文字符转换的函数,放在一个单独的文件(func.jsp)中,我想在文件中调用他,不知道怎样调用才对呢?
这个func.jsp的代码如下:
<%!
public String codeToString(String str)
{
String s=str;
try
{
byte tempB[]=s.getBytes("ISO-8859-1");
s=new String(tempB);
return s;
}
catch (Exception e)
{
return s;
}
}
%>
这个func.jsp的代码如下:
<%!
public String codeToString(String str)
{
String s=str;
try
{
byte tempB[]=s.getBytes("ISO-8859-1");
s=new String(tempB);
return s;
}
catch (Exception e)
{
return s;
}
}
%>