文章列表
1.在myeclipse中导入附件中7个基本的JAR包
2.在src中加入struts.xml 基本代码如下
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
...
public static String htmlToString(String str)
{
if(str==null) return "";
if(str.equals("")) return "";
str = str.replaceAll("&", "&");
str = str.replaceAll("<", "<");
str = str.replaceAll("> ...
public static String filtString(String s)
{
s = s.replaceAll("\\\\","");
char c[] = s.toCharArray();
for (int i = 0; i < c.length; i++)
{
if (c[i] == ' ')
{
c[i] = '\u3000';
}
else if (c[i] < '\177')
{
c[i] = (char) (c[i] + 65248);
}
...
public static String escape(String s)
{
s = s.replaceAll("\"","\\\\\"");
s = s.replaceAll("\\\\","\\\\\\\\");
s = s.replaceAll("\'","\\\'");
s = s.replaceAll("\n","\\\n");
s = s.replaceAll("\r&qu ...
作者乔纳森·丹尼可(Jonathan Danylko)是一位自由职业的web架构师和程序员,编程经验已超过20年,涉足领域有电子商务、生物技术、房地产、医疗、保险和公用事业。正如乔纳森在文中所言,本文适合刚毕业的大学生和刚入门 ...