携帯JAVAのスレッドat TECH
携帯JAVAのスレッド - 暇つぶし2ch372:デフォルトの名無しさん
03/02/19 00:44
これを実機ですると例外が返されます。
なんでしょう?tomcatなどを入れてエミュではできますが
ランキングが表示されません。どうしてでしょう?

/*
* 通信をするメソッド
*/
private void sendData(String name, int score){
String st = null;
try{
HttpConnection conn = (HttpConnection)Connector.open
("URLリンク(localhost)",
Connector.READ_WRITE, true);

conn.setRequestMethod(HttpConnection.POST);

conn.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");

OutputStream output = conn.openOutputStream();

st = new String("name="+name+"&score="+score);

output.write(st.getBytes());

output.close();
conn.connect();




次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch