import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class NewUser1 extends HttpServlet{ public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException{ res.setContentType("text/html; charset=Shift_JIS"); PrintWriter out = res.getWriter(); /* ユーザー情報を取り出す */ HttpSession session = req.getSession(false); String roll = (String)session.getAttribute("roll"); if (roll == null || !roll.equals("1")){ res.sendRedirect("/schedule/MonthView"); } StringBuffer sb = new StringBuffer(); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append("ユーザーの作成"); sb.append(""); sb.append(""); sb.append("

ユーザーの作成

"); sb.append("

新しいユーザーを作成します

"); Object status = session.getAttribute("CreateUserCheck"); if (status != null){ String statusStr = (String)status; if (statusStr.equals("Fail")){ sb.append("

ユーザーの作成に失敗しました

"); sb.append("

再度ユーザー名とパスワードを入力して下さい

"); }else if (statusStr.equals("Success")){ sb.append("

ユーザーの作成に成功しました

"); sb.append("

続けて作成する場合はユーザー名とパスワードを入力して下さい

"); } session.setAttribute("CreateUserCheck", null); } sb.append("
"); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append("
ユーザー名
パスワード
権限"); sb.append(""); sb.append("
"); sb.append("
"); sb.append("

スケジュール一覧へ

"); sb.append(""); sb.append(""); out.println(new String(sb)); } }