Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor sachinwarang's Avatar
    Join Date
    Mar 2006
    Posts
    76
    Hi friends,
    I'm building Servlet in j2me.When i run this Servlet on web browser the Servlet running fine.But while in application when i used
    conn = (HttpConnection)Connector.open( url );
    where url = "http://localhost:8080/servlets-examples/hits"

    It hangs ,the debugger stuck at this method .It didn't throw any Exception also.

    Whats the problem?how could i resolve this issue?
    Note:
    I've used the follwing tutorial
    http://developers.sun.com/techtopics...les/tutorial2/
    to build servlet in MIDlet.

    Regards,
    Sachin Warang.

  2. #2
    Registered User juarezjunior's Avatar
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,883
    Hi Sachin Warang,

    Well, if you have strictly followed the tutorial (i assume that), it seems that your URL is wrong. I quickly checked the tutorial code and the context path is defined as below:

    <Context path="/midp" docBase="midp" reloadable="true"/>

    Note it is "midp" and not servlets-examples. The URL pattern for your servlet is right:

    <url-pattern>/hits</url-pattern>

    So the URL should be - http://localhost:8080/midp/hits provided you haven't changed the HTTP port where Tomcat is listening to connections.

    I hope it helps!

    BR,

    Juarez

  3. #3
    Regular Contributor sachinwarang's Avatar
    Join Date
    Mar 2006
    Posts
    76
    hi friends,

    I debug the code while doing so i realised that it throwing SecurityException .So edit the preferences>
    where in security i've change it to untrusted and restore the settings.
    After clicking on OK .
    The application works fine.

    Regards,
    Sachin Warang.

  4. #4
    Registered User juarezjunior's Avatar
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,883
    Wow! I'd never figure out what was going on based on the info you provided...

  5. #5
    Registered User anandfred's Avatar
    Join Date
    Aug 2007
    Posts
    1
    Hi,
    I am the new comer of J2ME developer.I want prescribed detail of networking example using through J2ME toolkit.and also settings of j2me toolkit.

Similar Threads

  1. Phone (ARMI) Release Problem
    By aydink_1903 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2006-04-07, 23:39
  2. Problem in NDS 3.0 for J2ME packager and abstract MIDlet base class
    By David Mitchell in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-09-16, 19:30
  3. NDS j2me v2.2 with NTS v1.2 problem
    By iseemedia in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-06-29, 16:36
  4. building problem
    By Freestyler in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-08-04, 14:08
  5. J2ME 32KB MIDLET size limit problem
    By swagner@multimedia.au.dk in forum Mobile Java General
    Replies: 2
    Last Post: 2003-05-07, 15:37

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved