×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2009
    Location
    New Delhi ,INDIA
    Posts
    16

    Error in creating HTTP connection

    Hello
    I ave deployed a configured Tomcat Apache Server on my system.
    Now to create a HTTP connection through MIDlet i included the following piece of code in my program:


    public void login(String UserName,String PassWord) {
    HttpConnection connection=null;
    DataInputStream in=null;
    String url="http://localhost/Hello.jsp";


    After building and running this program in SDK 3.0, i entered 127.0.0.1 as location for this server.
    But logging in provided me wth the html code of above Hello.jsp file.

    Please assist how to connect properly, how to display the jsp page ..?

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Error in creating HTTP connection

    What are you expecting to see?

    Can you run the JSP from your computer's browser? Do you see what you expect to see?

    Graham.

Similar Threads

  1. If socket and HTTP connection in single midlet..??
    By vijay.tj in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2008-06-26, 13:28
  2. Urgent on Midlet http connection
    By robinqiu in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2008-03-13, 20:45
  3. Another HTTP connection problem
    By issw in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2006-10-04, 16:36
  4. Http Connection
    By jaceline in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2006-06-09, 16:53
  5. Nokia and Vodafon Italy --> No http connection
    By javame in forum Mobile Java General
    Replies: 0
    Last Post: 2002-11-28, 13:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •