안드로이드 클라이언트에서 ID, password를 서버 오라클 DB에 저장을 하고싶은데요..

코드상에 오류는 전혀 없는데 안드로이드에서 값을 보내면 무한 대기모드에서 빠져나올 생각을 안하네요 -_-;


서블릿 DB관련 코드는 웹에서 동작시켜보니 잘 되는데 꼭 안드로이드에서 httpPost를 이용하면 응답없이

무한대기상태에 빠지네요.. 캣로그에 찍히는 오류도 없고 참.. 난감합니다 ㅠ_ㅠ

manifest.xml 인터넷 퍼미션도 추가시켰는데 말이죠.. 흠.


안드로이드 코드


public void loginProcess() {

url = "http://127.0.0.1:8888/Server_Android2/LoginServer/";


pDialog = ProgressDialog.show(this, "", "로그인 처리중....", true, true);

new Thread() {

public void run() {

try {

HttpClient httpclient = new DefaultHttpClient();

HttpPost httpPost = new HttpPost(url);

ArrayList<BasicNameValuePair> nameValuePairs = new ArrayList<BasicNameValuePair>();

// this is where you add your data to the post method

nameValuePairs.add(new BasicNameValuePair("name", userId));

nameValuePairs

.add(new BasicNameValuePair("pass", userPass));

System.out.println(userId);

System.out.println(userPass);

httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs,

"EUC-KR"));

// Execute HTTP Post Request

httpclient.execute(httpPost);

} catch (Exception e) {

e.printStackTrace();

}

}

}.start();





서블릿 코드

서블릿에서 값은 getParameter()로 받고 있습니다. 


protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {

String vname = req.getParameter("name");

String vpass = req.getParameter("pass");

}