Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2ME and JSP

 
Preety Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I got one doubt that assuming i already have a full fleged JSP
application with ORACLE as the back end. what are the issues involved AND need to be addressed if i just want to extend this application to cater for palm and mobile users via J2ME..
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The good news is that MIDP, and likely all CLDC profiles wil support HTTP (I forget if that'sexplicitly in the CLDC spec). This means you can view you JSP pages.
The bad news is that you probably have some serious modifcations to make to get your app to be viable on such a small device. Additionally, if you are doing anything which needs to be secure, it will likely be very slow. (The latter isn't always true, you can hand tune the byte code, but this is very difficult.)
--Mark
 
Preety Agarwal
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark
it gives me some idea...i need to inveastigate further on this area and under some of the terminolgoes ...i am a J2ME DUDE..he he he.....
Preety Agarwal
 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In MIDP, if it supports HTTP, are there any web servers for these devices to withstand request and response
 
Rohini Sulatycki
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would be interested in this as well.
Thanks,
Rohini
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anil Vupputuri:
In MIDP, if it supports HTTP, are there any web servers for these devices to withstand request and response


I don't follow.
Because HTTP is a standard protocol, a J2ME client can make the HTTP to any server that supports it, which is quite a large number, e.g. every web server. Now the HTTP response form most of the servers will probably be far bigger than you'd like on a mobile device. Generally speaking, one would write extra servlets to handle HTTP requists from J2ME devices, servlet's which format the content for small screens. Does that answer your question?
--Mark
 
Anil Vupputuri
Ranch Hand
Posts: 527
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Herschberg:

Generally speaking, one would write extra servlets to handle HTTP requists from J2ME devices, servlet's which format the content for small screens. Does that answer your question?
--Mark

Okay. I wud like to know whether these small devices can understand HTTP requests & responses. To my ignorance, I believe that these devices understands only WAP but not HTTP, correct me if Iam wrong. Are there any API's which dealt with
writing servlets for these small devices.
Thx.
Anil
 
Nizan Horsefield
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anil
You seem a little bit confused as to what J2ME can do and how it differs to WAP. This link should take you to a topic where I have tried to explain the differences in lay-mans terms and provided a link for each. http://www.javaranch.com/ubb/Forum41/HTML/000236.html
Hope this helps
Niz :-)
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Anil Vupputuri:
Okay. I wud like to know whether these small devices can understand HTTP requests & responses. To my ignorance, I believe that these devices understands only WAP but not HTTP, correct me if Iam wrong. Are there any API's which dealt with
writing servlets for these small devices.

MIDP requires HTTP support. Most other profiles likely will, too, probably all of them. SO you can write a MIDlet which can send HTTP get and post requests to a server.
The server can be implemented anyway you want, as long as it supports HTTP; but if you're using Java, you'd use servlets. You would just use the standard servlet API, but simply make sure the content of the HTTP response generated by the servlet was appropriate for the device (wrt small screen and limited bandwidth).
WAP is simply a protocol put out by a standards group (IETF?). A particular hpone may or may not support it. The MIDP spec doesn't say anything about it. It's unlikely other J2ME profiles will acknowledge it either. In fact, I was at a talk earlier today in which the speaker hinted that the motivations for WAP were apparently not quite true, and so there is some movement to phase out the W* protocols.
--Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic