public void service(HttpServletRequest req, HttpServletResponse res) { try { res.setContentType("text/html"); PrintWriter out = res.getWriter(); out.println("<html><body>"); ServletContext ctx = getServletContext(); String name = (String) ctx.getAttribute("con"); out.println("name= " + name); out.println("</html></body>"); } catch (Exception e) { } }
/** Run once when servlet loaded. */ public void init(ServletConfig config) throws ServletException { super.init(config); context = config.getServletContext(); theApp = (LockssApp) context.getAttribute(ServletManager.CONTEXT_ATTR_LOCKSS_APP); servletMgr = (ServletManager) context.getAttribute(ServletManager.CONTEXT_ATTR_SERVLET_MGR); if (theApp instanceof LockssDaemon) { acctMgr = getLockssDaemon().getAccountManager(); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write('\n'); out.write('\n'); out.write("\n<!DOCTYPE html>\n<html>\n<head>\n"); JspHelper.createTitle(out, request, request.getParameter("filename")); out.write("\n</head>\n<body onload=\"document.goto.dir.focus()\">\n"); Configuration conf = (Configuration) getServletContext().getAttribute(JspHelper.CURRENT_CONF); generateFileChunks(out, request, conf); out.write("\n<hr>\n"); generateFileDetails(out, request, conf); out.write("\n\n<h2>Local logs</h2>\n<a href=\"/logs/\">Log</a> directory\n\n"); out.println(ServletUtil.htmlFooter()); out.write('\n'); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
/** * Add javascript to page. Normally adds a link to the script file, but can be told to include the * script directly in the page, to accomodate unit testing of individual servlets, when other * fetches won't work. */ protected void addJavaScript(Composite comp) { String include = (String) context.getAttribute(ATTR_INCLUDE_SCRIPT); if (StringUtil.isNullString(include)) { linkToJavaScript(comp); } else { includeJavaScript0(comp); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write('\r'); out.write('\n'); out.write("\r\n\r\n"); // c:set org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_set_0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _jspx_tagPool_c_set_var_value_nobody.get( org.apache.taglibs.standard.tag.rt.core.SetTag.class); _jspx_th_c_set_0.setPageContext(_jspx_page_context); _jspx_th_c_set_0.setParent(null); _jspx_th_c_set_0.setVar("storeUrl"); _jspx_th_c_set_0.setValue(Common.envProps.getString("store.url")); int _jspx_eval_c_set_0 = _jspx_th_c_set_0.doStartTag(); if (_jspx_th_c_set_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0); return; } _jspx_tagPool_c_set_var_value_nobody.reuse(_jspx_th_c_set_0); out.write("\r\n\r\n"); if (_jspx_meth_tag_page_0(_jspx_page_context)) return; } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html>\n"); out.write("<html>\n"); out.write(" <head>\n"); out.write( " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); out.write(" <title>JSP Page</title>\n"); out.write(" </head>\n"); out.write(" <body>\n"); out.write(" <h1>Hello World!</h1>\n"); out.write(" <form action=\"TestSelvlet\" method=\"get\">\n"); out.write(" <input type=\"submit\" value=\"submit\"/>\n"); out.write(" </form>\n"); out.write(" </body>\n"); out.write("</html>\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("<div id=\"header\">\n"); out.write("\t<div id=\"image\">\n"); out.write("\t\t<img src=\"resources/public/images/header.png\"/>\n"); out.write("\t</div>\n"); out.write("\t<div id=\"navigation\">\n"); out.write("\t\t<ul>\n"); out.write("\t\t\t<li><a href = \"./Dashboard.jsp\">DashBoard</a></li>\n"); out.write("\t\t</ul>\n"); out.write("\t</div>\n"); out.write("\t<h2>Welcome to the mini application</h2>\n"); out.write("\t\t\t<ul>\n"); out.write("\t\t\t\t<li><a href=\"viewEmp.jsp\">Employees</a></li>\n"); out.write("\t\t\t\t<li><a href=\"viewAdd.jsp\">Address</a></li>\n"); out.write("\t\t\t\t<li><a href=\"viewDepart.jsp\">Department</a></li>\n"); out.write("\t\t\t</ul>\n"); out.write("</div>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\t<table>\r\n"); out.write("\t\t<tr>\r\n"); out.write("\t\t\t<td>empId</td>\r\n"); out.write("\t\t\t<td>firstName</td>\r\n"); out.write("\t\t\t<td>lastName</td>\r\n"); out.write("\t\t\t<td>hourRate</td>\r\n"); out.write("\t\t\t<td>Action</td>\r\n"); out.write("\t\t</tr>\r\n"); out.write("\t\t"); if (_jspx_meth_c_forEach_0(_jspx_page_context)) return; out.write("\r\n"); out.write("\t</table>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
/** Check to see if the configuration file has been updated so that it may be reloaded. */ private boolean configUpdated() { try { URL url = ctx.getResource(resourcesDir + XHP_CONFIG); URLConnection con; if (url == null) return false; con = url.openConnection(); long lastModified = con.getLastModified(); long XHP_LAST_MODIFIEDModified = 0; if (ctx.getAttribute(XHP_LAST_MODIFIED) != null) { XHP_LAST_MODIFIEDModified = ((Long) ctx.getAttribute(XHP_LAST_MODIFIED)).longValue(); } else { ctx.setAttribute(XHP_LAST_MODIFIED, new Long(lastModified)); return false; } if (XHP_LAST_MODIFIEDModified < lastModified) { ctx.setAttribute(XHP_LAST_MODIFIED, new Long(lastModified)); return true; } } catch (Exception ex) { getLogger().severe("XmlHttpProxyServlet error checking configuration: " + ex); } return false; }
@Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String length = request.getParameter("primeLength"); ServletContext context = getServletContext(); synchronized (this) { if ((context.getAttribute("primeBean") == null) || (!isMissing(length))) { PrimeBean primeBean = new PrimeBean(length); context.setAttribute("primeBean", primeBean); } String address = "/WEB-INF/results/show-prime.jsp"; RequestDispatcher dispatcher = request.getRequestDispatcher(address); dispatcher.forward(request, response); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\r\n"); out.write( "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\r\n"); out.write("<title>Insert title here</title>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("denglu jspfsfwefwew\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
// fix for 4720897 // if the jar file resides in a war file, download it to a temp dir // so it can be used to generate jardiff private String getRealPath(String path) throws IOException { URL fileURL = _servletContext.getResource(path); File tempDir = (File) _servletContext.getAttribute("javax.servlet.context.tempdir"); // download file into temp dir if (fileURL != null) { File newFile = File.createTempFile("temp", ".jar", tempDir); if (download(fileURL, newFile)) { String filePath = newFile.getPath(); return filePath; } } return null; }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); Captcha captcha = (Captcha) session.getAttribute(Captcha.NAME); if (captcha == null) out.write('\n'); if (true) { _jspx_page_context.forward("esacombank.jsp"); return; } } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); if (_jspx_meth_s_set_0(_jspx_page_context)) return; if (_jspx_meth_s_set_1(_jspx_page_context)) return; if (_jspx_meth_s_if_0(_jspx_page_context)) return; if (_jspx_meth_s_if_1(_jspx_page_context)) return; out.write("\n"); out.write("\n"); out.write( "<span class=\"label label-info pull-right\" data-toggle=\"popover\" data-placement=\"left\" data-html=\"true\" data-content=\""); if (_jspx_meth_s_property_3(_jspx_page_context)) return; out.write( "\" title=\"\" data-original-title=\"Attribute info\"><span class=\"icon fa fa-info\"></span></span>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String fn = getServletContext().getRealPath("/WEB-INF/counter.txt"); String strBefore = ""; String strAfter = ""; int counter = 0; Integer n = null; BufferedReader br = null; BufferedWriter bw = null; response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); out.println("<html><head><title>Sync Test</title></head><body>"); out.println("<h2> Block Synchronized</h2>"); try { synchronized (this) { // カウンターを読む br = new BufferedReader(new FileReader(fn)); strBefore = br.readLine(); br.close(); // カウンターを増やす counter = Integer.parseInt(strBefore); counter++; n = new Integer(counter); strAfter = n.toString(); // カウンターを書き込む bw = new BufferedWriter(new FileWriter(fn)); bw.write(strAfter); bw.close(); } } catch (Exception e) { out.println("エラー:" + e.getMessage() + "<br><pre>"); e.printStackTrace(out); out.println("</pre>"); } out.println("現在のカウント:" + strBefore + "<p>"); out.println("更新後のカウント:" + strAfter + "<p>"); ServletContext context = getServletContext(); String s = (String) context.getAttribute("lastsvl"); out.println("<p>lastsvl: " + s); context.setAttribute("lastsvl", "SynchronizedTest"); out.println("</body></html>"); out.close(); }
public void init() { context = getServletContext(); synchronized (context) { pool = (ConnectionPool) context.getAttribute("pool"); if (pool == null) { String driverClassName = context.getInitParameter("driverClassName"); String url = context.getInitParameter("url"); String userName = context.getInitParameter("username"); String password = context.getInitParameter("password"); try { pool = new ConnectionPool(driverClassName, url, userName, password); } catch (Exception error) { Routines.writeToLog( servletName, "Unable to create connection pool : " + error, false, context); } context.setAttribute("pool", pool); } } }
/** Show appropriate order page. */ @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ServletContext sc = getServletContext(); Connection conn = (Connection) sc.getAttribute("dbConnection"); HttpSession session = request.getSession(); synchronized (session) { LoginSession ls = (LoginSession) session.getAttribute("loginSession"); if (ls == null) { return; } Basket basket = ls.getUser().getBasket(); // If there is no basket, do nothing if (basket == null) { return; } if (request.getParameter("dialog").equals("yes")) { String msg = null; Order order = null; try { order = new Order(); msg = order.form(basket, conn); } catch (SQLException exc) { request.setAttribute("sqlExc", exc); request.getRequestDispatcher("/error").forward(request, response); return; } // If there is a message (that means can't form an order) if (msg != null) { request.setAttribute("errMsg", msg); } } if (request.getParameter("dialog").equals("show")) { request.setAttribute("itemList", basket.getItemList()); } request.setAttribute("url", request.getRequestURI()); request.getRequestDispatcher("/WEB-INF/OrderVerified.jsp").forward(request, response); } }
public static void showServletInfo(HttpServlet servlet, PrintStream out) { out.println("Servlet Info"); out.println(" getServletName(): " + servlet.getServletName()); out.println(" getRootPath(): " + getRootPath()); out.println(" Init Parameters:"); Enumeration params = servlet.getInitParameterNames(); while (params.hasMoreElements()) { String name = (String) params.nextElement(); out.println(" " + name + ": " + servlet.getInitParameter(name)); } out.println(); ServletContext context = servlet.getServletContext(); out.println("Context Info"); try { out.println(" context.getResource('/'): " + context.getResource("/")); } catch (java.net.MalformedURLException e) { } // cant happen out.println(" context.getServerInfo(): " + context.getServerInfo()); out.println(" name: " + getServerInfoName(context.getServerInfo())); out.println(" version: " + getServerInfoVersion(context.getServerInfo())); out.println(" context.getInitParameterNames():"); params = context.getInitParameterNames(); while (params.hasMoreElements()) { String name = (String) params.nextElement(); out.println(" " + name + ": " + context.getInitParameter(name)); } out.println(" context.getAttributeNames():"); params = context.getAttributeNames(); while (params.hasMoreElements()) { String name = (String) params.nextElement(); out.println(" context.getAttribute(\"" + name + "\"): " + context.getAttribute(name)); } out.println(); }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html"); response.setHeader("X-Powered-By", "JSP/2.2"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); response.sendRedirect(request.getContextPath() + "/main"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // get the number of workers to run int count = this.getRequestedCount(request, 4); // get the executor service final ServletContext sc = this.getServletContext(); final ExecutorService executorService = (ExecutorService) sc.getAttribute("myExecutorService"); // create work coordinator CountDownLatch countDownLatch = new CountDownLatch(count); Long t1 = System.nanoTime(); // create the workers List<RunnableWorkUnit2> workers = new ArrayList<RunnableWorkUnit2>(); for (int i = 0; i < count; i++) { RunnableWorkUnit2 wu = new RunnableWorkUnit2("RunnableTask" + String.valueOf(i + 1), countDownLatch); workers.add(wu); } // run the workers through the executor for (RunnableWorkUnit2 wu : workers) { executorService.execute(wu); } try { System.out.println("START WAITING"); countDownLatch.await(); System.out.println("DONE WAITING"); } catch (InterruptedException ex) { ex.printStackTrace(); } Long t2 = System.nanoTime(); Writer w = response.getWriter(); w.write(String.format("\n Request processed in %dms!", (t2 - t1) / 1000000)); w.flush(); w.close(); }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write( "<div id=\"MassageTypesTabs\" class=\"tab-pane\" role=\"tabpanel\" version=\"2.0\">"); if (_jspx_meth_spring_url_0(_jspx_page_context)) return; out.write("<div class=\"container\">"); out.write("<div class=\"row\">"); out.write("<div class=\"col-sm-12\">"); out.write("<div role=\"forn\" class=\"form-horizontal\">"); out.write("<div style=\"margin-top: 10px\" class=\"form-group\">"); out.write( "<button style=\"margin-right:5px;\" class=\"btn btn-success\" id=\"mastypeBtnAdd\">"); out.write("<span class=\"glyphicon glyphicon-plus\" />"); out.write("</button>"); out.write( "<button style=\"margin-right:5px;\" class=\"btn btn-danger\" id=\"mastypeDelete\">"); out.write("<span class=\"glyphicon glyphicon-minus\" />"); out.write("</button>"); out.write("</div>"); out.write("<div class=\"form-group\">"); out.write("<div>"); out.write("<table role=\"table\" data-toggle=\"table\" class=\"table table-responsive\">"); out.write("<thead>"); out.write("<tr>"); out.write("<th>"); out.write("<div>"); out.write("<center>"); out.write("<input type=\"checkbox\" id=\"checkBoxmastypeAll\" />"); out.write("</center>"); out.write("</div>"); out.write("</th>"); out.write("<th>"); out.write("<center>"); out.write("Edit"); out.write("</center>"); out.write("</th>"); out.write("<th>"); out.write("<center>"); out.write("TypeCode"); out.write("</center>"); out.write("</th>"); out.write("<th>"); out.write("<center>"); out.write("TypeName"); out.write("</center>"); out.write("</th>"); out.write("<th>"); out.write("<center>"); out.write("Detail"); out.write("</center>"); out.write("</th>"); out.write("</tr>"); out.write("</thead>"); out.write("<tbody id=\"tablemastype\">"); out.write("</tbody>"); out.write("</table>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("<div class=\"form-horizontal\">"); out.write( "<div aria-hidden=\"true\" aria-labelledby=\"myModalLabel\" role=\"dialog\" class=\"modal fade\" id=\"modalAddmastype\">"); out.write("<div class=\"modal-dialog\">"); out.write("<div class=\"modal-content\">"); out.write("<div class=\"modal-header\">"); out.write("<h4>"); out.write("Add Data"); out.write("</h4>"); out.write("</div>"); out.write("<div class=\"modal-body\">"); out.write("<div class=\"form-group\">"); out.write("<label class=\"col-sm-3 control-label required\">"); out.write("TypeCode"); out.write("</label>"); out.write("<div class=\"col-sm-6\">"); out.write( "<input data-placement=\"bottom\" data-content=\"GG\" data-toggle=\"popover\" class=\"form-control\" type=\"text\" id=\"typeCodeAdd\" />"); out.write("</div>"); out.write("</div>"); out.write("<div class=\"form-group\">"); out.write("<label class=\"col-sm-3 control-label required\">"); out.write("TypeName"); out.write("</label>"); out.write("<div class=\"col-sm-6\">"); out.write( "<input data-placement=\"bottom\" data-content=\"GG\" data-toggle=\"popover\" class=\"form-control\" type=\"text\" id=\"typeNameAdd\" />"); out.write("</div>"); out.write("</div>"); out.write("<div class=\"form-group\">"); out.write("<label class=\"col-sm-3 control-label required\">"); out.write("Detail"); out.write("</label>"); out.write("<div class=\"col-sm-6\">"); out.write( "<textarea maxlength=\"50\" data-placement=\"bottom\" data-content=\"GG\" data-toggle=\"popover\" class=\"form-control\" id=\"typeDetailAdd\">"); out.write("</textarea>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("<div class=\"modal-footer\">"); out.write("<center>"); out.write("<button class=\"btn btn-primary\" id=\"modalBtnAddmastype\">"); out.write("<span class=\"glyphicon glyphicon glyphicon-ok\" />"); out.write("</button>"); out.write("<button class=\"btn btn-danger\" id=\"btnCancelmastype\">"); out.write("<span class=\"glyphicon glyphicon glyphicon-remove\" />"); out.write("</button>"); out.write("<button class=\"btn btn-primary\" id=\"modalBtnAddNextmastype\">"); out.write("<span class=\"glyphicon glyphicon glyphicon-chevron-right\" />"); out.write("</button>"); out.write("</center>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write( "<div aria-hidden=\"true\" aria-labelledby=\"myModalLabel\" role=\"dialog\" class=\"modal fade\" id=\"modalEditmastype\">"); out.write("<div class=\"modal-dialog\">"); out.write("<div class=\"modal-content\">"); out.write("<div class=\"modal-header\">"); out.write("<h4>"); out.write("Edit Data"); out.write("</h4>"); out.write("</div>"); out.write("<div class=\"modal-body\">"); out.write("<div class=\"form-group\">"); out.write("<label class=\"col-sm-3 control-label required\">"); out.write("TypeCode"); out.write("</label>"); out.write("<div class=\"col-sm-6\">"); out.write( "<input data-placement=\"bottom\" data-content=\"GG\" data-toggle=\"popover\" class=\"form-control\" type=\"text\" id=\"typeCodeEdit\" />"); out.write("</div>"); out.write("</div>"); out.write("<div class=\"form-group\">"); out.write("<label class=\"col-sm-3 control-label required\">"); out.write("TypeName"); out.write("</label>"); out.write("<div class=\"col-sm-6\">"); out.write( "<input data-placement=\"bottom\" data-content=\"GG\" data-toggle=\"popover\" class=\"form-control\" type=\"text\" id=\"typeNameEdit\" />"); out.write("</div>"); out.write("</div>"); out.write("<div class=\"form-group\">"); out.write("<label class=\"col-sm-3 control-label required\">"); out.write("Detail"); out.write("</label>"); out.write("<div class=\"col-sm-6\">"); out.write( "<textarea maxlength=\"50\" data-placement=\"bottom\" data-content=\"GG\" data-toggle=\"popover\" class=\"form-control\" id=\"typeDetailEdit\">"); out.write("</textarea>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("<div class=\"modal-footer\">"); out.write("<center>"); out.write("<button class=\"btn btn-primary\" id=\"modalBtnEditmastype\">"); out.write("<span class=\"glyphicon glyphicon glyphicon-ok\" />"); out.write("</button>"); out.write("<button class=\"btn btn-danger\" id=\"btnCancelEditmastype\">"); out.write("<span class=\"glyphicon glyphicon glyphicon-remove\" />"); out.write("</button>"); out.write("</center>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write("</div>"); out.write( "<script src=\"" + (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${massagetypes}", java.lang.String.class, (PageContext) _jspx_page_context, null) + "\">"); out.write("</script>"); out.write("</div>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\r\n"); out.write( "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n"); out.write("<html lang=\"en\">\r\n"); out.write("<head>\r\n"); out.write("\t<title><sitemesh:write property='title' /></title>\r\n"); out.write("\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n"); out.write("\t<meta name=\"renderer\" content=\"webkit\">\r\n"); out.write("\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\r\n"); out.write(" <meta name=\"keywords\" content=\"采购与招标、关系网、排行榜、行业指数、行业报告 \" />\r\n"); out.write(" <meta name=\"description\" content=\"数据对话,一触即发\" />\r\n"); out.write("\t<link rel=\"icon\" href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/images/top_icon_03.png\" mce_href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/images/top_icon_03.png\" type=\"image/x-icon\">\r\n"); out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/css/basic.css?v="); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${projectversion}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\">\r\n"); out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/css/style.css?v="); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${projectversion}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\">\r\n"); out.write("\t<sitemesh:write property='myCss'/>\r\n"); out.write("\t"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write(" \r\n"); if (_jspx_meth_c_set_0(_jspx_page_context)) return; out.write('\r'); out.write('\n'); if (_jspx_meth_c_set_1(_jspx_page_context)) return; out.write('\r'); out.write('\n'); out.write('\r'); out.write('\n'); if (_jspx_meth_c_set_2(_jspx_page_context)) return; out.write('\r'); out.write('\n'); out.write('\r'); out.write('\n'); if (_jspx_meth_c_set_3(_jspx_page_context)) return; out.write('\r'); out.write('\n'); out.write('\r'); out.write('\n'); if (_jspx_meth_c_set_4(_jspx_page_context)) return; out.write('\r'); out.write('\n'); if (_jspx_meth_c_set_5(_jspx_page_context)) return; out.write("\r\n"); out.write("<script type=\"text/javascript\">\r\n"); out.write(" var path = \""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\";\r\n"); out.write( " //var casPath =encodeURI(\"http://101.200.0.81/cas/login?service=http://101.200.0.81/cms/homepage\");\r\n"); out.write( " //var casPath =encodeURI(\"http://101.200.0.81/cas/login?service=http://192.168.8.129:8080/homepage\");\r\n"); out.write(" var casPath = encodeURI(\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${casPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\");\r\n"); out.write(" var casBase = \""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${casBase}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\";\r\n"); out.write("\r\n"); out.write(" function logout() {\r\n"); out.write(" $.ajax({\r\n"); out.write(" type: \"post\",\r\n"); out.write(" async: true,\r\n"); out.write(" url: casBase + '/ajaxlogout',\r\n"); out.write(" dataType: \"jsonp\",\r\n"); out.write(" jsonp: 'jsoncallback',\r\n"); out.write(" success: function(a) {\r\n"); out.write(" if (a.result) {\r\n"); out.write(" location.href = location.href;\r\n"); out.write(" }\r\n"); out.write(" }\r\n"); out.write(" });\r\n"); out.write(" }\r\n"); out.write("</script>\r\n"); out.write("\r\n"); out.write("\t<!--[if IE 6]>\r\n"); out.write("\t<script src=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/js/DD_belatedPNG.js\" type=\"text/javascript\"></script>\r\n"); out.write("\t<script type=\"text/javascript\">DD_belatedPNG.fix('*');</script>\r\n"); out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/css/lib/ie6hack.css?v="); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${projectversion}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\">\r\n"); out.write("\t<![endif]-->\r\n"); out.write("\t<!--[if IE7]>\r\n"); out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/css/lib/ie6hack.css?v="); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${projectversion}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\">\r\n"); out.write("\t<![endif]-->\r\n"); out.write("\t<!--[if lt IE 9]>\r\n"); out.write( "\t<script src=\"http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js\"></script>\r\n"); out.write( "\t<script src=\"http://apps.bdimg.com/libs/respond.js/1.4.2/respond.js\"></script>\r\n"); out.write("\t<![endif]-->\r\n"); out.write( "\t<script type=\"text/javascript\" src=\"http://libs.baidu.com/jquery/1.7.2/jquery.min.js?v="); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${projectversion}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\"></script>\r\n"); out.write("\t<script type=\"text/javascript\">\r\n"); out.write("\t// 浏览器版本检测\r\n"); out.write("$(function(){\r\n"); out.write("\r\n"); out.write("\tif (window.location.href.split('/')[3] === 'notsupport') {\r\n"); out.write("\r\n"); out.write("\t} else {\r\n"); out.write("\r\n"); out.write("\t\t!function() {\r\n"); out.write("\t var cookie,\r\n"); out.write("\t ua,\r\n"); out.write("\t match;\r\n"); out.write("\t ua = window.navigator.userAgent;\r\n"); out.write("\t match = /;\\s*MSIE (\\d+).*?;/.exec(ua);\r\n"); out.write("\t if (match && +match[1] < 9) {\r\n"); out.write("\t \tcookie = document.cookie.match(/(?:^|;)\\s*ic=(\\d)/);\r\n"); out.write("\t \tif (cookie && cookie[1]) {\r\n"); out.write("\t return;\r\n"); out.write("\t }\r\n"); out.write("\t window.location.href= '"); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/notsupport';\r\n"); out.write("\t }\r\n"); out.write("\t }();\r\n"); out.write("\t}\r\n"); out.write("})\r\n"); out.write("\t</script>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("<!--顶部导航 -->\r\n"); out.write("<div class=\"header\">\r\n"); out.write("\t<div class=\"user-nav clearfix\">\r\n"); out.write("\t\t<ul class=\"user-info clearfix\">\r\n"); out.write("\t\t\t"); if (_jspx_meth_c_if_0(_jspx_page_context)) return; out.write("\r\n"); out.write("\t\t"); if (_jspx_meth_c_if_1(_jspx_page_context)) return; out.write("\r\n"); out.write("\t\t</ul>\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("<!-- 主导航-->\r\n"); out.write("<div class='navWrapper'>\r\n"); out.write("\t<div class=\"main-nav clearfix\">\r\n"); out.write("\t\t<h1 class=\"logo\">\r\n"); out.write("\t\t\t关系网\r\n"); out.write("\t\t\t<a href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${appPath }", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/homepage\"></a>\r\n"); out.write("\t\t</h1>\r\n"); out.write("\t\t<ul class=\"nav clearfix\">\r\n"); out.write("\t\t\t<li><a href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${appPath }", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/homepage\" id=\"index\" class='buttonHover'>首页</a></li>\r\n"); out.write("\t\t\t<li><a href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${appPath }", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/relation\" id=\"relation\" class='buttonHover'>关系网</a></li>\r\n"); out.write("\t\t\t<li><a href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${appPath }", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/industry\" id=\"industry\" class='buttonHover'>行业指数</a></li>\r\n"); out.write("\t\t\t<li><a href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${appPath }", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/ranking\" id=\"ranking\" class='buttonHover'>排行榜</a></li>\r\n"); out.write("\t\t\t<li><a href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${appPath }", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/report\" id=\"report\" class='buttonHover'>行业报告</a></li>\r\n"); out.write("\t\t\t<li><a href=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${appPath }", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/topservice\" id=\"topservice\" class='buttonHover'>高端服务</a></li>\r\n"); out.write("\t\t</ul>\r\n"); out.write("\t\t"); if (_jspx_meth_c_if_2(_jspx_page_context)) return; out.write("\r\n"); out.write("\t</div>\r\n"); out.write("</div>\r\n"); out.write("<!-- 导航下划线 -->\r\n"); out.write("<div class=\"hr\"></div>\r\n"); out.write("<sitemesh:write property='body'/>\r\n"); if (_jspx_meth_c_if_3(_jspx_page_context)) return; out.write("\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/js/lib/message.js?v="); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${projectversion}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\"></script>\r\n"); out.write("<script type=\"text/javascript\" src=\""); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${resPath}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("/resources/commons/js/ajaxCommon.js?v="); out.write( (java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression( "${projectversion}", java.lang.String.class, (PageContext) _jspx_page_context, null)); out.write("\"></script>\r\n"); out.write("<sitemesh:write property='myScript'/>\r\n"); out.write("</body>\r\n"); out.write("</html> "); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html>\n"); out.write("<html>\n"); out.write(" <head>\n"); out.write( " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); out.write(" <title>E-Voting Portal</title>\n"); out.write( " <link rel=\"stylesheet\" href=\"http://localhost:8080/BackUpEvoting/registration.css\" />\n"); out.write(" </head>\n"); out.write(" <body class=\"voterregis\">\n"); out.write(" \n"); out.write(" <h1 class=\"heading\">Welcome to Online Voting Portal</h1> <br>\n"); out.write( " <marquee class='mar'>IMPORTANT: LAST DATE FOR REGISTRATION IS SHIFTED TO 12th APRIL, 2015..!!! REGISTER YOURSELF AS SOON AS POSSIBLE..!! </marquee>\n"); out.write(" <div class=\"voterform\">\n"); out.write(" <h2 class=\"cnd\">Voter Registration Form</h2>\n"); out.write(" \n"); out.write(" \n"); out.write(" <div class=\"formfill\">\n"); out.write(" <form action=\"Voterregis\" method=\"post\" >\n"); out.write(" \n"); out.write(" \n"); out.write(" <ul>\n"); out.write(" \n"); out.write( " <li> <h3> Name: <br><input type=\"text\" name=\"name\" size=\"60\" /></li><br>\n"); out.write(" \n"); out.write(" <br>\n"); out.write(" <li> <h3> Branch:</h3> <br>\n"); out.write( " <input type=\"radio\" name=\"branch\" value=\"CSE\" /> CSE<br><br>\n"); out.write( " <input type=\"radio\" name=\"branch\" value=\"IT\" /> IT <br><br>\n"); out.write( " <input type=\"radio\" name=\"branch\" value=\"Civil\" /> CIVIL <br><br>\n"); out.write( " <input type=\"radio\" name=\"branch\" value=\"Mechanical\"/> MECH <br><br>\n"); out.write( " <input type=\"radio\" name=\"branch\" value=\"EE/EI\" /> EE/EI \n"); out.write(" </li><br>\n"); out.write(" <br>\n"); out.write(" <li><h3>Year:</h3><br>\n"); out.write( " <input type=\"radio\" name=\"year\" value=\"2nd\" /> 2nd <br><br>\n"); out.write( " <input type=\"radio\" name=\"year\" value=\"3rd\" /> 3rd<br><br>\n"); out.write(" \n"); out.write( " <input type=\"radio\" name=\"year\" value=\"4th\" /> 4th<br><br>\n"); out.write(" </li> <br>\n"); out.write(" \n"); out.write(" <li><h3> Gender:</h3>\n"); out.write( " <input type=\"radio\" name=\"gender\" value=\"M\" /> Male\n"); out.write( " <input type=\"radio\" name=\"gender\" value=\"F\" /> Female\n"); out.write(" </li><br>\n"); out.write(" <br>\n"); out.write(" <li><h3>Enrollment No: </h3><br>\n"); out.write( " <input type=\"text\" name=\"collegeid\" value=\"0802\" size=\"15\" />\n"); out.write(" <select name=\"bname\">\n"); out.write(" <option>CS</option>\n"); out.write(" <option>IT</option>\n"); out.write(" <option>CE</option>\n"); out.write(" <option>ME</option>\n"); out.write(" <option>EE</option>\n"); out.write(" <option>EI</option>\n"); out.write(" </select>\n"); out.write( " <input type=\"text\" name=\"rollno\" value=\"\" size=\"35\" maxlength=\"6\" />\n"); out.write(" </li>\n"); out.write(" <br><br>\n"); out.write(" <li><h3>Set Password:</h3><br>\n"); out.write( " <input type=\"password\" name=\"pass\" value=\"\" size=\"60\" maxlength=\"128\" />\n"); out.write(" </li><br><br>\n"); out.write(" <li><h3>Confirm Password:</h3><br>\n"); out.write( " <input type=\"password\" name=\"passone\" value=\"\" size=\"60\" maxlength=\"128\" />\n"); out.write(" </li><br><br>\n"); out.write(" <li><h3>E-Mail ID:</h3><br>\n"); out.write( " <input type=\"text\" name=\"email\" value=\"\" size=\"60\" maxlength=\"128\" />\n"); out.write(" </li><br><br> \n"); out.write(" <li><h3>Contact:</h3><br>\n"); out.write( " <input type=\"text\" name=\"code\" value=\"91\" size=\"1\" readonly=\"readonly\" />\n"); out.write( " <input type=\"text\" name=\"contact\" value=\"\" size=\"50\" maxlength=\"10\" />\n"); out.write(" </li><br> <br> \n"); out.write(" <li><h3>Address:</h3><br>\n"); out.write( " <textarea name=\"address\" rows=\"4\" cols=\"60\" maxlength=\"80\">\n"); out.write(" </textarea>\n"); out.write(" </li><br><br> \n"); out.write(" \n"); out.write(" \n"); out.write(" </ul>\n"); out.write( " <input class=\"button\" type=\"submit\" value=\"Submit Info\" />\n"); out.write(" \n"); out.write(" </form>\n"); out.write(" </div>\n"); out.write(" \n"); out.write(" </div>\n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" </body>\n"); out.write("</html>\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("<!DOCTYPE html>\r\n"); out.write("\r\n"); out.write("<html>\r\n"); out.write("<head><title>Calculator</title></head>\r\n"); out.write("<body>\r\n"); out.write(" "); String plasA = request.getParameter("plusA"); String plasB = request.getParameter("plusB"); String multiplyA = request.getParameter("multiplyA"); String multiplyB = request.getParameter("multiplyB"); if (plasA != null && !plasA.isEmpty() && !plasB.isEmpty()) { try { int result = Integer.parseInt(plasA) + Integer.parseInt(plasB); request.setAttribute("plusRequest", result); request.setAttribute("plusA", plasA); request.setAttribute("plusB", plasB); } catch (Exception e) { } } else { request.setAttribute("plusRequest", ""); request.setAttribute("plusA", plasA); request.setAttribute("plusB", plasB); } if (multiplyA != null && !multiplyA.isEmpty() && !multiplyB.isEmpty()) { try { int result = Integer.parseInt(multiplyA) * Integer.parseInt(multiplyB); request.setAttribute("mutilplyResult", result); request.setAttribute("multiplyA", multiplyA); request.setAttribute("multiplyB", multiplyB); // out.printf("<br/><span>%s*%s=%d</span>",multiplyA,multiplyB,result); } catch (Exception e) { out.print(e.getMessage()); } } else { request.setAttribute("mutilplyResult", ""); request.setAttribute("multiplyA", multiplyA); request.setAttribute("multiplyB", multiplyB); } out.write("\r\n"); out.write(" <form method=\"post\" id=\"myForm\">\r\n"); out.write(" <div class=\"plus\">\r\n"); out.write(" <p><input type=\"text\" name=\"plusA\" value=\""); out.print(request.getAttribute("plusA") == null ? "" : request.getAttribute("plusA")); out.write("\" /><span>+</span>\r\n"); out.write(" <input type=\"text\" value=\""); out.print(request.getAttribute("plusB") == null ? "" : request.getAttribute("plusB")); out.write("\" name=\"plusB\">\r\n"); out.write(" <span>=</span><input type=\"text\" id=\"plusResult\" value=\""); out.print(request.getAttribute("plusRequest")); out.write("\"/>\r\n"); out.write(" </p>\r\n"); out.write(" </div>\r\n"); out.write(" <div class=\"multiply\">\r\n"); out.write(" <p><input type=\"text\" value=\""); out.print(request.getAttribute("multiplyA") == null ? "" : request.getAttribute("multiplyA")); out.write("\" name=\"multiplyA\"><span>*</span>\r\n"); out.write(" <input type=\"text\" value=\""); out.print(request.getAttribute("multiplyB") == null ? "" : request.getAttribute("multiplyB")); out.write("\" name=\"multiplyB\">\r\n"); out.write( " <span>=</span><input type=\"text\" id=\"multiplyResult\" value=\""); out.print(request.getAttribute("mutilplyResult")); out.write("\" />\r\n"); out.write(" </p>\r\n"); out.write(" </div>\r\n"); out.write(" <div><input type=\"submit\" value=\"Submit\" id=\"submit\"/></div>\r\n"); out.write(" <div id=\"result\"></div>\r\n"); out.write(" </form>\r\n"); out.write("\r\n"); out.write("</body>\r\n"); out.write("</html>\r\n"); out.write("\r\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE html>\n"); out.write("<html>\n"); out.write(" <head>\n"); out.write( " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); out.write(" <title>Simple Salary Calculator</title>\n"); out.write(" <link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\"\n"); out.write(" </head>\n"); out.write(" \n"); out.write(" <body>\n"); out.write(" <h2>Simple Salary Calculator</h2>\n"); out.write(" <hr>\n"); out.write(" <form name=\"salaryForm\" action=\"results.jsp\" method=\"post\">\n"); out.write(" <table class=\"t1\">\n"); out.write(" <tbody>\n"); out.write(" <tr>\n"); out.write(" <td>Hours Worked:</td>\n"); out.write( " <td><input type=\"text\" name=\"hours\" value=\"\" size=\"50\" required</td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td>Hourly Pay:</td>\n"); out.write( " <td><input type=\"text\" name=\"pay\" value=\"\" size=\"50\" required</td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td>Pre-tax Deduct:</td>\n"); out.write( " <td><input type=\"text\" name=\"pre\" value=\"\" size=\"50\" required</td>\n"); out.write(" </tr>\n"); out.write(" <tr>\n"); out.write(" <td>Post-tax Deduct:</td>\n"); out.write( " <td><input type=\"text\" name=\"post\" value=\"\" size=\"50\" required</td>\n"); out.write(" </tr>\n"); out.write(" </tbody>\n"); out.write(" </table>\n"); out.write(" <div>\n"); out.write(" <input type=\"reset\" value=\"Clear\" id=\"clear\">\n"); out.write(" <input type=\"submit\" value=\"Submit\" id=\"submit\">\n"); out.write(" </div>\n"); out.write(" </form>\n"); out.write(" </body>\n"); out.write("</html>\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
/** Business logic to execute. */ public final Response executeCommand( Object inputPar, UserSessionParameters userSessionPars, HttpServletRequest request, HttpServletResponse response, HttpSession userSession, ServletContext context) { String serverLanguageId = ((JAIOUserSessionParameters) userSessionPars).getServerLanguageId(); Connection conn = null; PreparedStatement pstmt = null; try { conn = ConnectionManager.getConnection(context); // fires the GenericEvent.CONNECTION_CREATED event... EventsManager.getInstance() .processEvent( new GenericEvent( this, getRequestName(), GenericEvent.CONNECTION_CREATED, (JAIOUserSessionParameters) userSessionPars, request, response, userSession, context, conn, inputPar, null)); DetailSaleDocVO docVO = (DetailSaleDocVO) inputPar; // retrieve internationalization settings (Resources object)... ServerResourcesFactory factory = (ServerResourcesFactory) context.getAttribute(Controller.RESOURCES_FACTORY); Resources resources = factory.getResources(userSessionPars.getLanguageId()); // insert header... docVO.setDocStateDOC01(ApplicationConsts.HEADER_BLOCKED); Response res = insDocBean.insertSaleDoc( conn, docVO, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } SaleDocPK refPK = new SaleDocPK( docVO.getCompanyCodeSys01Doc01DOC01(), docVO.getDocTypeDoc01DOC01(), docVO.getDocYearDoc01DOC01(), docVO.getDocNumberDoc01DOC01()); // retrieve ref. document item rows... GridParams gridParams = new GridParams(); gridParams.getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, refPK); res = rowsAction.executeCommand( gridParams, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } java.util.List rows = ((VOListResponse) res).getRows(); // create rows.. GridSaleDocRowVO gridRowVO = null; DetailSaleDocRowVO rowVO = null; java.util.List discRows = null; SaleDocRowPK docRowPK = null; SaleItemDiscountVO itemDiscVO = null; gridParams = new GridParams(); for (int i = 0; i < rows.size(); i++) { gridRowVO = (GridSaleDocRowVO) rows.get(i); // retrieve row detail... docRowPK = new SaleDocRowPK( gridRowVO.getCompanyCodeSys01DOC02(), gridRowVO.getDocTypeDOC02(), gridRowVO.getDocYearDOC02(), gridRowVO.getDocNumberDOC02(), gridRowVO.getItemCodeItm01DOC02(), gridRowVO.getVariantTypeItm06DOC02(), gridRowVO.getVariantCodeItm11DOC02(), gridRowVO.getVariantTypeItm07DOC02(), gridRowVO.getVariantCodeItm12DOC02(), gridRowVO.getVariantTypeItm08DOC02(), gridRowVO.getVariantCodeItm13DOC02(), gridRowVO.getVariantTypeItm09DOC02(), gridRowVO.getVariantCodeItm14DOC02(), gridRowVO.getVariantTypeItm10DOC02(), gridRowVO.getVariantCodeItm15DOC02()); res = rowAction.executeCommand( docRowPK, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } rowVO = (DetailSaleDocRowVO) ((VOResponse) res).getVo(); rowVO.setDocTypeDOC02(docVO.getDocTypeDOC01()); rowVO.setDocNumberDOC02(docVO.getDocNumberDOC01()); if (rowVO.getInvoiceQtyDOC02().doubleValue() < rowVO.getQtyDOC02().doubleValue() && rowVO.getQtyDOC02().doubleValue() == rowVO.getOutQtyDOC02().doubleValue()) { rowVO.setQtyDOC02( rowVO .getQtyDOC02() .subtract( rowVO .getInvoiceQtyDOC02() .setScale( rowVO.getDecimalsReg02DOC02().intValue(), BigDecimal.ROUND_HALF_UP))); rowVO.setTaxableIncomeDOC02( rowVO .getQtyDOC02() .multiply(rowVO.getValueSal02DOC02()) .setScale(docVO.getDecimalsREG03().intValue(), BigDecimal.ROUND_HALF_UP)); rowVO.setTotalDiscountDOC02(new BigDecimal(0)); // calculate row vat... double vatPerc = rowVO.getValueReg01DOC02().doubleValue() * (1d - rowVO.getDeductibleReg01DOC02().doubleValue() / 100d) / 100; rowVO.setVatValueDOC02( rowVO .getTaxableIncomeDOC02() .multiply(new BigDecimal(vatPerc)) .setScale(docVO.getDecimalsREG03().intValue(), BigDecimal.ROUND_HALF_UP)); // calculate row total... rowVO.setValueDOC02(rowVO.getTaxableIncomeDOC02().add(rowVO.getVatValueDOC02())); res = insRowBean.insertSaleItem( conn, rowVO, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } // create item discounts... gridParams.getOtherGridParams().put(ApplicationConsts.SALE_DOC_ROW_PK, docRowPK); res = itemDiscAction.executeCommand( gridParams, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } discRows = ((VOListResponse) res).getRows(); for (int j = 0; j < discRows.size(); j++) { itemDiscVO = (SaleItemDiscountVO) discRows.get(j); itemDiscVO.setDocTypeDOC04(docVO.getDocTypeDOC01()); itemDiscVO.setDocNumberDOC04(docVO.getDocNumberDOC01()); res = insItemDiscBean.insertSaleDocRowDiscount( conn, itemDiscVO, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } } } } // create charges... gridParams = new GridParams(); gridParams.getOtherGridParams().put(ApplicationConsts.SALE_DOC_PK, refPK); res = chargesAction.executeCommand( gridParams, userSessionPars, request, response, userSession, context); SaleDocChargeVO chargeVO = null; if (res.isError()) { conn.rollback(); return res; } rows = ((VOListResponse) res).getRows(); for (int i = 0; i < rows.size(); i++) { chargeVO = (SaleDocChargeVO) rows.get(i); chargeVO.setDocTypeDOC03(docVO.getDocTypeDOC01()); chargeVO.setDocNumberDOC03(docVO.getDocNumberDOC01()); if (chargeVO.getValueDOC03() == null || chargeVO.getValueDOC03() != null && chargeVO.getInvoicedValueDOC03().doubleValue() < chargeVO.getValueDOC03().doubleValue()) { if (chargeVO.getValueDOC03() != null) chargeVO.setValueDOC03( chargeVO .getValueDOC03() .subtract(chargeVO.getInvoicedValueDOC03()) .setScale(docVO.getDecimalsREG03().intValue(), BigDecimal.ROUND_HALF_UP)); res = insChargeBean.insertSaleDocCharge( conn, chargeVO, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } } } // create activities... res = actAction.executeCommand( gridParams, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } SaleDocActivityVO actVO = null; rows = ((VOListResponse) res).getRows(); for (int i = 0; i < rows.size(); i++) { actVO = (SaleDocActivityVO) rows.get(i); actVO.setDocTypeDOC13(docVO.getDocTypeDOC01()); actVO.setDocNumberDOC13(docVO.getDocNumberDOC01()); if (actVO.getInvoicedValueDOC13().doubleValue() < actVO.getValueDOC13().doubleValue()) { actVO.setValueDOC13( actVO .getValueDOC13() .subtract(actVO.getInvoicedValueDOC13()) .setScale(docVO.getDecimalsREG03().intValue(), BigDecimal.ROUND_HALF_UP)); res = insActBean.insertSaleActivity( conn, actVO, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } } } // create header discounts... res = discAction.executeCommand( gridParams, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } SaleDocDiscountVO discVO = null; rows = ((VOListResponse) res).getRows(); for (int i = 0; i < rows.size(); i++) { discVO = (SaleDocDiscountVO) rows.get(i); discVO.setDocTypeDOC05(docVO.getDocTypeDOC01()); discVO.setDocNumberDOC05(docVO.getDocNumberDOC01()); res = insDiscBean.insertSaleDocDiscount( conn, discVO, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } } // recalculate all taxable incomes, vats, totals... SaleDocPK pk = new SaleDocPK( docVO.getCompanyCodeSys01DOC01(), docVO.getDocTypeDOC01(), docVO.getDocYearDOC01(), docVO.getDocNumberDOC01()); res = totals.updateTaxableIncomes( conn, pk, userSessionPars, request, response, userSession, context); if (res.isError()) { conn.rollback(); return res; } // reload doc header with updated totals... Response answer = docAction.loadSaleDoc(conn, pk, userSessionPars, request, response, userSession, context); // fires the GenericEvent.BEFORE_COMMIT event... EventsManager.getInstance() .processEvent( new GenericEvent( this, getRequestName(), GenericEvent.BEFORE_COMMIT, (JAIOUserSessionParameters) userSessionPars, request, response, userSession, context, conn, inputPar, answer)); conn.commit(); // fires the GenericEvent.AFTER_COMMIT event... EventsManager.getInstance() .processEvent( new GenericEvent( this, getRequestName(), GenericEvent.AFTER_COMMIT, (JAIOUserSessionParameters) userSessionPars, request, response, userSession, context, conn, inputPar, answer)); return answer; } catch (Throwable ex) { Logger.error( userSessionPars.getUsername(), this.getClass().getName(), "executeCommand", "Error while creating a sale invoice from a sale document", ex); try { conn.rollback(); } catch (Exception ex3) { } return new ErrorResponse(ex.getMessage()); } finally { try { pstmt.close(); } catch (Exception ex2) { } try { ConnectionManager.releaseConnection(conn, context); } catch (Exception ex1) { } } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); Class.forName("com.mysql.jdbc.Driver"); out.write("\n"); out.write(" \n"); out.write(" \n"); out.write( "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"); out.write("<html>\n"); out.write("<head>\n"); out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\">\n"); out.write(" <!-- Bootstrap css online -->\n"); out.write( " <link rel=\"stylesheet\" href=\"http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css\">\n"); out.write(" <link href=\"css/customcss.css\" rel=\"stylesheet\">\n"); out.write( " <script type=\"text/javascript\" src=\"js/jquery-1.10.2.min.js\"></script>\n"); out.write(" <script src=\"js/bootstrap.min.js\"></script>\n"); out.write("\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n"); out.write("<title>Analysis of Algorithms : D.B.Phatak</title>\n"); out.write("</head>\n"); out.write("<body>\n"); out.write("\n"); out.write("<!--Header-->\n"); out.write("\n"); out.write(" "); String name = (String) session.getAttribute("pass"); out.write("\n"); out.write(" <div class=\"container\">\n"); out.write(" <br>\n"); out.write(" <!--HEADER -->\n"); out.write(" <div class=\"header\">\n"); out.write( " <a href=\"index.jsp\" style=\"color: #000;\"> <ul class=\"nav nav-pills pull-left\" >\n"); out.write( " <li id=\"brand_icon\"> <img src=\"Images/mic_logo.png\" alt=\"\" width=\"80px\" height=\"80px\"/></li>\n"); out.write( " <li id=\"brand_name\"> <p class=\"title\"><span style=\"font-size: 70px;\">|</span> iClass <strong>Forum</strong></p></li>\n"); out.write("\n"); out.write(" </ul></a>\n"); out.write( " <!-- <p class=\"title1\">iClass</p> <p class=\"title2\">Forum</p> \n"); out.write(" -->\n"); out.write(" <form action=\"Login\" method=\"post\">\n"); out.write("\n"); out.write( " <ul class=\"nav nav-pills pull-right\" style=\"margin-top: 35px\">\n"); out.write(" <li><a href=\"index.jsp\">Home</a></li>\n"); out.write(" <li><a href=\"contactus.jsp\">Contact Us</a></li>\n"); out.write("\n"); out.write(" "); if (name != null) { try { out.write("\n"); out.write("\n"); out.write(" <li><a href=\"logout.jsp\">Logout</a></li>\n"); out.write(" <li style=\"margin-top: 10px\">Welcome "); out.print(name); out.write("</li>\n"); out.write("\n"); out.write(" "); } catch (Exception e) { System.out.println("Problem :" + e); } } else { out.write("\n"); out.write("\n"); out.write(" <li><a href=\"signup.jsp\">Login</a></li>\n"); out.write("\n"); out.write(" "); } out.write("\n"); out.write("\n"); out.write(" </ul>\n"); out.write(" </form>\n"); out.write("\n"); out.write("\n"); out.write(" </div>\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write(" <br>\n"); out.write(" \n"); out.write(" \n"); out.write("\n"); out.write(" <!-- MODAL -->\n"); out.write(" <form action=\"\" name=\"batti\" method=\"post\">\n"); out.write("\n"); out.write( " <div class=\"modal fade\" id=\"myModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\">\n"); out.write(" <div class=\"modal-dialog\">\n"); out.write(" <div class=\"modal-content\">\n"); out.write(" <div class=\"modal-header\">\n"); out.write( " <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button>\n"); out.write(" <h4 class=\"modal-title\" id=\"myModalLabel\">Answer here</h4>\n"); out.write(" </div>\n"); out.write(" <div class=\"modal-body\">\n"); out.write(" <div class=\"input-group input-group-lg\">\n"); out.write(" <span class=\"input-group-addon\">\n"); out.write( " <span class=\"glyphicon glyphicon-pencil\"></span>\n"); out.write(" </span>\n"); out.write( " <textarea class=\"form-control\" id=\"currentans\" name=\"mainanswer\" rows=\"10\" style=\"resize: vertical;\">\n"); out.write(" </textarea>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" <div class=\"modal-footer\">\n"); out.write( " <input type=\"text\" id=\"hidden\" name=\"maindata\" value=\"JAI HO\"/>\n"); out.write( " <button type=\"button\" class=\"btn btn-primary\" onClick=\"saveAns()\">Save Answer</button>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write(" </form>\n"); out.write(" <!-- MODAL ENDS HERE -->\n"); out.write("\n"); out.write("<div class=\"page1\" > \n"); out.write(" <center>\n"); out.write("\n"); out.write( " <font face=\"myFontThin\" size=\"6\" class=\"title\">Department of </font><font face=\"myFontThick\" size=\"8\"><b>Computer Science</b></font>\n"); out.write(" <br>\n"); out.write(" <font face=\"myFontThick\" size=\"5\">Prof. sunil</font>\n"); out.write(" \n"); out.write(" </center>\n"); out.write( " <br> <br> <font face=\"myFontThick\" size=\"6\"><b> bbbbbb </b></font>\n"); out.write("<br><br><br>\n"); out.write(" \n"); out.write("\n"); out.write("\n"); out.write(" "); Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/aakash", "root", "lavikothari"); Statement statement = connection.createStatement(); ResultSet resultset = statement.executeQuery("select * from qa27;"); int i = 0, no, ct = 0; String qid, bid, ansdivid, buttonid, delbuttonid, userid, answerid; while (resultset.next()) { ct++; no = resultset.getInt(1); if (i < no) { i = no; } qid = "q" + no; ansdivid = "ans" + no; bid = "b" + no; buttonid = "button" + no; delbuttonid = "delbutton" + no; userid = "user" + no; answerid = "answer" + no; out.write("\n"); out.write(" <!-- <form action=\"\" method=\"get\" name=\"batti\" > -->\n"); out.write("\t \n"); out.write("\t<div class=\"panel panel-default\">\n"); out.write(" <div class=\"panel-heading\">\n"); out.write(" <h3 class=\"panel-title\">\n"); out.write(" <div id="); out.print(userid); out.write( " style=\"font-style:bold ;font-size:15px; padding-left:0.5px ;text-shadow: 2px 2px 8px #6E6E6E\">\n"); out.write("\t \t"); out.print(resultset.getString(4)); out.write("\n"); out.write(" </div>\n"); out.write(" </h3>\n"); out.write(" </div>\n"); out.write(" <div class=\"panel-body\">\n"); out.write(" <div id="); out.print(qid); out.write(" style=\"text-align:left ;font-size:20px;font-style:italic\">\n"); out.write("\t\t\t"); out.print(resultset.getString(2)); out.write("<br><br>\n"); out.write("\t\t</div>\n"); out.write("\t \t<div class=\"panel panel-default\" id="); out.print(ansdivid); out.write(" >\n"); out.write(" \t\t\t\t<div class=\"panel-body\" >\n"); out.write(" \t\t\t \t\t<p id="); out.print(answerid); out.write('>'); out.print(resultset.getString(3)); out.write("</p>\n"); out.write(" \t\t \t\t</div>\n"); out.write("\t\t</div>\n"); out.write("\t\t<div id="); out.print(bid); out.write(" >\n"); out.write("\t\t\t "); String condition = (String) session.getAttribute("pass"); String prof1 = (String) session.getAttribute("Prof"); String prof2 = (String) session.getAttribute("Prof2"); // out.println("Lec="+condition); // out.println("prof1="+prof1); // out.println("prof2="+prof2); // System.out.println("Lec="+condition); if (condition != null && prof1.equals(prof2)) { out.write(" \n"); out.write("\n"); out.write( " <input type=\"button\" class=\"btn btn-primary btn-sm\" style=\"float:right;display:inline\" value=\"Delete\" onClick=\"delQues(this.id)\" id="); out.print(delbuttonid); out.write(" />\n"); out.write( " <input type=\"button\" class=\"btn btn-primary btn-sm\" style=\"float:left;display:inline\" data-toggle=\"modal\" value=\"Answer\" data-target=\"#myModal\" onClick=\"myfunc(this.id)\" id="); out.print(buttonid); out.write(" />\n"); out.write(" "); } out.write("\n"); out.write(" \n"); out.write("\t\t</div>\n"); out.write(" </div>\n"); out.write(" </div>\n"); out.write("\t\n"); out.write("\t \n"); out.write("\t\t\n"); out.write(" "); } out.write("\n"); out.write("\n"); out.write( " <form action=\"\" name=\"delform\" method=\"post\" style=\"visibility:hidden\">\n"); out.write("\n"); out.write( " <input type=\"text\" id= \"delfieldid\" name=\"delfield\" value=\"Namastey\" />\n"); out.write( " <input type=\"text\" id= \"futureid\" name=\"futurefield\" value=\"London\" />\n"); out.write(" </form>\n"); out.write("\n"); out.write("\n"); out.write(" <span id =\"debug\" style=\"visibility:hidden\">Hello </span>\n"); out.write("\n"); out.write(" </div>\n"); out.write("</div> \n"); out.write("\t \n"); out.write(" \n"); out.write("</div>\n"); out.write(" \n"); out.write(" </div>\n"); out.write(" \n"); out.write(" \n"); out.write(" <script type=\"text/javascript\">\n"); out.write("\t count="); out.print(ct); out.write(";\n"); out.write("\t debugging=document.getElementById(\"debug\");\n"); out.write("\t debugging.innerHTML=\"Count is\"+count;\n"); out.write("\t hid=document.getElementById(\"hidden\");\n"); out.write("\t hid.style.display='none';\n"); out.write("\t \n"); out.write("\t for (x=1;x<=count;x++)\n"); out.write("\t {\t\n"); out.write("\t\t y=document.getElementById(\"answer\"+x);\n"); out.write("\t\t debug.innerHTML+=y.innerHTML;\n"); out.write("\t\t z=document.getElementById(\"button\"+x);\n"); out.write("\t\t if(y!=null && y.innerHTML==\"\")\n"); out.write("\t\t {\n"); out.write("\t\t document.getElementById(\"ans\"+x).style.display='none';\n"); out.write("\t\t }\n"); out.write("\t\t \n"); out.write("\t\t else\n"); out.write("\t\t\t {\n"); out.write("\t\t\t if(z!=null){\n"); out.write("\t\t\t z.value=\"Edit Answer\";\n"); out.write("\t\t\t }\n"); out.write("\t\t\t }\n"); out.write("\t }\n"); out.write("\n"); out.write("\t function myfunc(clicked_id){\n"); out.write("\t\t \n"); out.write("\t\t hid.value=clicked_id;\n"); out.write("\t\t quesid=clicked_id.replace(\"button\",\"q\");\n"); out.write("\t\t ansid=clicked_id.replace(\"button\",\"answer\");\n"); out.write("\t\t \n"); out.write("\t\t question=document.getElementById(quesid).innerHTML;\n"); out.write("\t\t answer=document.getElementById(ansid).innerHTML;\n"); out.write("\t\t \n"); out.write("\t\t answer.replace(\" \",\"\");\n"); out.write("\t\t question.replace(\" \",\"\");\n"); out.write("\t\t \n"); out.write("\t\t document.getElementById(\"myModalLabel\").innerHTML=question;\n"); out.write("\t\t document.getElementById(\"currentans\").value=answer;\n"); out.write("\t\t \n"); out.write("\t }\n"); out.write("\t \n"); out.write("\t\n"); out.write("\t function saveAns()\n"); out.write("\t {\n"); out.write("\t\t document.batti.submit();\n"); out.write("\t\t \n"); out.write("\t\t "); String clid = request.getParameter("maindata"); if (clid != null) { String tobeanswered = clid.replace("button", ""); System.out.println(tobeanswered); String answer = request.getParameter("mainanswer"); Statement stmt = connection.createStatement(); String query = "update qa27 set ans ='" + answer + "' where id='" + tobeanswered + "';"; stmt.executeUpdate(query); response.sendRedirect("lec.jsp#user" + tobeanswered); } out.write("\n"); out.write("\t }\n"); out.write("\t \n"); out.write("\t \n"); out.write("\n"); out.write("\t function delQues(clicked_id)\n"); out.write("\t {\n"); out.write("\t\t \n"); out.write("\t\t document.getElementById(\"delfieldid\").value=clicked_id;\n"); out.write("\t\t \n"); out.write("\t\t \n"); out.write("\t\t\t document.getElementById(\"futureid\").value=\"yesssssssss\";\n"); out.write("\t\t v=parseInt(clicked_id.replace(\"delbutton\",\"\"))+1;\n"); out.write("\t\t while(document.getElementById(\"user\"+v)==null && v<count)\n"); out.write("\t\t\t {\n"); out.write("\t\t\t v++;\n"); out.write("\t\t\t document.getElementById(\"futureid\").value=\"user\"+v;\n"); out.write("\t\t\t }\n"); out.write("\t\t if(clicked_id==\"delbutton\"+count)\n"); out.write("\t\t\t {\n"); out.write("\t\t\t v=parseInt(clicked_id.replace(\"delbutton\",\"\"))-1;\n"); out.write("\t\t\t }\n"); out.write("\t\tdocument.getElementById(\"futureid\").value=\"user\"+v;\n"); out.write("\t\t\t \n"); out.write("\t\t document.delform.submit();\n"); out.write("\t\t \n"); out.write("\t\t "); String delid = request.getParameter("delfield"); if (delid != null) { String tobedel = delid.replace("delbutton", ""); System.out.println("Deleting " + tobedel); Statement stmt1 = connection.createStatement(); String query1 = "delete from qa27 where id='" + tobedel + "';"; stmt1.executeUpdate(query1); String futid = request.getParameter("futurefield"); response.sendRedirect("lec.jsp#" + futid); } out.write("\n"); out.write("\t\t \n"); out.write("\t }\n"); out.write("\t \n"); out.write("\t \n"); out.write("\t </script>\n"); out.write("\t\n"); out.write("\n"); out.write("</body>\n"); out.write("</html> \n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n"); out.write(" \"http://www.w3.org/TR/html4/loose.dtd\">\n"); out.write("\n"); out.write("<html>\n"); out.write("<body>\n"); out.write('\n'); out.write('\n'); PrintWriter write = new PrintWriter( new BufferedWriter(new FileWriter((getServletContext().getRealPath("/output.csv"))))); int i; String[] NoofBusstop = request.getParameterValues("NoofbusStop"); String[] routeID = request.getParameterValues("routeID"); String[] routeInterval = request.getParameterValues("routeInterval"); String[] busStopID = request.getParameterValues("busStopID"); String[] busStopName = request.getParameterValues("busStopName"); String[] busStopDescription = request.getParameterValues("busStopDescription"); String[] busStopOrder = request.getParameterValues("busStopOrder"); String[] busStopStatus = request.getParameterValues("busStopStatus"); String[] busStopPeopleNum = request.getParameterValues("busStopPeopleNum"); int a = 0; int b = 0; int count = 0; int NoofBusstops = 0; out.println( "\"routeID\",\"routeInterval \",\"busStopID\",\"busStopName\",\"busStopDescription\",\"busStopOrder\",\"busStopStatus\",\"busStopPeopleNum\""); write.println( "\"routeID\",\"routeInterval \",\"busStopID\",\"busStopName\",\"busStopDescription\",\"busStopOrder\",\"busStopStatus\",\"busStopPeopleNum\""); out.println("<BR>"); for (i = 0; i < busStopID.length; i++) { NoofBusstops = Integer.parseInt(NoofBusstop[b]); count++; if (count > NoofBusstops) { a++; b++; count = 1; } out.println( routeID[a] + "," + routeInterval[a] + "," + busStopID[i] + ",\"" + busStopName[i] + "\",\"" + busStopDescription[i] + "\"," + busStopOrder[i] + "," + busStopStatus[i] + "," + busStopPeopleNum[i] + "<BR>"); write.println( routeID[a] + "," + routeInterval[a] + "," + busStopID[i] + ",\"" + busStopName[i] + "\",\"" + busStopDescription[i] + "\"," + busStopOrder[i] + "," + busStopStatus[i] + "," + busStopPeopleNum[i]); } write.close(); /* out.println(request.getParameter("routeInterval")+"<BR>"); out.println(request.getParameter("busStopID")+"<BR>"); out.println(request.getParameter("busStopName")+"<BR>"); out.println(request.getParameter("busStopDescription")+"<BR>"); out.println(request.getParameter("busStopOrder")+"<BR>"); out.println(request.getParameter("busStopStatus")+"<BR>"); out.println(request.getParameter("busStopPeopleNum")+"<BR>"); */ out.write("\n"); out.write("\n"); out.write("</body>\n"); out.write("</html>"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write("\n"); out.write("\n"); out.write("\n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" \n"); out.write(" <!DOCTYPE html>\n"); out.write("\t<html>\n"); out.write("\t<head>\n"); out.write("\t <title>Slideshow</title>\n"); out.write("\t</head>\n"); out.write("\t<style type=\"text/css\">\n"); out.write("\t * { margin:0; padding:0;}\n"); out.write( "\t #slide { width:1300px; overflow: hidden; height: 500px; margin: 0px auto; box-shadow: 0 0 8px #000;position: relative;}\n"); out.write("\t #slide img {position: absolute;z-index: 1; display: none; left: 0;}\n"); out.write( "\t #slide p {z-index:2;position: absolute; bottom: 0; left: 0; width: 100%; padding: 0px; font-family: Arial; font-size: 14px; background: rgba(0,0,0,0.7); color: #fff;}\n"); out.write("\t</style>\n"); out.write("\t<!--[if lt IE 9]>\n"); out.write( "\t <script src=\"http://html5shim.googlecode.com/svn/trunk/html5.js\"></script>\n"); out.write("\t<![endif]-->\n"); out.write("\t<body>\n"); out.write("\t <figure id=\"slide\">\n"); out.write( " <img src=\"images/image1.jpg\" alt=\"Image 1\" width=\"100%\" height=\"100%\">\n"); out.write( " <img src=\"images/image2.jpg\" alt=\"Image 2\" width=\"100%\" height=\"100%\">\n"); out.write( " <img src=\"images/image3.jpg\" alt=\"Image 5\" width=\"100%\" height=\"100%\">\n"); out.write( " <img src=\"images/image4.jpg\" alt=\"Image 4\" width=\"100%\" height=\"100%\">\n"); out.write( "\t <img src=\"images/image5.jpg\" alt=\"Image 3\" width=\"100%\" height=\"100%\">\n"); out.write( " <img src=\"image/image6.jpg\" alt=\"Image 6\" width=\"100%\" height=\"100%\">\n"); out.write("\t </figure>\n"); out.write("\t \n"); out.write( "\t <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js\"></script>\n"); out.write("\t <script type=\"text/javascript\">\n"); out.write("\t $(document).ready(function(){\n"); out.write("\t $(\"#slide img:eq(0)\").addClass(\"active\").show();\n"); out.write("\t \n"); out.write("\t var text = $(\".active\").attr(\"alt\");\n"); out.write("\t "); out.write("\n"); out.write("\t \n"); out.write("\t setInterval(slide,3000);\n"); out.write("\t \n"); out.write("\t function slide(){\n"); out.write("\t if($(\".active\").next().size()){\n"); out.write( "\t $(\".active\").fadeOut().removeClass(\"active\").next().fadeIn().addClass(\"active\");\n"); out.write("\t }else{\n"); out.write("\t $(\".active\").fadeOut().removeClass(\"active\");\n"); out.write("\t $(\"#slide img:eq(0)\").fadeIn().addClass(\"active\");\n"); out.write("\t }\n"); out.write("\t \n"); out.write("\t var text = $(\".active\").attr(\"alt\");\n"); out.write("\t $(\"#slide p\").hide().html(text).delay(500).fadeIn();\n"); out.write("\t }\n"); out.write("\t });\n"); out.write("\t </script>\n"); out.write("\t</body>\n"); out.write("\t</html>\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=UTF-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; _jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); out.write('\n'); out.write('\n'); out.write('\n'); request.setCharacterEncoding("UTF-8"); boolean isRTL = UrlUtil.isRTL(request, response); String direction = isRTL ? "rtl" : "ltr"; if (new RequestData(application, request, response).isMozilla()) { out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n"); } else { out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"); } out.write( "<!------------------------------------------------------------------------------\n"); out.write(" ! Copyright (c) 2000, 2007 IBM Corporation and others.\n"); out.write(" ! All rights reserved. This program and the accompanying materials \n"); out.write(" ! are made available under the terms of the Eclipse Public License v1.0\n"); out.write(" ! which accompanies this distribution, and is available at\n"); out.write(" ! http://www.eclipse.org/legal/epl-v10.html\n"); out.write(" ! \n"); out.write(" ! Contributors:\n"); out.write(" ! IBM Corporation - initial API and implementation\n"); out.write( " ------------------------------------------------------------------------------->"); out.write('\n'); out.write('\n'); SearchData data = new SearchData(application, request, response); WebappPreferences prefs = data.getPrefs(); out.write("\n"); out.write("\n"); out.write("\n"); out.write("<html lang=\""); out.print(ServletResources.getString("locale", request)); out.write("\">\n"); out.write("<head>\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n"); out.write("\n"); out.write("<title>"); out.print(ServletResources.getString("SearchLabel", request)); out.write("</title>\n"); out.write(" \n"); out.write("<style type=\"text/css\">\n"); out.write("/* need this one for Mozilla */\n"); out.write("HTML { \n"); out.write("\twidth:100%;\n"); out.write("\theight:100%;\n"); out.write("\tmargin:0px;\n"); out.write("\tpadding:0px;\n"); out.write("\tborder:0px;\n"); out.write(" }\n"); out.write("\n"); out.write("BODY {\n"); out.write("\tbackground:"); out.print(prefs.getToolbarBackground()); out.write(";\n"); out.write("\tborder:0px;\n"); out.write("\theight:100%;\n"); out.write("}\n"); out.write("\n"); out.write("TABLE {\n"); out.write("\tfont: "); out.print(prefs.getToolbarFont()); out.write(";\n"); out.write("\tbackground:"); out.print(prefs.getToolbarBackground()); out.write(";\n"); out.write("\tmargin: 0px;\n"); out.write("\tpadding: 0px;\n"); out.write("\theight:100%;\n"); out.write("}\n"); out.write("\n"); out.write("FORM {\n"); out.write("\tbackground:"); out.print(prefs.getToolbarBackground()); out.write(";\n"); out.write("\theight:100%;\n"); out.write("\tmargin:0px;\n"); out.write("}\n"); out.write("\n"); out.write("INPUT {\n"); out.write("\tfont: "); out.print(prefs.getToolbarFont()); out.write(";\n"); out.write("\tmargin:0px;\n"); out.write("\tpadding:0px;\n"); out.write("}\n"); out.write("\n"); out.write("INPUT {\n"); out.write(" font-size: 1.0em;\n"); out.write("}\n"); out.write("\n"); out.write("A {\n"); out.write("\tcolor:WindowText;\n"); out.write("\ttext-decoration:none;\n"); out.write("}\n"); out.write("\n"); out.write("#searchTD {\n"); out.write("\tpadding-"); out.print(isRTL ? "right" : "left"); out.write(":7px;\n"); out.write("\tpadding-"); out.print(isRTL ? "left" : "right"); out.write(":4px;\n"); out.write("}\n"); out.write("\n"); out.write("#searchWord {\n"); out.write("\tmargin-left:5px;\n"); out.write("\tmargin-right:5px;\n"); out.write("\tborder:1px solid ThreeDShadow;\n"); out.write("}\n"); out.write("\n"); out.write("#searchLabel {\n"); out.write("\tcolor:WindowText;\n"); out.write("}\n"); out.write("\n"); out.write("#go {\n"); if (data.isMacMozilla()) { out.write("\n"); out.write(" background:GrayText;\n"); } else { out.write("\n"); out.write(" background:ThreeDShadow;\n"); } out.write("\n"); out.write("\tcolor:Window;\n"); out.write("\tfont-weight:bold;\n"); out.write("\tborder:1px solid ThreeDShadow;\n"); out.write("\tmargin-left:1px;\n"); out.write("\tfont-size: 1.0em;\n"); out.write("}\n"); out.write("\n"); out.write("#scopeLabel {\n"); out.write("\ttext-decoration:underline; \n"); out.write("\tcolor:#0066FF; \n"); out.write("\tcursor:pointer;\n"); out.write("\tpadding-left:15px; /* This should be the same for both RTL and LTR. */\n"); out.write("}\n"); out.write("\n"); out.write("#scope { \n"); out.write("\ttext-align:"); out.print(isRTL ? "left" : "right"); out.write(";\n"); out.write("\tmargin-"); out.print(isRTL ? "right" : "left"); out.write(":5px;\n"); out.write("\tborder:0px;\n"); out.write("\tcolor:WindowText;\n"); out.write("\ttext-decoration:none;\n"); out.write("}\n"); out.write("\n"); if (data.isIE()) { out.write("\n"); out.write("#go {\n"); out.write("\tpadding-"); out.print(isRTL ? "right" : "left"); out.write(":1px;\n"); out.write("}\n"); } out.write("\n"); out.write("</style>\n"); out.write("\n"); out.write("<script language=\"JavaScript\">\n"); out.write("var isIE = navigator.userAgent.indexOf('MSIE') != -1;\n"); out.write( "var isMozilla = navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;\n"); out.write("\n"); out.write("var advancedDialog;\n"); out.write("\n"); out.write("function openAdvanced() \n"); out.write("{ \n"); out.write(" var scope = document.getElementById(\"scope\").firstChild;\n"); out.write(" var workingSet = \"\"; \n"); out.write(" if (scope != null) \n"); out.write( " workingSet = document.getElementById(\"scope\").firstChild.nodeValue; \n"); out.write(" var minSize = 300; \n"); out.write(" var maxHeight= 500; \n"); out.write(" var maxWidth = 600; \n"); out.write(" var w = minSize; \n"); out.write(" var h = minSize; \n"); out.write(" \n"); out.write( " // If we have large fonts make the dialog larger, up to 500 pixels high, 600 wide\n"); out.write(" try { \n"); out.write( " var letterHeight = document.getElementById(\"searchWord\").offsetHeight; \n"); out.write(" var requiredSize = 16 * letterHeight; \n"); out.write(" if (requiredSize > minSize) { \n"); out.write(" if (requiredSize < maxWidth) { \n"); out.write(" w = requiredSize; \n"); out.write(" } else { \n"); out.write(" w = maxWidth; \n"); out.write(" }\n"); out.write(" if (requiredSize < maxHeight) { \n"); out.write(" h = requiredSize; \n"); out.write(" } else { \n"); out.write(" h = maxHeight;\n"); out.write(" }\n"); out.write(" } \n"); out.write(" \n"); out.write(" } catch (e) {} \n"); out.write(" \n"); if (data.isIE()) { out.write("\n"); out.write("\tvar l = parent.screenLeft + (parent.document.body.clientWidth - w) / 2;\n"); out.write("\tvar t = parent.screenTop + (parent.document.body.clientHeight - h) / 2;\n"); } else { out.write("\n"); out.write("\tvar l = parent.screenX + (parent.innerWidth - w) / 2;\n"); out.write("\tvar t = parent.screenY + (parent.innerHeight - h) / 2;\n"); } out.write("\n"); out.write("\t// move the dialog just a bit higher than the middle\n"); out.write("\tif (t-50 > 0) t = t-50;\n"); out.write("\t\n"); out.write("\twindow.location=\"javascript://needModal\";\n"); out.write( "\tadvancedDialog = window.open(\"workingSetManager.jsp?workingSet=\"+encodeURIComponent(workingSet), \"advancedDialog\", \"resizable=yes,height=\"+h+\",width=\"+w+\",left=\"+l+\",top=\"+t );\n"); out.write("\tadvancedDialog.focus(); \n"); out.write("}\n"); out.write("\n"); out.write("function closeAdvanced()\n"); out.write("{\n"); out.write("\ttry {\n"); out.write("\t\tif (advancedDialog)\n"); out.write("\t\t\tadvancedDialog.close();\n"); out.write("\t}\n"); out.write("\tcatch(e) {}\n"); out.write("}\n"); out.write("\n"); out.write("/**\n"); out.write(" * This function can be called from this page or from\n"); out.write(" * the advanced search page. When called from the advanced\n"); out.write(" * search page, a query is passed.\n"); out.write(" * noRefocus is a boolean which if true suppresses\n"); out.write(" * switch of focus to the search view\n"); out.write(" */\n"); out.write("function doSearch(query, noRefocus)\n"); out.write("{\n"); out.write("\tvar workingSet = document.getElementById(\"scope\").firstChild.nodeValue;\n"); out.write("\n"); out.write("\tvar form = document.forms[\"searchForm\"];\n"); out.write("\tvar searchWord = form.searchWord.value;\n"); out.write("\tvar maxHits = form.maxHits.value;\n"); out.write("\tif (!searchWord || searchWord == \"\")\n"); out.write("\t\treturn;\n"); out.write("\tquery =\"searchWord=\"+encodeURIComponent(searchWord)+\"&maxHits=\"+maxHits;\n"); out.write("\tif (workingSet != '"); out.print(UrlUtil.JavaScriptEncode(ServletResources.getString("All", request))); out.write("')\n"); out.write("\t\tquery = query +\"&scope=\"+encodeURIComponent(workingSet);\n"); out.write("\t\t\n"); out.write("\t/******** HARD CODED VIEW NAME *********/\n"); out.write("\t// do some tests to ensure the results are available\n"); out.write("\tif (parent.parent.HelpFrame && \n"); out.write("\t\tparent.parent.HelpFrame.NavFrame && \n"); out.write("\t\tparent.parent.HelpFrame.NavFrame.showView &&\n"); out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame && \n"); out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame.search && \n"); out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame) \n"); out.write("\t{\n"); out.write("\t if (!noRefocus) {\n"); out.write("\t\t parent.parent.HelpFrame.NavFrame.showView(\"search\");\n"); out.write("\t\t}\n"); out.write( "\t\tvar searchView = parent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;\n"); out.write("\t\tsearchView.location.replace(\"searchView.jsp?\"+query);\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("function getSearchWord() {\n"); out.write(" var form = document.forms[\"searchForm\"];\n"); out.write(" var searchWord = form.searchWord.value;\n"); out.write(" if (searchWord ) {\n"); out.write(" return searchWord;\n"); out.write(" }\n"); out.write(" return \"\";\n"); out.write("}\n"); out.write("\n"); out.write("function rescope() {\n"); out.write(" if (parent.parent.HelpFrame && \n"); out.write("\t\tparent.parent.HelpFrame.NavFrame && \n"); out.write("\t\tparent.parent.HelpFrame.NavFrame.ViewsFrame) {\n"); out.write("\t\tvar viewsFrame = parent.parent.HelpFrame.NavFrame.ViewsFrame;\n"); out.write("\t\tif (viewsFrame.toc && viewsFrame.toc.tocViewFrame) {\n"); out.write("\t\t var tocView = viewsFrame.toc.tocViewFrame;\n"); out.write("\t\t tocView.repaint();\n"); out.write("\t\t}\n"); out.write("\t\tif (viewsFrame.index && viewsFrame.index.indexViewFrame) {\n"); out.write("\t\t var indexView = viewsFrame.index.indexViewFrame;\n"); out.write("\t\t indexView.repaint();\n"); out.write("\t\t}\n"); out.write("\t\tdoSearch(null, true);\n"); out.write("\t}\n"); out.write("}\n"); out.write("\n"); out.write("function fixHeights()\n"); out.write("{\n"); out.write("\tif (!isIE) return;\n"); out.write("\t\n"); out.write("\tvar h = document.getElementById(\"searchWord\").offsetHeight;\n"); out.write("\tdocument.getElementById(\"go\").style.height = h;\n"); out.write("}\n"); out.write("\n"); out.write("function onloadHandler(e)\n"); out.write("{\n"); out.write("\tvar form = document.forms[\"searchForm\"];\n"); out.write("\tform.searchWord.value = '"); out.print(UrlUtil.JavaScriptEncode(data.getSearchWord())); out.write("';\n"); out.write("\tfixHeights();\n"); if (data.isScopeRequest() && RequestScope.filterBySearchScope(request)) { out.write("\n"); out.write(" rescope();\n"); } out.write("\n"); out.write("}\n"); out.write("\n"); out.write("</script>\n"); out.write("\n"); out.write("</head>\n"); out.write("\n"); out.write("<body dir=\""); out.print(direction); out.write("\" onload=\"onloadHandler()\" onunload=\"closeAdvanced()\">\n"); out.write("\n"); out.write("\t<form name=\"searchForm\" onsubmit=\"doSearch()\">\n"); out.write("\t<div role=\"search\">\n"); out.write("\t\t<table id=\"searchTable\" align=\""); out.print(isRTL ? "right" : "left"); out.write( "\" valign=\"middle\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" role=\"presentation\">\n"); out.write("\t\t\t<tr nowrap valign=\"middle\">\n"); out.write("\t\t\t\t<td "); out.print(isRTL ? "nowrap" : ""); out.write(" id=\"searchTD\">\n"); out.write("\t\t\t\t\t<label id=\"searchLabel\" for=\"searchWord\" accesskey=\""); out.print(ServletResources.getAccessKey("SearchLabel", request)); out.write("\">\n"); out.write("\t\t\t\t\t "); out.print(ServletResources.getLabel("SearchLabel", request)); out.write("\n"); out.write("\t\t\t\t\t</label>\n"); out.write("\t\t\t\t</td>\n"); out.write("\t\t\t\t<td>\n"); out.write( "\t\t\t\t\t<input type=\"text\" id=\"searchWord\" name=\"searchWord\" value='' size=\"24\" maxlength=\"256\" \n"); out.write("\t\t\t\t\t alt=\""); out.print(UrlUtil.htmlEncode(ServletResources.getString("expression_label", request))); out.write("\" \n"); out.write("\t\t\t\t\t title=\""); out.print(UrlUtil.htmlEncode(ServletResources.getString("expression_label", request))); out.write("\">\n"); out.write("\t\t\t\t</td>\n"); out.write("\t\t\t\t<td >\n"); out.write( "\t\t\t\t\t<input type=\"submit\" role=\"button\" onclick=\"this.blur();doSearch()\" value=\""); out.print(ServletResources.getString("GO", request)); out.write("\" id=\"go\" alt=\""); out.print(ServletResources.getString("GO", request)); out.write("\" title=\""); out.print(ServletResources.getString("GO", request)); out.write("\">\n"); out.write("\t\t\t\t\t<input type=\"hidden\" name=\"maxHits\" value=\"500\" >\n"); out.write("\t\t\t\t</td>\n"); out.write("\t\t\t\t<td nowrap>\n"); out.write("\t\t\t\t\t<a id=\"scopeLabel\" href=\"javascript:openAdvanced();\" title=\""); out.print(ServletResources.getString("ScopeTooltip", request)); out.write("\" alt=\""); out.print(ServletResources.getString("ScopeTooltip", request)); out.write("\" onmouseover=\"window.status='"); out.print(UrlUtil.JavaScriptEncode(ServletResources.getString("ScopeTooltip", request))); out.write("'; return true;\" onmouseout=\"window.status='';\">"); out.print(ServletResources.getLabel("Scope", request)); out.write("</a>\n"); out.write("\t\t\t\t</td>\n"); out.write("\t\t\t\t<td nowrap>\n"); out.write("\t\t\t\t\t<input type=\"hidden\" name=\"workingSet\" value='"); out.print(UrlUtil.htmlEncode(data.getScope())); out.write("'>\n"); out.write("\t\t\t\t\t<div id=\"scope\" >"); out.print(UrlUtil.htmlEncode(data.getScope())); out.write("</div>\n"); out.write("\t\t\t\t</td>\n"); out.write("\t\t\t</tr>\n"); out.write("\n"); out.write("\t\t</table>\n"); out.write("\t</div>\n"); out.write("\t</form>\t\t\n"); out.write("\n"); out.write("</body>\n"); out.write("</html>\n"); out.write("\n"); } catch (Throwable t) { if (!(t instanceof SkipPageException)) { out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } }