WAP builds Java applications (SendRedire can not maintain session)

xiaoxiao2021-03-06  25

WAP construction Java application

Introduction:

Background: J2EE and WAPWAP Application Design Considering Establishment Example App 200 About Author

Make full use of existing EJB to make the action human resources strong

AASHISH PATIL

Ash01@vsnl.net)

Master of Science, Department of Computer Science, Southern California University

July 2001

If your company has rely on using multiple layers of business Java applications, then you may be more close to wireless technology than imagination. Through the description of an example application, Aashish Patil shows you how to connect your existing enterprise Java infrastructure to the wireless network with minimal human resources. Use existing EJBs, modified servlets, and new WML and WMLScript pages that make this process makes a leap.

Wireless Application Protocol (WAP) can improve the value of an existing Web architecture. If you have already used the company Java app, you can easily integrate them with WAP services, which can provide useful information and functions for action human resources. In this article, I will involve using the basic elements of J2EE-related J2EE, and then build a WAP / Enterprise Java sample application to show you how to connect your EJB to the wireless network.

Background: J2EE and WAP Before reading this article, you should have a basic understanding of the Java 2 platform, Enterprise Edition (J2EE) architecture. You can find more messages about J2EE through the following reference sections. As a review, the following is a schematic diagram of a typical J2EE application designed for a table.

Figure 1 - J2EE application structure

In Figure 1, the layer including JavaServer Page (JSP) and servlet is responsible for generating a dynamic HTML page. In WAP applications, this layer will generate a dynamic wireless tag language (WML) page. Therefore, in order to convert a standard J2EE application, you will have to write new JSPs, and in some cases, you have to write new servlets. Enterprise JavaBean (EJB) remains unchanged, because they have nothing to do with the information performance.

What is WML? As the web browser displays the information of HTML encoding, the device supports Wireless Markup Language (WAP) displays information about WML encoding; The function is embedded in the WML page. WML is a subset of XML, and it looks very familiar for those who are proficient in HTML or other label languages. WML has a unique characteristic need to be remember: it is like a box of cards; a single HTML file shows a single web file, and a single WML file can include a lot of cards. The screen of the WAP device can only display a card at a time. About Some of WML and WMLScript can be referred to the reference chart below.

Some people think that servlet does not need to be changed, or:: Just put the servlet's output of the Servlet to the JSP of the Generating Dynamic WML page is already enough. However, the servlet cannot distinguish from the desktop and the request from the WAP device; since the WAP application may not be able to implement all the features of the web-based architecture, this is not confused in this area, this is important. Also because of this, the staff is usually designed for WAP applications to design new servlets. However, in most cases, these servlets are very similar to servlets that provide similar functions based on the web-based architecture. Another component that does not appear in Figure 1 but a WAP application is a WAP gate. This component is responsible for the mutual conversion between WAP stacks and Internet stacks. 2 is a modification version of FIG. 1 showing a structure using a WAP device as a J2EE application using a WAP device: Figure 2 - The structure of the WAP / J2EE application is illustrated, all the requests from the WAP user to the web server must pass the WAP gate Tao transfer. Although WAP brakes can also be used as a WAP server placed on the WML / WMLScript page, it is more convenient to place these pages using a Web Server. There are many deployment methods for WAP. For most WAP applications, the gateway or deployed by a company provided by this application. The latter is more secure, we will explain later; however, if the user requested multi-purpose network access on their WAP device, an internal WAP gateway will be very inconvenient. Most non-ISPs don't want their brakes to access other websites other than their own websites; therefore, in order to access other websites, users will have to use ISP brakes. However, for each gateway used by the WAP user, the user must define a different connection, just like the Dial-up network of Windows 98- and on each device, the number of connected lines is usually limited. of. This increases the user's inconvenience and causes connection blocking in the WAP device when accessing a website. Consideration of WAP Application Design When using WAP, a man who habits to write J2EE applications will encounter some new challenges. The following is some of the issues you may encounter when you build a WAP application.

Can I display a few lines on the screen?

