⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install_jsp.java

📁 国外的一套开源CRM
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.util.*;
import java.io.*;
import java.net.*;
import java.sql.*;
import org.w3c.dom.*;
import org.ofbiz.security.*;
import org.ofbiz.entity.*;
import org.ofbiz.base.util.*;
import org.ofbiz.content.webapp.pseudotag.*;
import org.ofbiz.entity.model.*;
import org.ofbiz.entity.config.*;
import org.ofbiz.entity.jdbc.*;
import org.ofbiz.entity.util.*;

public class install_jsp extends HttpJspBase {


  private static java.util.Vector _jspx_includes;

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_ofbiz_url;

  public install_jsp() {
    _jspx_tagPool_ofbiz_url = new org.apache.jasper.runtime.TagHandlerPool();
  }

  public java.util.List getIncludes() {
    return _jspx_includes;
  }

  public void _jspDestroy() {
    _jspx_tagPool_ofbiz_url.release();
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=ISO-8859-1");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n\r\n");
      out.write("\r\n\r\n");
      org.ofbiz.security.Security security = null;
      synchronized (request) {
        security = (org.ofbiz.security.Security) pageContext.getAttribute("security", PageContext.REQUEST_SCOPE);
        if (security == null){
          throw new java.lang.InstantiationException("bean security not found within scope");
        }
      }
      out.write("\r\n");
      org.ofbiz.entity.GenericDelegator delegator = null;
      synchronized (request) {
        delegator = (org.ofbiz.entity.GenericDelegator) pageContext.getAttribute("delegator", PageContext.REQUEST_SCOPE);
        if (delegator == null){
          throw new java.lang.InstantiationException("bean delegator not found within scope");
        }
      }
      out.write("\r\n\r\n");

	String groupfile = request.getParameter("groupfile");
	String loadFile = request.getParameter("loadFile");
	String groupName = request.getParameter("groupName");
	String helperName = delegator.getGroupHelperName(groupName);
	String paths = EntityDataLoader.getPathsString(helperName);
	List urlList = EntityDataLoader.getUrlList(helperName);

      out.write("\r\n");
      out.write("<br>\r\nSpecify the group name for the entity group whose data you want to load:");
      out.write("<br>\r\n");
      out.write("<form method=post action='");
      if (_jspx_meth_ofbiz_url_0(pageContext))
        return;
      out.write("'>\r\n  Group Name: ");
      out.write("<INPUT type=text class=\"inputBox\" name='groupName' value='");
      out.print(groupName!=null?groupName:"org.ofbiz");
      out.write("' size='60'>\r\n  ");
      out.write("<INPUT type=submit style=\"font-size: x-small;\" value='Load Data'>\r\n");
      out.write("</form>\r\n");
      out.write("<br>\r\nOR Specify the filename of a \".xml\" file to load:");
      out.write("<br>\r\n");
      out.write("<form method=post action='");
      if (_jspx_meth_ofbiz_url_1(pageContext))
        return;
      out.write("'>\r\n  Server File Path/Name: ");
      out.write("<INPUT type=text class=\"inputBox\" name='loadFile' value='");
      out.print(loadFile!=null?loadFile:"");
      out.write("' size='60'>\r\n  ");
      out.write("<INPUT type=submit style=\"font-size: x-small;\" value='Load Data File'>\r\n");
      out.write("</form>\r\n");
      out.write("<div>OR click ");
      out.write("<a href='");
      if (_jspx_meth_ofbiz_url_2(pageContext))
        return;
      out.write("'>here");
      out.write("</a> for entity granularity security settings only (auto generated, not in a file)");
      out.write("</div>\r\n");
      out.write("<hr>\r\n");
if ("group".equals(groupfile)) {
      out.write("\r\n  ");
if (groupName != null && groupName.length() > 0) {
      out.write("\r\n    ");
if (request.getParameter("loadfiles") == null) {
      out.write("\r\n      ");
      out.write("<br>\r\n      ");
      out.write("<DIV class='head1'>Open For Business Installation (Data Load) Page");
      out.write("</DIV>\r\n      ");
      out.write("<DIV class='head2'>Do you want to load the following XML files?");
      out.write("</DIV>\r\n      ");
      out.write("<DIV class='tabletext'>(From component resources and the path list: \"");
      out.print(UtilFormatOut.checkNull(paths));
      out.write("\")");
      out.write("</DIV>\r\n      ");
      out.write("<UL>\r\n        ");
if (urlList.size() > 0) {
      out.write("\r\n          ");
Iterator urlIter = urlList.iterator();
      out.write("\r\n          ");
while (urlIter.hasNext()) {
      out.write("\r\n            ");
URL dataUrl = (URL) urlIter.next();
      out.write("\r\n            ");
      out.write("<LI>");
      out.write("<DIV class='tabletext'>");
      out.print(dataUrl.toExternalForm());
      out.write("</DIV>\r\n          ");
}
      out.write("\r\n        ");
} else {
      out.write("\r\n          ");
      out.write("<LI>");
      out.write("<DIV class='tabletext'>No XML Files found.");
      out.write("</DIV>\r\n        ");
}
      out.write("\r\n      ");
      out.write("</UL>\r\n      ");
      out.write("<A href='");
      /* ----  ofbiz:url ---- */
      org.ofbiz.content.webapp.taglib.UrlTag _jspx_th_ofbiz_url_3 = (org.ofbiz.content.webapp.taglib.UrlTag) _jspx_tagPool_ofbiz_url.get(org.ofbiz.content.webapp.taglib.UrlTag.class);
      _jspx_th_ofbiz_url_3.setPageContext(pageContext);
      _jspx_th_ofbiz_url_3.setParent(null);
      int _jspx_eval_ofbiz_url_3 = _jspx_th_ofbiz_url_3.doStartTag();
      if (_jspx_eval_ofbiz_url_3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_ofbiz_url_3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
          out = _bc;
          _jspx_th_ofbiz_url_3.setBodyContent(_bc);
          _jspx_th_ofbiz_url_3.doInitBody();
        }
        do {
          out.write("/install?loadfiles=true&groupfile=group&groupName=");
          out.print(groupName);
          int evalDoAfterBody = _jspx_th_ofbiz_url_3.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
        if (_jspx_eval_ofbiz_url_3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
          out = pageContext.popBody();
      }
      if (_jspx_th_ofbiz_url_3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_ofbiz_url.reuse(_jspx_th_ofbiz_url_3);
      out.write("' class='buttontext'>[Yes, Load Now]");
      out.write("</A>\r\n    ");
} else {
      out.write("\r\n      ");
List errorMessages = new LinkedList();
      out.write("\r\n      ");
      out.write("<br>\r\n      ");
      out.write("<DIV class='head1'>Open For Business Installation (Data Load) Page");
      out.write("</DIV>\r\n      ");
      out.write("<DIV class='head2'>Loading the XML files...");
      out.write("</DIV>\r\n      ");
      out.write("<DIV class='tabletext'>(From component resources and the path list: \"");
      out.print(UtilFormatOut.checkNull(paths));
      out.write("\")");
      out.write("</DIV>\r\n      ");
      out.write("<UL>\r\n        ");
int totalRowsChanged = 0;
      out.write("\r\n        ");
if (urlList.size() > 0) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -