Dear people,
How do I incorprate WBMP images in a java servlet so that it will be output
on the nokia toolkit 2.0 emulator? It works fine in WML BUT I can't get it
to work in the java servlet, here is my code as below:

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.com");
   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("Test Test Test");
   out.println("<br/>");
   out.println("<img src=\"Sword1.wbmp\" alt=\"Logo\" hspace=\"6\"
vspace=\"6\"/>");
   out.println("</p>");

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

   out.close();

   }
}

I am using TOmcat as a servlet engine and web server aswell, where do I
place the image aswell?

Can someone please please help - thanks in advance.

Regards

Helen

___________________________________________________________________________
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