John Cook explains just how to do this and just about anything else you need
in "Wap Servlets: Developing Dynamic Web Content with Java and WML" (Wiley,
Nov. 2000).  I found that I had to get a custom image converter from a site
in Denmark to convert standard image formats to WBMP (you can find it with a
Google search).

Mark

-----Original Message-----
From: helen.pringle [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 20, 2002 1:12 AM
To: [EMAIL PROTECTED]
Subject: Please Help!! - Displaying WBMP files via Servlets


Dear people,
I would REALLY appreciate ANY HELP that someone can give me on this topic.

I am using the Nokia Toolkit 2.0 which uses the Nokia 7110 phone. How can I
display WBMP files via Java Servlets? I can do it via WML that isn't a
problem but it just isn't displaying the WBMP file when I wrap it up in Java
servlet code, here is the code I have so far:

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

//Realm0 extends HttpServlet (inherits HttpServlet class)
public class Image1 extends HttpServlet
{
 public void doGet(HttpServletRequest request, HttpServletResponse response)
 throws ServletException, IOException
 {

   PrintWriter out;
   response.setContentType("text/vnd.wap.wml");
   response.setContentType("image/vnd.wap.wbmp");
   out = response.getWriter();

   out.println("<?xml version=\"1.0\"?>");
   out.println("<!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=\"myCard\" title=\"Image Example\">");
   out.println("<p>");
   out.println("<img src=\"D:Sword1.wbmp\" alt=\"Logo\" hspace=\"6\"
vspace=\"6\"/>");
   out.println("</p>");

   out.println("</card>");
   out.println("</wml>");

   out.close();

   }
}

Can someone help please??? I really wqould appreciate it!! PLEASE!!

Regards

Helen Pringle

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to