public void doPost ( HttpServletRequest req, HttpServletResponse res ) 	throws ServletException,IOException {
DeleteItem deleteItem = new DeleteItem ( ) ;
res.setContentType ( "text/html ;charset = euc-kr" ) ;
out = res.getWriter ( ) ;
num = Integer.parseInt ( req.getParameter ( "num" ) ) ;
password = req.getParameter ( "password" ) ;
try {
deleteItem.loadDirver ( ) ;
} catch ( java.lang.ClassNotFoundException e ) {
System.err.print ( "ClassNotFoundException:" ) ;
System.err.println ( e.getMessage ( ) ) ;
} catch ( Exception e ) {
System.err.println ( e ) ;
}
out.println ( HTMLLib.getHTMLTitle ( "글 삭제" ) ) ;
out.println ( "<body>" ) ;
try {
boolean stateOfResult = deleteItem.delete ( String.valueOf ( num ) , password ) ;
if ( stateOfResult ) out.println("<script>alert('자료가 삭제되었습니다.')</script><script>self.location='BoardList_db'</script>");
else out.println("<script>alert('비밀번호가 맞지 않습니다. \\n삭제할  권한이 없습니다.'); history.back()</script>");
} catch ( SQLException ex ) {
System.err.println ( "SQLException : " + ex.getMessage ( ) ) ;
}
out.println ( "" ) ;
out.println ( "</body></html>" ) ;
}
public String toHangul ( String str ) {
if ( str == null ) return null;
try {
return new String ( str.getBytes ( "8859_1" ) , "KSC5601" ) ;
} catch ( UnsupportedEncodingException e ) {
}
return null ;
}
public String hangulTo ( String str ) {
if ( str == null ) return null;
try {
return new String ( str.getBytes ( "KSC5601" ) , "8859_1" ) ;
} catch ( UnsupportedEncodingException e ) {
}
return null ;
}
