|
Question : Adding WAP support
|
|
Hello, Has anyone any experience what could be the nicest way to add WAP support to existing Web application build with servlets and jsps? Web application uses MVC model 2 type pattern. Application should only support html and wml generation so, XML/XSLT type solution is not neccessary. Content genaration can be in they own jsp specific files. I would like to add WAP support so that existing code would be as untouched as possible. This kind of questions comes to my mind: - should wml and html pages be handled in different controller servlets? - Is it realiable to trust http header's information which tells that client is wap device or browser, or is it better to assign e.g. different urls or ports to both client type? - what are the advantages and disadvantages if I would make two separate war files to both wap and html generation?
Any suggetions and links to documents considering this kind of issue is appreciated.
br mila
|
Answer : Adding WAP support
|
|
I have an app which has a web interface. I added a WAP interface.
1. On entry to the top level (by my customers the domain name) I looked for an Accept header which told me wml was accepted and routed to my WML "directory". HTML and WAP are different.
2. I found that I had to make MAJOR changes to accomodate the small screen size :-
User enters search terms, HTML page returns 30 of x hits (with next and previous, first and last), each line is a link to the FULL information display. User clicks link and gets full display.
On WAP, I display "x hits found" and display the first entry in full. The screen size is soooo small I could only get a couple of "short" forms to make reasonable links.
My HTML pages are full of "useless" but "nice to look at" information. In WAP its minialist.
3. I found that cookies were not accepted everywhere (unlike Amex :) )
To track user after login I send a session ID (which is a ramdomly generated "funny" number) as a cookie. I didn't always get it back. So I have to carry the ID as an extra postfield or as an extra parameter in the URL in *ALL* links which I make. I do this with smart tags but its still a pain. Mind you, if I updated my HTML I'd have a solution when people turn cookies off.
4. I'd advise against an extra port or a non-top level URL. It's a pain hacking this into your phone. A www.normalsite.com which serves up HTML and WAP is easier for the customers to handle.
5. "....documents considering this kind of issue is appreciated"
I started off with "Dynamic WAP Application Development" by Foo,Hover and Lee from Manning Press. That told me the basics, but the rest was just experience. I also learnt not to overload the phone's buttons, because the users just can't hack it. In the end I went for the simplest presentation possible - which probably has resulted in an excessive use of anchor tags :)
HTH
|
|
|
|