• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem when connect to servlet

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 28323
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, very much
 
Well THAT's new! Comfort me, reliable tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic