Greetings everyone!
I've recently began programming Midlets, and I'm trying to write my first Midlet that uses http connection, but I have stumbled upon something.
First of all I used the code given in this article :
http://developers.sun.com/mobility/midp/articles/permissions/ (under the section "Making an HTTP Connection". It is a very simple Midlet. The main code is this :
When I use the wireless toolkit to
test it with the url "http://wireless.java.sun.com/" or with any other URL on the web (ie.
www.google.com) I get good results.
In addition I have installed apache
tomcat localy on my computer. When I give my browser a localhost address everything works fine. I have put a very simple html page for example that says Hello and when I give my browser the address "http://localhost/Hello.html" it displays it correctly.
But when I give the same address to my Midlet, it just says "Error ...".
What is wrong here?
After adding this line to the Midlet
the wireless toolkit prints "404". How come the page displays correctly through Firefox, but the Tomcat returns a 404 to the Midlet?
Is my Midlet wrong somehow, or is my wireless toolkit configuration or tomcat not correct?
Thank you very much and in advance for your reply!