기술지원 문의

소스를 보여 드릴께요
김진오 / 2003-12-05 16:11

한글이 ?? <----------- 이렇게 물음표로 나옵니다.

mm.mysql-2.0.4-bin.jar <------ 이파일을 resin/lib 에 넣었습니다.


                     String user_table = \"n_notice\";
String db_drivers = \"org.gjt.mm.mysql.Driver\";
// String connect_url  = \"jdbc:mysql://localhost:3306/project?useUnicode=true&characterEncoding=KSC5601\";
String connect_url  = \"jdbc:mysql://localhost:3306/\";
String db_name = \"n\";
String db_id = \"n\";
String db_pass = \"n\";

Connection db_connect = null;
Statement stmt = null;
ResultSet seek_result = null;
ResultSet filter_result = null;
PreparedStatement total_record_pstmt = null;
PreparedStatement filter_pstmt = null;

String total_seek_sql  = \"select count(*)  from \" +   user_table;
String filter_seek_sql = null;

String filter_seek_sql_other = \"select * from \" + user_table + \" where \" + seek_field + \" like %\"+ key_value + \"%   order by equal_key  desc, link_plus asc  limit  ?,\" + page_line_view;

.
중간 생략
.
.
.


while  (filter_result.next())
{
%>

// new String(filter_result.getString(\"name\").getBytes(\"8859_1\"),\"KSC5601\");

    <%= new String(filter_result.getString(\"name\").getBytes(\"8859_1\"),\"KSC5601\") %>   <--------  이런식으로 하고  
<%= filter_result.getString(\"name\") %>  <------------ 이렇게도 하고
    <%=  filter_result.getString(\"input_date\") %>
    <%=  filter_result.getInt(\"seek_count\") %>

}

[Re]소스를 보여 드릴께요
관리자 / 2003-12-05 20:58

resin에서 제공하는 connection  pool을 사용하지 않고 
직접 이용하시는 군요.

그런데 소스중에서 상단에 존재하는
// String connect_url = \"jdbc:mysql://localhost:3306/project?useUnicode=true&characterEncoding=KSC5601\";
String connect_url = \"jdbc:mysql://localhost:3306/\";
이건 왜 이렇게 하셨나요?

제 생각에는 comment 처리되어 있는 것이 한글처리에는 맞는 것 같은데요.
jsp에서는 다른 것 들이 적절하게 설정되어 있고
<%@ page contentType=\"text/html; charset=euc-kr\"%> 지시어만 넣어주면 됩니다.