Re: generate WAP

JIAQI_LI <[email protected]>
Newsgroups gmane.comp.java.springframework.user
Message-ID <[email protected]>

Sascha Hüdepohl-2 wrote:
> 
> Hi!
> 
> How can i generate WAP with jsp?
> 
> Especially how can i create all the necessary tags for
> WAP-forms?
> 
> Thanks for any suggestions.
> 
> Sascha
> 
Hi Sascha,

I assume you are referring to generate WML using jsp.
It's basically the same as how you generate HTML, which is, embed jsp code
in your page source.
However, because it is a .jsp file, you have to explicitly set the content
type to text/vnd.wap.wml in order to tell the WAP browser that it is WML not
HTML. I attach an example below:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<% response.setContentType("text/vnd.wap.wml"); %>
<wml>
  <card id="card1" title="WML Form">
    <p>
      Data received at the server:<br/>
      Name: <%= request.getParameter("name") %><br/>
      Gender: <%= request.getParameter("gender") %><br/>
      Which part of our WML tutorial do you like?
      <%= request.getParameter("tutorial_part") %><br/>
      temp_id: <%= request.getParameter("temp_id") %>
    </p>
  </card>
</wml>

This example is copied from http://www.developershome.com/wap/wml/ which is
a brilliant WML tutorial.

Best Regards,
Jiaqi
-- 
View this message in context: http://www.nabble.com/generate-WAP-tp17059050p23097963.html
Sent from the springframework-user mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Springframework-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/springframework-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.