直接这样写了。会错误么? 
1,注意顶行写。
2,其他代码分开。
<%@ page contentType="text/html;charset=GB2312" %>
<%!
public void abc(){
out.println("<center>hllo</center>");}
<%//你的其他代码%>%>