J2me with javaservlet

hello
Sir i want to call a servlet program in a j2me program i have found a program related to my requirment on
net. But there is a problem that when i run as it is program according to net i give url="http://www.mycgiserver.com/servlet/corej2me.WebsiteDemo_CallServletGET"on my toolkit it is runing correct,
but when i give url according to my system for servlet like "http://localhost:8000/servlets/CallServletGET" then its not working when i click submit button then there is not any response for servlet calls .

Which version of tomcat are you using? because in older versions you manually have to set some things on the tomcat....and send the servlet code too, I have dont a lot of client server work on J2ME i will defenitely help you in this...
Cheers
Manas

Similar Messages

  • J2me with mysql

    hello everyone,
    can we anyone help me with small example, how to connect j2me with mysql.

    Put all your Database transactions in server side, using Connection framework in J2ME, access that URL by your device. Here is a snap to access a URL to get the message returned by that URL.
    public String getMessage(String url)
         HttpConnection hc = (HttpConnection)Connector.open( url, Connector.READ_WRITE );
         hc.setRequestMethod( HttpConnection.POST );
         InputStream in=hc.openInputStream();
         DataInputStream dis=new DataInputStream(in);
         int ch;
         String msg="";
         while((ch=dis.read())!= -1)
              msg=""+msg+(char)ch;
         reutrn msg;
    }

  • J2ME WITH NMEA

    I would like to know, who knows, how i can make a connection J2ME with NMEA protocol(GPS), somebody can give me a source code example? Thanks !!

    You can find a very nice tutorial on http://servlet.java.sun.com/javaone/sf2002/conf/sessions/18-introductory-expanded.en.jsp
    You should have found this if you had googled "j2me nmea", it was on the third place ;)
    And now that you know this, can you write a GPS-spy program for me, because I'm a total newbe in this kind of stuff. (just kidding :)

  • J2ME WITH TOMCAT

    Hello Guyzz
    i want to create an j2me application where it connects to the webserver like tomcat . .
    i can do it in j2me wireless toolkit emulator but when i deployed that jar file in real device it was not working .
    i want to build this application using private ip address but not with public ip address no problem if we use
    datacable or bluetooth connection instead of GPRS . . .
    Let me know if any one have idea about this . .
    Thnx in advance

    Thanks for your reply but i am not sure that i understood ! Do you suggest to connect another mobile phone to my pc and use it like a wap gateway or something and then call it from my j2me phone the same way i call my wap provider?
    Why not connecting my phone directly to the pc?
    thank you very much!!
    Sorry if i am saying something completely wrong !!!

  • J2me with jsp

    hi
    i want to call a servlet program into a j2me program for data base connectivity with ms access.
    how can i do it

    This is an example reported in the MIDP API documentation :
    This example use POST method to require the Html (or servlet page), you can adapt it to your needs.
    void postViaHttpConnection(String url) throws IOException {
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    try {
    c = (HttpConnection)Connector.open(url);
    // Set the request method and headers
    c.setRequestMethod(HttpConnection.POST);
    c.setRequestProperty("If-Modified-Since",
    "29 Oct 1999 19:43:31 GMT");
    c.setRequestProperty("User-Agent",
    "Profile/MIDP-1.0 Configuration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-US");
    // Getting the output stream may flush the headers
    os = c.openOutputStream();
    os.write("LIST games\n".getBytes());
    os.flush(); // Optional, openInputStream will flush
    // Opening the InputStream will open the connection
    // and read the HTTP headers. They are stored until
    // requested.
    is = c.openInputStream();
    // Get the ContentType
    String type = c.getType();
    processType(type);
    // Get the length and process the data
    int len = (int)c.getLength();
    if (len > 0) {
    byte[] data = new byte[len];
    int actual = is.read(data);
    process(data);
    } else {
    int ch;
    while ((ch = is.read()) != -1) {
    process((byte)ch);
    } finally {
    if (is != null)
    is.close();
    if (os != null)
    os.close();
    if (c != null)
    c.close();

  • How to create JDBC connection in J2ME with MS-SQL server?

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

  • J2ME with camera Resolution of 640x480

    Does anyone know how to direct access the camera on your mobile phone. My camera supports 640x480 and 320x240.
    I have the camera program working already but that only takes a snapshot of the size of the phone display. Need the J2ME to take a picture with higher resolution.
    Does anyone know if J2ME can do this. any little snippets of code.
    Thanks
    Martin

    Sorry for the delay in getting back. I was looking on the internet for tht code.But i heard somewhere that code only works for nokia phones. What phone do you have currently that this piece of code works on. When i run it on my motorola phone with a vga camera it just says could not create image. I use that code and put it contents into a byte[] array.Then try and make an nimage from that.
    this bit of code works for me but it only gives me a 172x144 resolution
    videoControl.getSnapshot();when i put this code in it cannot take a picture.
    videoControl.getSnapshot("encoding=jpeg&width=640&height=480");the highest resolution on my phone is 640x480 and it is vga. Maybe that is a problem.i need to get a phone with a higher megapixel.
    what phone are you using at the moment that this code works on.Does it have bluetooth also.
    thanks
    Martin
    Edited by: martinnaughton on Mar 2, 2008 5:03 AM
    Edited by: martinnaughton on Mar 2, 2008 5:03 AM

  • Impossible to send SMS through J2ME with a HTC which OS is Windows Mobile

    Hello,
    I've developed a J2ME application with possibilty to send a SMS.
    This works fine on some mobiles like Nokia 6300, but doesn't work on a HTC equipped with Windows Mobile.
    Precisely, in the case of my HTC, the variable supportedSms below is allways null.
    Can someone tell me how to solve this matter please?
                String supportedSms = System.getProperty("wireless.messaging.sms.smsc"); 
                if(supportedSms == null){
                        //this means the mobile can't send a sms through j2me code
                }else{
                        //this means the mobile can send a sms through j2me code
                }Regards

    Sorry, for digging up this topic, but has anybody found a solution to the problem? My sms sending application seems to work on SE's, Nokias, Motorolas etc. but not on Windows Mobile. I am testing it on a HTC s710 with Windows Mobile v. 6.0.
    Regards
    Martin

  • J2ME with JDEVELOPER

    Hello
    I want to try j2me applications with my jdeveloper
    what I must to do
    For example Must I download some libraries or something else ??
    Is jdeveloper sufficient for developing j2me applications.
    thanks for your support.
    best regards
    kivanc.

    You need the wireless extension to JDeveloper.
    Check out
    http://otn.oracle.com/tech/wireless/appdev/jdeveloper.html
    and http://otn.oracle.com/tech/wireless/index.html
    for more details

  • J2me with ejb

    can ejb with j2me so that my j2me application can communicate with database on server side to retrive data from it. If so please let me know about this as if its not possible the is there any other means to do so
    thanks
    viron

    If EJB like RIM? I'd guess not, you would have to have a HTTP/servlet go between.

  • J2ME with ODBC/mySQL/JDBC

    hi all,
    is there anyway to make a connection to a MSAccess file?
    then from there, getting info from it and returning the inputs to the file?
    above queries are for usage on J2ME.
    T.N. J2ME has a language limited to javax.microedition.*
    regards and thanks in advance,
    Nicky

    Have you tried using a JDBC-ODBC bridge driver??i'm a newbie to J2ME,.. and everything else except basic java.
    can u kindly explain and guide me thru it?
    one more thing is, can it work with J2ME??
    Nicky.

  • J2me with servlet

    hello experts
    Sir i want to call a servlet program in a j2me program i have found a program related to my requirment on
    net. But there is a problem that when i run as it is program according to net i give url="http://www.mycgiserver.com/servlet/corej2me.WebsiteDemo_CallServletGET"on my toolkit it is runing correct,
    but when i give url according to my system for servlet like "http://localhost:8000/servlets/CallServletGET"
    when i click submit button for calling to servlet
    then its it is giving error that "Unable to read data" . my coding is like this
    if (http.getResponseCode() == HttpConnection.HTTP_OK)
    iStrm = http.openInputStream();
    // 2) Get header information - none
    // 3) Get body (data)
    int length = (int) http.getLength();
    if (length > 0)
    byte servletData[] = new byte[length];
    iStrm.read(servletData);
    // Update the string item on the display
    fmMain.append("You passed to the servlet: \n" + new String(servletData));
    else
    fmMain.append("Unable to read data");

    When you post code, please use[code] and [/code] tags as described in Formatting Help on the message entry page. It makes it much easier to read.
    Please post the full error. If this is running on an emulator, please post the stack trace ( throwable.printStackTrace() ).
    Which phone is it running on? (Suns WTK, Nokia, etc?)
    Is the Servlet being called (as some debug lines into the servlet ([url http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/package-frame.html]java.util.logging ). )

  • J2ME with mySQL/ODBC/JDBC

    hi all,
    is there anyway to make a connection to a MSAccess file?
    then from there, getting info from it and returning the inputs to the file?
    above queries are for usage on J2ME.
    regards and thanks in advance,
    Nicky

    I think the JDBC can give you the tools to do this. This is exactly what it is designed for.
    Look at the instructions for it.
    I have reviewed it quickly and it appears the process is supposed to go something like this:
    Set up your connections to the database. 'Access' should be easy to get connections lined up for as it is a common database program.
    Write a little SQL script in your java app to get the data you want.
    Dont know what J2ME so if it differs from the current java programming language - what J2DK (java 2 development kit)? then it might not do this like this, but it should.
    Hope this is helpful.
    ctavares1

  • J2me with sms

    hello sir
    i am sorry i could not explain my problem to you so i am again telling my problem.
    i have made a program on wap for "on line sale purchase of cars " for globe communication.
    now i want that if user want to login in our site though mobile then he send a sms to our site and when
    we recive that sms then that page for car sale or purchase should be open.
    i want that user need not to login our site it should be through sms.
    plz reply as soon as posible.

    J2ME won't help you here. Try googling for "WAP Push messages". A WAP push message is an SMS message that contains a URL and when the users opens the message he is redirected to that url.
    shmoove

  • J2me with swing supprt

    Hi
    In CDC whitepaper, it is mentioned that Swing is supported as optional package.
    And AGUI is supporting that. Does any one know, currently it is supported with CDC with personal profile?
    Is currently AGUI package is available?
    Thanks
    bee

    Savaje,
    Has implement the JSR 209 in their new phone:
    https://www.savaje.com/3GSM/savaje_ds_2006.pdf
    You can also use their extension to the Netbeans Mobility Pack to develop apps for it.
    Bruce

Maybe you are looking for

  • External Hard Drive and Time Machine Help

    Just purchased WD My Book Essential external hard drive.  I would like to back up the files on my macbook pro, but I am unsure what to do with time machine. How should I go about backing up my files?

  • Problem with the login in analysis

    Hi All, I am trying to login to analysis page as an admin user using the credentials of weblogic which i gave during the installation of OBIEE but the login process fails giving an error"Invalid username and Pssword". the same credentials when i am p

  • Currency Conversion TAB is Disabled in Query Designer !

    Hi All   When I create a selection under STRUCTURES, currency conversion tab becomes disabled...wheras if I create a FORMULA, I can see the Currency conversion TAB... But I need to do the conversion in SELECTION KEY FIGURE..Could I know why that happ

  • HT203822 Continuing problems with Apple TV

    My AppleTv had been working very well with the airplay on my Mac for a year. For awhile doing a 'settings reset' solved the problem but lately I must connect Apple Tv to Itunes and replaced the Apple TV software. Then everything works fine for a day

  • Need Urgent Help on Currency Conersion Routine

    Dear Experts, I am new to BW routines concept. I have to do currency conversion on a key figure, if local currency is not in GBP, i have to convert it to GBP(Cube1 has local currency as GBP and cube2 has local currency as EURO, i need to load data fr