("INSERT into oe1 (content)"+"values(\'"+content+"\')")
("update oe1 set content=\'"+content+"\'");'不要转义吧?
("INSERT into oe1 (content)"+"values('"+content+"')");
-----> ("update oe1 set content='"+content+"'");
("update oe1 set content=\'"+content+"\'");'不要转义吧?
("INSERT into oe1 (content)"+"values('"+content+"')");
-----> ("update oe1 set content='"+content+"'");
This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
If using an alternate Java compiler, please check its installation and access path.大家说清楚点啊
{ st.executeUpdate("INSERT into oe1 (content)"+"values('"+content+"')");
out.println("记录插入完毕!");}
else
{st.executeUpdate("update oe1 set content='"+content+"'");
out.println("更改成功!");}
......
}if(!re.next()) {
......
}
在加一个catch就可以了
{ 是不是应该改成:
if(re.next())
{
}