当前页面: 开发资料首页 → J2SE 专题 → 替换{$h1}问题
替换{$h1}问题
摘要: 替换{$h1}问题
我从库中提取数据例如
String str=-#34;{$h1}aaa{$/h1}-#34;;
str=str.replaceAll(-#34;{$h1}-#34;,-#34;-#60;h1-#62;-#34;);
str=str.replaceAll(-#34;{$/h1}-#34;,-#34;-#60;/h1-#62;-#34;);
为什么会org.apache.jasper.JasperException: Illegal repetition
{$h1}
如果不用{$h1}就好像不会有问题,JSP中什么是ASP中的占位符?那该怎么替换这个呢!
自己顶下啊
str=str.replace(-#34;{$h1}-#34;,-#34;-#60;/h1-#62;-#34;).replace(-#34;{$/h1}-#34;,-#34;-#60;/h1-#62;-#34;);