Пример #1
0
 /** Display a message in lieu of the normal page */
 protected void displayMsgInLieuOfPage(String msg) throws IOException {
   // TODO: Look at HTML
   Page page = newPage();
   Composite warning = new Composite();
   warning.add(msg);
   warning.add("<br>");
   page.add(warning);
   layoutFooter(page);
   page.write(resp.getWriter());
 }
Пример #2
0
 // Called when a servlet doesn't get the parameters it expects/needs
 protected void paramError() throws IOException {
   // FIXME: As of 2006-03-15 this method and its only caller checkParam() are not called from
   // anywhere
   PrintWriter wrtr = resp.getWriter();
   Page page = new Page();
   // add referer, params, msg to contact lockss unless from old bookmark
   // or manually entered url
   page.add("Parameter error");
   page.write(wrtr);
 }