Wml in jsp

I written my wml in jsp. However, when i use nokia simulator to test. It give me a error saying mime type not supported. I had written:
<%
response.setcontentType="text/vnd.wap.wml";
%>
Do anyone know why???
Please help me. I need to rush my project.
Thanx you.

I wrote my wml pages a while ago, but I remember that I set the mime type with page directive and it needed to be before <?xml...>-tag.
Like this:
<%@ page contentType = "text/vnd.wap.wml" %><?xml version="1.0" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
Hope this helps,
KK

Similar Messages

  • Connecting databeses with WML and JSP pages..!

    I need information about how to connect databases with wap technologies using wml and jsp , I am waiting your resources, codes and helps.. And I would like to remind you , I am beginner about this topic , Only things that I know are Jsp and WML , I have no experience about wap and how to combine wml and jsp , So please be helper while you send your messages , If all your messages contains much detailed and supported complete sources and files , it will more helpfull for me ..
    Thanks in Advance.
    P.S : 1- ) if you want to contact direclty , mail address : [email protected]
    2-) Don't post me complex references' URL , I have already made search on google,yahoo and etc

    Additionally , I would like to learn what I have to need for this project .. Now , I already have winwap wap emulator and Websphere Studio.. Do I need special wap server or something else to test my applications..
    Please , hurry up .. I really need your helps..
    Ergin

  • WML via JSP

    How do i submit the values from wml to jsp pages and how do i get back the result from jsp to wml?
    thanks in advance

    I wrote this, but the WML skip the JSP codes and just show the HTML stuff. Any idea why it is?
    thanks in advance
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
    <card id="npnoteswml" title="Notepad notes">
    <<%="do"%> type="prev" label="back">
                             <prev/>
    </<%="do"%>>
    <p>
    <table>
    <tr>
    <td><b>Date:</b></td>
    <td><b>Notes:</b></td>
    </tr>
    <%@ page import="notepad.user.*,java.util.*" %>
    <%
    Collection c = (Collection)request.getAttribute("userNotes");
    if ( c != null ) {
    for (Iterator it = c.iterator();it.hasNext();) {
         User user = (User)it.next();
    %>
    <tr>
    <td><%= user.getCreatedDate() %></td>
    <td><a href="npviewwml.jsp?msgId=<%= user.getMsgId() %>"><%= user.getName() %></a></td>
    </tr>
    <%
    else {
    %>
    <tr>There is no notes.</tr>
    <%
    %>
    </table>
    </p>
    <p>
    New note
    </p>
    </card>
    </wml>

  • How WML and JSP can be configured in Tomcat 4.0 just as HTML and JSP

    hello all of my friends!
    Currently i am working on wap development but i cant find any thing to run my application, i am using Tomcat 4.0 can u plx help me and tell me how can i run Wml in tomcat( what configurations are required?) the application will work just as html-------JSP-Webserver.......ThankYou.

    You can work just like you did with html, but replace your content with wml-tags. I usually check for the accept-header in the http-reqest, to separate wap-users from web-useres:
    if(request.getHeader("accept").indexOf("text/vnd.wap.wml")>=0){
       response.setContentType("text/vnd.wap.wml");
    <xml version=1.0 DOCTYPE .........>
    <wml>
       <card ..>
    </wml>Also, your webserver must support this mimetype. Tomcat 4 has that, but to be sure, check in server.xml, it holds a long list of mime-associations.
    good luck

  • Embeddding WML in Jsp and running in TOMCAT?

    I have written wml programs...and the required connection class to extract data from the database...i have also made a jsp page in which i have embedde the wml..as is done with html.
    The problem is i am not able to run these wml programs in the browser?

    Probably the Context named test has not been
    created. Check on the admin console!I do this http://localhost:8080/manager/deploy?path=/test that's work but each time I stop Tomcat, when I restart, I have to do it test is not in the list after restart
    An idea ?
    Thanks,

  • SQL query with JSP and WML-parameters

    Hey,
    Could you help me?
    I'm trying to do the following. WML deck card 1 send parameter to same WML deck's card help. I try to read the parameter with JSP in card help by putting the parameter to SQL query, but it doesn't work. I can read the parameter with WML in card help. I can also print the value of the parameter with JSP if I generate WML with JSP.
    /*parameter sending from card 1 to card help*/
    out.println("<go href='#helpcard'>");
    out.println("<setvar name='valittukurssi' value='$(valittukurssi)'/>");
    /*parameter read with WML in card help */
    <p>Valitse kurssi.
    $valittukurssi</p>
    /'parameter read with JSP by generating WML with JSP*/
    out.println("<p>$valittukurssi</p>");
    /* SQL query with JSP */
    ResultSet uudettulokset = uusilause.executeQuery("select * from kurssi where lyhenne='$valittukurssi'");
    Thanks,
    Rampe

    You're problem is easy to fix. You're confusing WML variables with JSP variables. See below:
    >
    /*parameter sending from card 1 to card help*/
    out.println("<go href='#helpcard'>");
    out.println("<setvar name='valittukurssi'
    value='$(valittukurssi)'/>");
    Above you set a var that will work on the phone, not in JSP.
    /*parameter read with WML in card help */
    <p>Valitse kurssi.
    $valittukurssi</p>
    Yes the above does display the parameter, because it is a client side WML var, but you cannot use this variable in the JSP code (that's why your SWL fails).
    /'parameter read with JSP by generating WML with
    JSP*/
    out.println("<p>$valittukurssi</p>");Here's you're problem, the above line is EXACTLY the same as the one before it. When the container parses through this JSP code it translates the above line to:
    <p>$valittukurssi</p> on the WML page and the CLIENT uses it's local variable to display it.
    What you need and want is to have a variable that can be used in JSP code and output to your WML page. Here's how it's done:
    out.println("<go href='#helpcard'>");
    String some_name = "valittukurssi";
    out.println("<setvar name='"+some_name+"'
    value='$("+some_name+")'/>");
    //note that you may have to escape the ( and ) with a \
    //so we displayed the variable above into the WML page, now we can use it in the SQL query:
    /* SQL query with JSP */
    ResultSet uudettulokset =
    uusilause.executeQuery("select * from kurssi where
    lyhenne='"+some_name+"'");//the end of the command is: " ' " ) ;
    Frank Krul
    Got Node?

  • WAP-WML IDE

    Hi all,
    I dont know whether its a right palce to post this question or not. Sorry,if its not
    I m developing a site which can be viewed on any mobile so.
    I need it to develop it using WML with JSP..
    As netbeans doesnt provide WML simulator i need a good ide fulfills all the requirements.
    Does Sun One Studio supports it?
    Or plz suggest me a good ide

    I think the problem maybe thatmy old phone is with another telco which is providing the WAP Gateway to compile the WML to WMLC and the dual browser phone company (Vodafone) is not passing the connection request through the gateway.
    I will visit a Vodafone support centre today and see what comes of it.

  • Calling wml script function in jsp?

    how can i write/call wml sciprt function(for doing client side validations) in a jsp?
    becoz we are using wml code in jsps, but we are not using any wml script functions for client side validations.
    please help me ...

    What do you mean by "wml".. Java server pages are a server side technology. They do not execute on the client.

  • To put WML Content  in JSP.?

    hi all....i m working with one mobile application ..in that i want to put my wml content in jsp ....can i put all wml content and tag in jsp ......if yes then could u give me sample for that one so it will be appriciate me....
    regards.....

    The only thing you can watch on AppleTV that ISNT in your iTunes library is photos. Everything else must be there.
    I'm not sure why you remove things from iTunes after syncing with your iPod, but that shouldn't be necessary...
    Your media does not have to "live" on your MBPro hard drive to be in your iTunes library. I highly recommend using an external drive to store everything and just use a "home" and "travel" iTunes library if needed to keep things separate. As it is, I use a single iTunes library and manually sync to my iPhone.

  • Sending an email through JSP and WML

    I am trying to send an email through jsp in wml, i think i have everything set up properly with regards to tomcat however I keep getting the error
    "Invalid element 'PCDATA' in context of card expected on event ....."
    The line of code in which this occurs is           
    <jsp:setProperty name="mailer" property="*"/>
    I was wondering if anyone would be able to help me with this and be able to tell me why it thinks this is PCDATA and not jsp code.
    Any help would be much appreciated.

    Check out:
    http://jakarta.apache.org/taglibs/index.html

  • WML Variables with JSP

    Hello,
    I'm trying to build a site that can handle my wml Variables through JSP. Like this:
    <\%@page language="java" \%>
    <\%@page import="java.sql.*,java.text.*,java.util.*"\%>
    <\%@page import="db.*"\%>
    <%
    String statement = "";
    String menueDate = "";
    String description1 = "";
    String description2 = "";
    statement = "select menu_date, description, description02, SYSdate from menu "+
                "where to_char(menu_date, 'dd.mm.yyyy') = to_char(sysdate, 'dd.mm.yyyy')";
    Abfrage menue = new Abfrage("jdbc/kantine",statement);
    ResultSet getMenue = menue.abfrageAusfuehren();
    while (getMenue.next()) {
       menueDate = getMenue.getString(1);
       description1 = getMenue.getString(2);
       description2 = getMenue.getString(3);
    menue.abfrageSchliessen();
    %>
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" "http://www.phone.com/dtd/wml11.dtd" >
    <wml>
      <card id="eins" title="Tagesmenue" >
    <p align="center">
      <img src="images/TMLogo.wbmp" alt="TechnoMealLogo" />
      </p>
    <p align="center">
    Heute: <%=menueDate%>
    </p>
    <table title="Menue" columns="2">
    <tr><td>Hauptgericht: </td><td><%=description1%></td></tr>
    <tr><td>Suppe:</td><td><%=description2%></td></tr>
    </table>
    </card>
    </wml>If I want to run the site, my Browser is canceling translating, at the first '%' . How can I edit the Sourcecode that it works?
    Thanks
    J.M.

    Why the '\' in your page directives?
    <\%@page .... \%>You'll probably also need to change the content type to text/wml and may need to set up an equivalent mime type on your server.

  • JSP forwarding between WML pages

    Apparently some (not all) WAP browsers are very strict that the XML tag come first thing, no spaces, no blank lines.
    So when I forward from one JSP (which has an XML tag at it's very beginning) to another JSP page (which also has an XML tag at it's very beginning) it creates a problem on older browsers and they complain of the HTTP reply (that's what they call it) being empty.
    The forwarded to page is a login page that is never accessed directly, only through forwards, so can I remove the XML tag at the beginning to eleviate this problem?
    These browsers are so strict that I can't even place some JSP page tags before the XML as they result in a space or blank line. I love this stuff!

    Try to put this code in the top of the jsp, if you didn't do yet.
    <%@ page contentType="text/vnd.wap.wml" %>
    <?xml version="1.0"?>

  • JSP + WML

    Tools : Nokia internet Toolkit
    Tomcat 4.1
    Eclipse 2.1
    I m using nokia internet toolkit as my mirco-browser ...
    i couldn't view my jsp files in the mirco-browser ...
    Any form of help is welcome ...
    Thanx all ...
    Sample (Login.jsp)
    <%@ page import=" Controller.* " %>
    <%
    response.setContentType("text/vnd.wap.wml");
    String userid = request.getParameter("userid");
    String password = request.getParameter("password");
    Controller controller = new Controller();
    boolean status = controller.validateLogin(userid , password);
    if(status == true)
    else
    %>
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
    "http://www.wapforum.org/DTD/wml13.dtd">
    <wml>
    <!-- Possible <head> elements here. -->
    <template>
    <!-- Template implementation here. -->
    <do type="prev"><prev/></do>
    </template>
    <card id="card1" title="Card #1">
    <do type="unknown" label="Next">
    <go href="#card2"/>
         <postfield name="userid" value="$userid"/>
         <postfield name="password" value="$password"/>
    </do>
    <!-- Additional <do> elements here. -->
    <p align="center">
    <!-- Card implementation here. -->
    <big><b>First Card</b></big>
         User ID : <input type="text" name="userid"/>
         Password : <input type="text" name="password"/>
    </p>
    <!-- Additional <p> elements here. -->
    </card>
    <card id="card2" title="Card #2">
    <p align="center">
    <big><b>Second Card</b></big>
    $(status)
    </p>
    </card>
    </wml>

    I would start by removing the WML and putting it in a
    standalone file and make sure that the WML is okay.
    I would also make sure that this line:
    <?xml version="1.0" encoding="utf-8"?>
    is at the absolute top of the page, even before the
    <%@ page directives.
    I've seen some XML parsers barfing on XML documents
    that don't have the XML declaration first thing. I
    had done some WML stuff a couple years ago, and I just
    remember figuring out the Nokia phones was a bit
    different then supporting the OpenWave browser (most
    Motorola phones, at the time).thanx ...
    i did the wml stuff before already ... everything was doing fine ... i place all the wml tags to .jsp ... no problem ...
    will try the other suggestion

  • Display jsp content into wml format for Mobile?

    hi..Currently i have many jsp's in my application and now i want to display the same content into mobile. the problem is that it looses the formatting... what are the ways to display these jsp's into my mobile web brower. any help in the same will be really appreciated. thanx.

    JoachimSauer wrote:
    You either need a browser that supports HTML on your mobile or produce WML instead of HTML in your JSPs.Or use XSLT to generate WML from the HTML that the JSP generates. As usual, nothing an additional layer won't solve!

  • Tomcat returning JSP instead of WML

    Morning,
    I've been stuck for 2 days and have searched the forum twice looking for answers. Found great help in learning how to write a JSP page that throws back a WML code. The problem is that my browser simulator gets JSP code instead of WML code. A user clicks on a link in a wml page and the link refers to the jsp page. the jsp page uses a bean to connect to database and throws back wml code. I am not getting errors in Tomcat console or the gateway admin console. I am using Tomcat 4 and Nokia Mobile Internet Packet.
    Thanks.

    Have you set the content-type of the response.
    you might use response.setContentType("application/wml");
    Check your conf/web.xml file
    you should see something like
    <mime-mapping> <!-- Wireless Bitmap -->
    <extension>wbmp</extension>
    <mime-type>image/vnd.wap.wbmp</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- WML Source -->
    <extension>wml</extension>
    <mime-type>text/vnd.wap.wml</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- Compiled WML -->
    <extension>wmlc</extension>
    <mime-type>application/vnd.wap.wmlc</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- WML Script Source -->
    <extension>wmls</extension>
    <mime-type>text/vnd.wap.wmls</mime-type>
    </mime-mapping>
    <mime-mapping> <!-- Compiled WML Script -->
    <extension>wmlscriptc</extension>
    <mime-type>application/vnd.wap.wmlscriptc</mime-type>
    </mime-mapping>
    You might not be having these lines in your web.xml.

Maybe you are looking for