Well, let's start by saying that either a background motif or a picture are in fact
the same thing - namely an image. And they look exactly the same way for the server's
point of view. Say when server sends 'text/html' as a content type for an HTML page,
it would send 'image/gif' or 'image/jpeg' for an image in a respective format.
Now about an impelementation. I would do it this way:
in a page text I would write something like this:
...
<img srs="http://myhost/servlets/MyServlet?command=show_picture">
...
(or <body background="http://myhost/servlets/MyServlet?command=show_picture"> for a
background picture)
in servlet I would write something like following:
String[] params = request.getParameterValues( "command" );
String command = "";
if ( params==null )
command="default";
else command = params[0];
...
if ( command.equals("show_picture") ) {
response.setContentType("image/jpeg");
// Spool the pic here!
return;
}
// Default servlet behaviour here
Hope it's been of help to you!
Happy mew year!
Baglan
-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com
___________________________________________________________________________
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