In fact, there is no particular limitation on how many lines showing, as long as it does not exceed the maximum size of the panel (different from the device). However, in order to avoid too much roll, each screen (ie card) is 5 to 7 lines.

What security issues should I consider?

Some phones do not support the use of Post methods to deliver the form. Therefore, the user name and password must be transmitted through the GET method. On the WAP gate, if the log function is activated and the request has been recorded, the administrator can see the user name and password. If the gate is provided by ISP or other third parties, this problem will be particularly prominent.

Even a secure connection does not completely eliminate security hazards. Those materials that are transferred to the WAP gate use WTLS (Wireless Transport Layer Security) encrypted, which uses the same algorithm as standard TLS. However, the information transmitted to the WAP gate is a binary encoding format (for WAP), so these encrypted information must be decrypted and encrypted with TLS to apply to the Internet. After a period of time, sensitive information appears in the form of clear text on the WAP gate. The hacker will transfer the message in the memory to the appropriate moment, which will successfully access these sensitive information.

According to the comment, a way to solve this problem is to set a WAP gateway in your own company (not ISP). In this case, a trusted person can manipulate the gate and can turn off the log function. You can also use WMLScript to write a custom encryption algorithm to encrypt the user-ended user name and password. This is only possible when using a simple algorithm; WMLScript is not strong enough to support the DES class.

How do I keep session?

WAP users do not support cookies. In this way, when the user shuts down between the different pages of your website, in order to retain the message on the client on the server side, a session ID must be transmitted as a parameter while transmitting each request to the server. The parameter name of the Session ID is different depending on the Servlet engine.

Sometimes, the preset session ID length increases the length of each request. As a result, the user-end or WAP gateway may see this request as an invalid URL rejection. This is necessary to shorten the length of the session ID. Check out some of the part of the session ID parameter name for the SERVLET engine you are using. If you have encountered an incorrect URL error, this documentation should also provide a guide to shorten the length of the Session ID.

Establish an example application XYZ LTD. is a company that produces PDA, wearable computers, and other popular computing devices. The company's sales staff visited customers, providing XYZ products on-site display; some showcases require sales staff to go far away to go to customers. So on the way, how do they receive a list of customers and other important information?

Using emails for this purpose, you will need to search for larger and expensive portable computers or never-end-ended netmas; it is more unrealistic. Instead, the salesperson of XYZ will receive information, such as mobile phones or PDAs through means of supporting WAP functions. Using an action device, the salesperson can provide timely feedback to the company when visiting customers. The company can immediately arrange to send goods to customers and maintain current sales statistics messages.

Our application has two main goals. First, our mobile salesperson should be able to use it on the WAP device to view the customer list. Second, if a customer wants to buy goods, the salesperson should be able to use the device to order orders. In addition, an important target of any WAP application should be to reduce the number of keys necessary for users. Due to the user interface restrictions of the user-held device, the amount of data that the user needs to be entered should be controlled at least.

This is a flow chart showing the architecture of our system.

Figure 3 - Schematic of application process

Users must first log in to access systems; then they can browse the customer's list and detailed information for each customer. If they want to order for a particular customer, they will provide them with a list of products, they can choose a specific product for the customer.

In most of this article, we will discuss the SERVLET and JSP program that implements the application and will take the way JSP and Servlet work together. About each JavaServer Page also attached to a diagram, showing the output of JSP on the screen screen.

Listing 1,

Login.jsp accepts the user name and password and calls the loginservlet as a parameter. For this and other JSP, the MIME type should be set to the TEXT / VND.WAP.WML type. While passing the request, the above login.jsp also passed a parameter called sessionID. It must be passed along with each request to serve the server. The parameter name sessionID is a reserved position; refer to the application server's instruction file, find the correct parameter name applied to your specific application server. Java method httpservletResponse.EncodeURL (String URL) Automatically joins the session ID; in our application, this has been widely used in the server. Login.jsp

<% @ Page ContentType = "Text / VND.WAP.WML"%>

->


Login name:

Password:

There is a problem when verifying a blank input field. There is an attribute in the Input sign, which let you make the input field not empty ..

