forumform_0002ejsp_jsp.java
来自「一个自己做的公司网站和办公职员管理系统。」· Java 代码 · 共 173 行
JAVA
173 行
package ui.forum;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.net.*;
import ws.woa.core.*;
import ws.woa.util.*;
import ws.woa.forum.*;
public class ForumForm_0002ejsp_jsp extends HttpJspBase {
private static java.util.Vector _jspx_includes;
public java.util.List getIncludes() {
return _jspx_includes;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=Shift_JIS");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
/**
* WOA フォーラム管理(フォーラム入力)
*/
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n\r\n");
ws.woa.forum.ForumBean forum = null;
synchronized (request) {
forum = (ws.woa.forum.ForumBean) pageContext.getAttribute("forum", PageContext.REQUEST_SCOPE);
if (forum == null){
try {
forum = (ws.woa.forum.ForumBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ws.woa.forum.ForumBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "ws.woa.forum.ForumBean", exc);
}
pageContext.setAttribute("forum", forum, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
ws.woa.core.UserInfo[] users = null;
synchronized (request) {
users = (ws.woa.core.UserInfo[]) pageContext.getAttribute("users", PageContext.REQUEST_SCOPE);
if (users == null){
try {
users = (ws.woa.core.UserInfo[]) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ws.woa.core.UserInfo[]");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "ws.woa.core.UserInfo[]", exc);
}
pageContext.setAttribute("users", users, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
ws.woa.core.GroupInfo[] groups = null;
synchronized (request) {
groups = (ws.woa.core.GroupInfo[]) pageContext.getAttribute("groups", PageContext.REQUEST_SCOPE);
if (groups == null){
try {
groups = (ws.woa.core.GroupInfo[]) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ws.woa.core.GroupInfo[]");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "ws.woa.core.GroupInfo[]", exc);
}
pageContext.setAttribute("groups", groups, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n\r\n");
out.write("<SCRIPT LANGUAGE=\"JavaScript\">\r\n////////////////////////////////////////////////////\r\n// 送信時の入力チェック\r\nfunction submitCheck(){\r\n if(!checkNotEmpty('フォーラム名',document.Form1.ForumName) ||\r\n !checkBytes('フォーラム名',document.Form1.ForumName,100)||\r\n !checkNotEmpty('説明',document.Form1.ForumDetail) ||\r\n !checkBytes('説明',document.Form1.ForumDetail,200)){\r\n return false;\r\n } else {\r\n ");
if(request.getParameter("Action").equals("REG_FORM")){
out.write("\r\n return confirm('登録します。よろしいですか?');\r\n ");
} else {
out.write("\r\n return confirm('更新します。よろしいですか?');\r\n ");
}
out.write("\r\n }\r\n}\r\n");
out.write("</SCRIPT>\r\n\r\n");
out.write("<h2>フォーラム管理");
out.write("</h2>\r\n\r\n");
out.write("<form action=\"forumadmin.module\" method=\"POST\" name=\"Form1\" onsubmit=\"return submitCheck()\">\r\n");
out.write("<table>\r\n");
out.write("<tr>\r\n ");
out.write("<th width=\"100\">フォーラム名");
out.write("</th>\r\n ");
out.write("<td>");
out.write("<input type=\"text\" name=\"ForumName\" size=\"60\"\r\n value=\"");
out.print( StrUtil.formFilter(forum.getForumName()) );
out.write("\">");
out.write("</td>\r\n");
out.write("</tr>\r\n");
out.write("<tr>\r\n ");
out.write("<th>説明");
out.write("</th>\r\n ");
out.write("<td>\r\n ");
out.write("<textarea name=\"ForumDetail\"\r\n cols=\"60\" rows=\"8\">");
out.print( StrUtil.formFilter(forum.getForumDetail()) );
out.write("</textarea>\r\n ");
out.write("</td>\r\n");
out.write("</tr>\r\n");
out.write("<tr>\r\n ");
out.write("<th>閲覧許可");
out.write("</th>\r\n ");
out.write("<td>\r\n ");
out.print( new AcceptSetupForm("Form1",forum.getAcceptFlag(),forum.getAcceptID(),groups,users).toHTML() );
out.write("\r\n ");
out.write("</td>\r\n");
out.write("</tr>\r\n");
out.write("</table>\r\n");
out.write("<br>\r\n");
if(request.getParameter("Action").equals("REG_FORM")){
out.write("\r\n ");
out.write("<input type=\"submit\" value=\" 登 録 \">\r\n");
} else {
out.write("\r\n ");
out.write("<input type=\"submit\" value=\" 更 新 \">\r\n");
}
out.write("\r\n");
out.write("<input type=\"reset\" value=\"リセット\">\r\n");
out.write("<input type=\"button\" value=\" 戻 る \" onclick=\"history.back()\">\r\n\r\n");
if(request.getParameter("Action").equals("REG_FORM")){
out.write("\r\n ");
out.write("<input type=\"hidden\" name=\"Action\" value=\"REG_EXEC\">\r\n");
} else {
out.write("\r\n ");
out.write("<input type=\"hidden\" name=\"ForumID\" value=\"");
out.print( forum.getForumID() );
out.write("\">\r\n ");
out.write("<input type=\"hidden\" name=\"Action\" value=\"UPD_EXEC\">\r\n");
}
out.write("\r\n");
out.write("</form>");
} catch (Throwable t) {
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?