.wbmp pictures does not show up, why ?
Hello,
Problem:
I have created a Java servlet which produces a WML card with text and an command to load .wbmp picture (see code below). I have tested the WML card without servlet (loaded it straight from hard disk), and it works fine. The problem occurs when I try to use Tomcat 3.2.2 in my PC, run the servlet and load it with Nokia WAP toolkit 2.0. I managed to load the servlet and the text parts of the servlet are showing correctly, but the picture does not appear. Only the alt text.
I have configured Tomcats web.xml file as follows:
<mime-mapping>
<extension>wml</extension>
<mime-type>text/vnd.wap.wml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>wbmp</extension>
<mime-type>image/vnd.wap.wbmp</mime-type>
</mime-mapping>
I have also tried to load pure WML code included in the servlet through Tomcat, text appears picture does not.
Same error occurs when I am using Nokia WAP server 1.1 instead of Tomcat.
This is probably some very simple error, but I can not see it myself. So any ideas,
Thanks in advance,
-TL
The servlet I am using:
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/vnd.wap.wml");
PrintWriter out = response.getWriter();
out.println("<?xml version=\"1.0\"?>");
out.print("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML ");
out.println("1.1//EN\"");
out.println("\"http://www.wapforum.org/DTD/wml_1.1.xml\">");
out.println("<wml>\n<card id=\"card1\" title=\"Servletti\">");
out.println("<p>");
out.println("Testi servlet with picture");
out.println("<img src=\"http://localhost/sunny.wbmp\" alt=\"fig\" hspace=\"10\" vspace=\"10\" />");
out.println("</p>");
out.println("</card>");
out.println("</wml>");
out.close();
}
}