A mobile phone user must access all independent dialog screens to enter the information. The problem has appeared, because the user prefer to choose directly to access the next box or the next card and do not want to enter the information through the dialogue screen. A user may miss the password and knock down when the screen is shown in Figure 4.

A staff can avoid this problem with the use of WMLScript validation (through the onclick event). However, until you enter a value to the input box, the variable you pass to the WMLScript function represents the change in the input field value began to be initialized. Therefore, if there is no password to type, it is passed to the file that is not initialized and the script error result. The solution to this problem is to verify all the input fields on the server side.

Listing 2,

LoginServlet is our problem solution: it can authenticate sales staff and record him in the system. It can also create a session for the sales staff on the server side. Note on the program block is clearly indicated where these jobs will be executed. Once successfully log in, the device displays the main options shown in Listing 3.

MainMenu.jsp).

LoginServlet

Import java.io. *;

Import javax.servlet.http. *;

Import javax.servlet. *;

Import javax.rmi. *;

Import javax.naming. *;

Import java.util. *;

Public Class loginservlet Extends httpservlet

{

/ *

The Salesman EJB IS An Entity EJB

* /

Salesmanhome home;

Salesman Salesman;

Public void init () THROWS servletexception

{

Try

{

System.out.println ("Trying to Get Initial Context");

Context IC = GetInitialContext ();

System.out.println ("Got InitContext");

Object objref = Ic.lookup ("Salesman");

System.out.println ("Got Obj Ref");

HOME = (SalesmanHome) PortableRemoteObject.narrow (Objref, SalesmanHome.Class);

System.out.println ("got home");

} catch (Exception E)

{

System.out.println ("ERROR in InIt");

E.PrintStackTrace ();

}

}

Public void doget (httpservletRequest Req, httpservletResponse res)

Throws ServleTexception, IOException

{

String name = NULL;

String password = NULL;

Try

{

System.out.println ("Withn");

/ *

The parameter names are 'Username' and 'password'

* /

Name = Req.getParameter ("UserName"); password = Req.getParameter ("password");

IF ((Name == Null) || (Name.Length () <= 0) || (Password == 0) || (Password.Length () <= 0))

{

Res. extendndRedirect (res.encodeurl ("/ status.jsp? code = 2"));

}

Name = name.trim ();

Password = password.trim ();

/ *

Try to see if a salesman by this 'name' exists. The Finder Method

FindbyName of the Salesman EJB, Does this. It Returns a java.util.collection

Object containing the results of the search.

* /

Collection user.findbyname (name);

IF (users.size () <= 0)

{

/ *

No Salesmen found by the specified name

* /

Res. Sendredirect (res.encodeurl ("/ status.jsp? code = 3"));

}

Iterator i = users.iterator ();

/ *

Iterate Throught The Search Results of FindbyName. Check if The Password of

Any Results Matches the Password Entered

* /

While (I.hasNext ())

{

Salesman Salesman = (Salesman) i.next ();

String Tmpassword = (String) Salesman.getPassword ();

PASSWORD.EQUALS (TMPPASSWORD))

{

/ *

Check if an old session exists. If it does the invalidate it and create

A New One

* /

HttpSession sess = req.getations (false);

IF (sess! = null) // a null is returned if an old session does not exist

{

sess.invalidate (); // Invalidate Old Session

}

Sess = Req.getSession (); // Create a new session

String ID = (string) Salesman.getPrimaryKey (); // get salesman's id

/ *

At this point the salesman has been validated and his id obtained. Store There

Parameters in the session.

* /

Sess.SetaTRibute ("Salesmanid", ID);

Sess.setttribute ("SalesmanName", Name;

Res. Sendredirect (res.encodeurl ("/ mainmentu.jsp");}

}

} catch (Exception NPE)

{

IF ((Name == Null) || (Name.Length () <= 0) || (Password == 0) || (Password.Length () <= 0))

{

Res. extendndRedirect (res.encodeurl ("/ status.jsp? code = 2"));

}

Else

Res. Sendredirect (res.encodeurl ("/ status.jsp? code = 1));

}

}

Private context getInitialcontext () THROWS NAMINGEXCEPTION

{

CONTEXT INITIAL = NULL;

Try {

/ *

There Are Other Methods of Of Obtaining The Initial Context Too. Check The J2EE DOCS AND

Your Application Server Docs for There.

* /

Initial = new initialContext ();

} catCH (Exception ne) {

System.out.println ("Unable to get an inTIAL context");

}

Return Initial;

}

}

MainMenu.jsp

<% @ Page ContentType = "Text / VND.WAP.WML"%>

->

Title = "View Clients"> View Clients log out

As shown in FIG. 5, the file displays two links on the device screen. The second of the second session; the first point to the current customer list. In the current version of the program process, salesperson must first select a customer from the list before starting any sales transactions; the list of sales products can only be displayed on the subsequent screens (later discussion). There are also other possible programminglines: For example, the connection used to send the user to the product list can be added to the main option. However, you should not provide too many links in either placement, otherwise the small screen for supporting WAP will become confusing. Tap the View Clients in the main selection of Figure 5 to call the clientViewServlet in the Call Listing 4, which obtains a list of customers who will be visited by the salesperson. Note on a program code describes how the servlet finds the message from the client. The servlet will then put the list in the Session item and call the clientList.jsp. (The session object mentioned herein is from the httpsession category from the Java Servlet kit.) ClientViewServlet

Import java.io. *;

Import javax.servlet.http. *;

Import javax.servlet. *;

Import javax.rmi. *;

Import javax.naming. *;

Import java.util. *;

Public Class ClientViewServlet Extends httpservlet

{

/ *

THIS servlet interacts with the client entity ejb. The Client EJB HAS A FINDER

Method, FindBysalesman. this method affepts the salesman id and obtains all the

Clients Whom this salesman is supposed to visit.

* /

ClientHome ClientHome;

Public void init () THROWS servletexception

{

Try

{

System.out.println ("Trying to Get Initial Context");

Context IC = (InitialContext) GetInitialContext ();

System.out.println ("Got InitContext");

Object objref = Ic.lookup ("client");

System.out.println ("Got Obj Ref");

ClientHome = (ClientHome) PortableRemoteObject.narrow (Objref, ClientHome.Class);

System.out.println ("got home");

} catch (Exception E)

{

System.out.println ("ERROR in InIt");

E.PrintStackTrace ();

}

}

Public void doget (httpservletRequest Req, httpservletResponse res) throws servletexception, ioException

{

Try

{

HttpSession session = req.getsession (false);

// Obtain the salesman id from the session.

String string strasmanid = (string) session.getattribute ("SalesmanID"); / *

Use the salesman id to search for clients what the salesman is supposed to

Visit.

* /

Collection Clients = ClientHome.FindBysalesman (strsalesmanid);

IF (clients.size () <= 0) // no clients found

{

Res. SendRedirect (res.encodeurl ("/ status.jsp? code = 4));

}

/ *

Create An Array of Vector Objects. Each Vector Object Stores The

Client ID - First Position in Vector

Client name - Second Position in Vector

Client Address - Third Position In Vector

IT THEN Stores this Array of Vector in the session

* /

Vector cinfo [] = new vector [clients.size ()];

Iterator i = clients.iterator ();

INT CNT = 0;

While (I.hasNext ())

{

Client Client = (client) i.next ();

CINFO [CNT] = New Vector (3);

CINFO [CNT] .add (client.getid ());

CINFO [CNT] .add (client.getname ());

CINFO [CNT] .add (client.getaddress ());

CNT ;

}

// Store The Array of Vectors in The Session. Each Vector REPRESENTS ONE Client.

Session.setttribute ("ClientList", CINFO);

// send Redirection to ClientListJSP.

Res. Sendredirect (res.encodeurl ("/ clientlist.jsp");

} catch (exception e) {

System.out.println ("Error While Obtaining Client List: E.GetMessage ());

Res. Sendredirect (res.encodeurl ("/ status.jsp? code = 1));

}

}

Private context getInitialcontext () THROWS NAMINGEXCEPTION

{

CONTEXT INITIAL = NULL;

Try {

/ *

There Are Other Methods of Of Obtaining The Initial Context Too. Check The J2EE DOCS AND

Your Application Server Docs for There.

* /

Initial = new initialContext ();

} catCH (Exception ne) {

System.out.println ("Unable to get an inTIAL context");

}

Return Initial;

}

}

Listing 5, ClientList.jsp Get a list of customers placed in the session by ClientViewServlet; it shows the customer's name, but not complete detailed information (see Figure 6). When a user is selected, the salesperson is directed to clientDetails.jsp. ClientList.jsp

<% @ Page ContentType = "text / vnd.wap.wml" session = "true" import = "java.util.Vector"%>

<%

// Obtain the client list, represented by an array of vector objects, from the session.

Vector cinfo [];

Cinfo = (Vector []) session.getattribute ("ClientList");

%>

<%

// Display Client Names from Cinfo []

IF (Cinfo.Length <= 0) || (CINFO == Null))

%> You Have no clients to visit today <%

Else

{

/ *

The Client List Consists of A List of Client Names.

Each name is a link to the clientdetailsjsp. The URL

For the link is constructed by appending the index

The Client List Array of Vector Objects. this

Is the index to the Vector Object That this name IS

Represented by. The clientdetailsjsp Uses this

INDEX TO OBTAIN THE SPECIFIC Vector Object from the

Client List Array and Display The Details of The DITAILS of THE

Specific Client. Remember That The Client List IS

Stored in the session.

* /

For (int i = 0; I

{

%>

Note: The work of the display of the customer is complete by three separate parts - ClientViewServlet, ClientList.jsp, and ClientDetails.jsp. What is the reason why this is designed? 1. The authority of most J2EE architectures suggest that JSP should not access EJB directly; and the intermediates such as servlet should be used to interact with EJBs. ClientViewServlet Access EJB and get a list of customers. 2. This application can be designed so that all user messages are included in a single WML file. In this architecture, the customer list includes on a card in the WML box, while the detailed information of a single customer will include different cards in the same box. However, the single file may include too much information so that it cannot be downloaded immediately for a low frequency WAP device. If the number of customers is too large, the total amount of information generated is easy to exceed the maximum capacity allowed by the WML card box. (The maximum capacity is different from the device; if the maximum compilation card case capacity of NOKIA 7110 is 1.3 KB). So we use two JSPs.jsp.ClientList.jsp- Display customer list, and ClientDetails.jsp - Display a single customer detailed information. Listing 6, ClientDetails.jsp Accepts the index number of the customer array as a parameter, where the index number appears in the session. Next, it gets detailed information from the selected customer and display. If the sales staff wants to order under the customer, he will only knock the items button. This will call Listing 7, ItemListServlet, and display the optional product of the order.

ClientDetails.jsp

<% @ Page ContentType = "Text / VND.WAP.WML"%>

<%

/ *

Obtain the client list from the session. Get the index of the vector object, representing

The Specific Client, from the URL. For a description of the structure of each Vector Object See

Comments within clientviewservlet.

* /

Vector cinfo [] = (Vector []) session.getattribute ("ClientList");

INT INDEX = 0;

Try

{

INDEX = (int) integer.parseint (Request.GetParameter ("ind"));

} catch (Numberformatexception NFE) {}

%>

ID: <% = cinfo [index] .GET (0)%> address: <% = cinfo [index] .get (2)%>

Context IC = (InitialContext) GetInitialContext ();

System.out.println ("Got InitContext");

Object objref = IC.lookup ("item");

System.out.println ("Got Obj Ref");

ItemHome = (itemHome) PortableRemoteObject.narrow (Objref, ItemHome.Class);

System.out.println ("got home");

} catch (Exception E)

{

System.out.println ("ERROR in InIt");

E.PrintStackTrace ();

}

}

Public void doget (httpservletRequest Req, httpservletResponse res) throws servletexception, ioException

{

Try

{

HttpSession session = req.getsession (false);

String Clientcode = (String) Req.getParameter ("client");

/ *

Store The Client Code In The Session. This Code Is Sent by The ClientDetailsjsp Along with The Request.

* /

Session.SetaTRibute ("ClientID", ClientCode;

Collection items = itemhome.findall (); // find all items.

IF (items.size () <= 0) // no items for sale {

System.out.println ("Items Size:" Items.size ());

Res. Sendredirect (res.encodeurl ("/ status.jsp? code = 3"));

}

Vector itminfo [] = new vector [items.size ()];

ITerator i = items.Itemrator ();

INT CNT = 0;

/ *

Structure of Each Vector Object

Item ID - First Position In Vector

Item name - Second Position in Vector

Item Description - Third Position in Vector

* /

While (I.hasNext ())

{

Item item = (item) i.next ();

Iteminfo [CNT] = New Vector (3);

Iteminfo [cnt] .add (item.getid ());

Iteminfo [cnt] .add (item.getname ());

Iteminfo [cnt] .add (item.getdescription ());

CNT ;

}

Session.setttribute ("itemlist", iteminfo); // Place the item list in the session.

Res. Sendredirect (res.encodeurl);

} catch (exception e) {

System.out.println ("Error While Obtaining Item List: E.GetMessage ());

Res. extend / www.wapforum.org / dtd / wml_1.1.xml>

<%

/ *

THE PLACE ORDER OBTAINS The Item Code from The Index Passed To It. It THEN PLACES THIS

The session.

* /

INDEX = Integer.Parseint (Request.GetParameter ("ind"));

Vector iteminfo [] = (Vector []) session.getattribute ("itemlist");

Session.SetaTRibute ("itemid", iteminfo [index] .get (1));

%>


Quantity:

PlaceRDER.JSP Accepts from the user via an input field the number of items there..

IT THEN Places An Order by Calling PlaceRServlet.

PlaceOrDervlet.java

Import java.io. *;

Import javax.servlet.http. *;

Import javax.servlet. *;

Import javax.rmi. *;

Import javax.naming. *;

Import java.util. *;

Import java.sql. *;

Import javax.sql. *;

Public Class PlaceOrDervlet Extends httpservlet

{

CONTEXT IC;

Orderhome home;

Javax.sql.datasource ds;

/ *

The PlaceRder Servlet First Contacts The Data Source Directly and Obtains The Highest

Primary Key Value (I.e. The Order ID). It kiln The next primary key value.

IT THEN CREATES A New Order Entity EJB, Which Corresponds To The New Order Placed. The Order

CONSISTS OF THE ORDER ID, SALESMAN ID, Client ID, Item id and the quantity of items orderd.

* /

Public void init () THROWS servletexception

{

Try

{

System.out.println ("Trying to Get Initial Context");

IC = (InitialContext) getInitialContext ();

System.out.println ("Got InitContext");

/ *

Lookup the datasource of this application. The name 'WAPDB' is recognized by the

Application Server from The Configuration FILES.

* /

DS = (javax.sql.datasource) Ic.lookup ("WAPDB");

System.out.println ("Lookup for DS successmeded);

Object objref = Ic.lookup ("ORDER");

HOME = (ORDERHOME) PortableRemoteObject.narrow (Objref, ORDERHOME.CLASS);

System.out.println ("got home");

} catch (exception e) {

System.out.println ("Error In InIit of PlaceOrDervlet:" E.GETMESSAGE ()); E.PrintStackTrace ();

}

}

Public void doget (httpservletRequest Req, httpservletResponse res) throws servletexception, ioException

{

Try

{

HttpSession session = req.getsession (false);

String salesman_id = (string) session.getattribute ("SalesmanID");

String client_id = (string) session.getattribute ("clientID");

String quantity = (string) Req.getParameter ("quant");

String item_id = (string) session.getattribute ("itemid");

String maxORDERID = NULL;

Connection conn = ds.getConnection ();

// Get the max ORDER ID

PreparedState S = conn.preparestatement ("SELECT MAX (ID) from ORDER_INFO");

S.ExecuteQuery ();

ResultSet RS = S.GetResultSet ();

While (rs.next ())

{

MaxorderId = rs.getstring (1);

}

MaxorderId = maxORDERID.TRIM ();

Long ORDERID = long.parselope (maxOrder);

// increment the old max ID to iptain the new one.

ORDERID ;

String neworderid = "" ORDERID;

// CREATE A New Order EJB CORRESPONDING to the Order Just Placed.

Order Order = Home.create (NeworderID, Quantity, Item_ID, Salesman_ID, Client_ID);

String Time = Order.getTime ();

Session.setttribute ("ORDERID", Order.getPrimaryKey ());

Session.SetaTRibute ("Ordertime", Time);

Res. Sendredirect (Res.EncodeURL ("/ confirm.jsp"));

} catch (Exception E)

{

System.out.println ("Error in Doget of PlaceOrVlet:" E.GetMessage ());

E.PrintStackTrace ();

}

}

Private context getInitialcontext () THROWS NAMINGEXCEPTION

{

CONTEXT INITIAL = NULL;

Try {

/ *

...............

* /

Initial = new initialContext ();

} catCH (Exception ne) {

System.out.println ("Unable to get an inTIAL context");

}

Return Initial;

}

}

PlaceOrDervlet obtains the ID of the salesperson, customer and product from the session. A new order can then be generated through the establishment of a new Order Entity EJB. The order of success is displayed and the order of the order of the order is displayed. In this version of the app, the salesperson is the only choice after the transaction is to return to the primary menu (see Figure 9). You can also modify the program code so that the user returns to the customer or product list. If you pay attention to observation, you will find that the salesperson input only two information: login and when entering the number of purchases to the customer.

About program code includes all JSP and Servlet code this document, including the required EJB program. EJB's JAR file and deployment description items are also included. All screenshots are from the Nokia WAP Simulator 2.0.

Conclusion As mentioned earlier, WAP applications provide very good value-added services. An isolated WAP application is not available. However, such an application can easily integrate into an existing Web application architecture in an existing web application architecture. The only new hardware you need is a machine and a software for WAP brakes; if you are using your ISP's gateway, then this overhead can also be saved.

The existing HTML page needs to be converted to WML. However, WML is not as complex as HTML because it does not support many features of HTML. Therefore, this is not a fee.

WAP also supports pictures in wireless Bitmap (WBMP) format. However, users who use WAP devices spend a lot of money on the connection time, they are more interested in direct effective information rather than luxurious interfaces. Unless the picture itself can pass a message, it will provide a fast message than the frequency width and time to transfer the picture better.

Last Notes: Although the simulator can provide a good environment for testing WAP applications, only when it matches the deployed WAP gateway, WAP applications are executed on all possible target WAP devices. Fully tested. All dynamically generated pages are compiled on the gateway. Therefore, it is necessary to know which version of WAP is supported. If the gate compiler uses only WML 1.1, the page written in WML 1.2 is unused.

Reference

Get the J2EE introduction (free registration) from Sun's Java staff. The "WAP website creation" (DeveloperWorks, 2001) written in Bilal Siddiqui, is very well introduced to WML and WMLScript. Get more information about WAP, WML and WMLScript from the WAP Forum, which is a separate organization that is committed to maintaining WAP standards. IBM's WebSphere Application Server can be used to perform the applications mentioned herein. You can download the WAP Lane Software and WAP Device Simulator from NOKIA. Salmon and IBM bring business Java technology for your wireless network. Returns the westline of developerWorks or Java technology zone for more information on wireless and Java technology.

A bachelor's degree from the computer engineering department of the Thadomal Shahani Engineering Technology of India Mumbai shortly after AashiSh Patil. In Tata Consultancy Services, he completed a project for the stock trading supporting WAP as an intern; this article is a direct part of the item. This fall, he will go to the University of Southern California to study a master's degree in computer science. ASHISH can be connected through the ASH01@vsnl.net.


New Post(0)