Discussion Board

Results 1 to 3 of 3

Thread: JSP in WAP

  1. #1
    Registered User
    Join Date
    Mar 2003

    JSP in WAP

    We are using Nokia Mobile Internet Toolkit v 3.0.

    We use JSP to print out WML, our problem is whenever we use JSP, the WAP emulator cannot display the GIF image.

    But if we simply use WML, the GIF image appears in the WAP page.

    Sample JSP is as follows:

    <%@ page language="java" %>
    <%@ page import="java.util.*, java.io.*" %>
    <?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");
    out.println("<card id=\"anniversary\" title=\"Imagesample\">");
    out.println("<p align=\"center\">");
    out.println("<img src=\"Snowboard.gif\" alt=\"Snowboard.gif\"/>");
    out.println("<img src=\-snow.gif\" alt=\-snow\"/>");
    The output from both WML and JSP looks like:

    <wml><card id="anniversary" title="Imagesample">
    <p align="center">
    <img src="Snowboard.gif" alt="Snowboard.gif"/><br/><img src="3-snow.gif" alt="3-snow"/>
    Why is it that when we use WML the images are displayed, if we use JSP, images are not displayed? Please help. Thanks!


  2. #2
    Registered User
    Join Date
    Jun 2003
    Are you using tomcat along with apache?
    If so, you may have set up a handler for just the *.jsp files. This leaves the resolution of all other file extensions to apache. Apache will look for them under its DocumentRoot which may not match what tomcat uses.

    For example, on loading your JSP page, the wap browser will try fetch

    This may or may not resolve to the actual gif file depending on how you have configured apache and tomcat.

    You can try accessing this from any standard web browser to see what is returned. If you get a valid gif then its some other problem. If you get a HTTP error then you need to see why apache or tomcat can't locate your gif file.

  3. #3
    Registered User
    Join Date
    Apr 2007

    Re: JSP in WAP

    i'm new in wap application
    I want you to help bye giving me a guide how to setup tomcat & NMB in order to be abale to access my jsp file in tomcat through nokia mobile browser.
    I tried but if i give the url "http://localhost:8080/myappli-context/file.wml
    The browser show nothing ;
    please help me!!!!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts