..:: J.S.I.S. ::..

(return to home page)



Mobile Wireless Support
(by M. Mamedov)

also visit >>
     // Using CGI // WAP vs. J2ME (under constr.) //
Using CGI in J2ME

(From : MIDP Inter-Communication with CGI and Servlets
By Qusay Mahmoud
Release 1.0
February 2001, wireless.java.sun.com)




Here I will try to explain how CGI and Mobile Device Interaction is made with J2ME.

When using a wireless device for Internet browsing, such as a cell phone, one of the most frequent actions a user performs is to submit data in a form, such as a login box.

A little bit about Servlets

Similar to CGI, servlets support a request and response programming model. When a client sends a request to the server, the server sends the request to the servlet. The servlet then constructs a response that the server sends back to the client

When a client request is made, the service method is called and passed a request and response object. The servlet first determines whether the request is a GET or POST operation, then calls either the HttpServlet.doGet or HttpServlet.doPost method as appropriate. Both the doGet and doPost methods take request (HttpServletRequest) and response (HttpServletResponse) objects as parameters.

Invoking a CGI Script from a MIDlet

lj kjl