站内搜索: 请输入搜索关键词

当前页面: 开发资料首页JSP 专题jsp生成html--replace

jsp生成html--replace

摘要: jsp生成html--replace

package ball.news;
import java.io.*;
import news.ReadTemplates;
public class ReplaceAll
{
private static Object a = new Object();
public ReplaceAll()
{
}

public String replace(String content,String flag,String temp)
{
String str = null;

try
{
//System.out.println("before-----"+content);
String s1 = content;
str = s1.replaceAll(flag,temp);
// System.out.println("replace after-----"+str);
}
catch(Exception e)
{
System.out.println("replace all error:"+e.getMessage());
}
return str;

}
private static void a(String s)
{
File file = new File(s);
if(!file.exists())
file.mkdirs();
}
}



↑返回目录
前一篇: jsp生成html--readtemplates
后一篇: jsp字符串操作问题1