Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem when connect to servlet

 
Siharat Thammaya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, every one.

I try to connect http://61.19.255.4:8080/MIMA/UserLogin?username=TESTER&password=TESTER

with this code



It run fine in wtk emulator. The response is return user id, but on real device(nokia n70 and nokia 7610) the response return

<?xml version='1.0'?>
<!DOCTYPE html PUBLIC '-//WAPFORUM//DTD XHTML Mobile1.0//EN' 'http://www.wapforum.org/DTD/xhtml-mobile10.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>The request failed</title>
</head>
<body>
<p>The request is not understood</p>
<p>Technical description: 400 Bad request - Check your spelling for the requested URL.<p>
<body>
</html>

Please help me.
Why the request is bad request? How to get correct response?

Thanks.

ps. Sorry for my bad english
[ December 26, 2007: Message edited by: Siharat Thammaya ]
 
Albert Kam
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

Anyway, here goes a list of question for more details :
- This http://61.19.255.4:8080/, is it on LAN or the internet ?
- Is your device connected to the server ?
- What media are you using ? Wireless LAN or bluetooth ?
- Have you tried connecting to the server using browser in your device (if your device has one of course)

Cheers,
:-D
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might help: http://www.checkupdown.com/status/E400.html

However, I notice that you're doing an HTTP POST request with parameters in the URL like an HTTP GET. For a POST, the parameters are not coded on the URL, they're included in a separate data stream.

Some web server won't care. The fact that you did a POST causes the GET parameters to be ignored. A few will even allow you to access both sets of variables, though that's bad practice.

In your case, however, I suspect you've set your web server up to receive a GET and then pushed a GET+POST request towards it and the web server is complaining by sending back a status 400.
 
Siharat Thammaya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic