Here is what I do:

public class Servlet_Index extends HttpServlet {


  public void doGet(HttpServletRequest req, HttpServletResponse res) throws 
IOException  {

    home(req, res);

  }

  public void home(HttpServletRequest req, HttpServletResponse res) throws 
IOException {

    res.setContentType("text/html"); 
    PrintWriter out = res.getWriter();

    drawTop(req, res, out);

    drawReferer(req, res, out);

    drawBottom(req, res, out);

  }

  private void drawTop(HttpServletRequest req, HttpServletResponse res, 
PrintWriter out) throws IOException {
    File file = new File("Index_Top.html");
    InputStream in = null;
    try {
      in = new BufferedInputStream(new FileInputStream(file));
      int ch;
      while ((ch = in.read()) !=-1) {
        out.print((char)ch);
      }
    }
    finally {
      if (in != null) in.close(); 
    }
  }
//...
}


Hope that helps.

Brandon Donnelson
http://gwt-examples.googlecode.com
http://c.gawkat.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to