The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Apologies. The servlet code was a mess! Heres it again.

Posted by Jay on October 27, 2001 at 7:58 PM



public class MyServlet extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
PrintWriter out = response.getWriter();
ResourceBuffer rb = new ResourceBuffer();

out.println("<html>");
out.println("<head>");
out.println("</head>");

out.println("<body>");
if( rb.getResource( "http://www.google.com/images/logo.gif") );
{
out.println("<applet code=\"ImageApplet.class\" �codeBase= \".\" width=100 height =100>");
out.println("</applet>");
}
out.println("</body>");
out.println("</html>");
}
}

-Jay.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us