This commit is contained in:
Shinsuke Sugaya 2015-03-07 15:56:09 +09:00
parent 050d54a2d3
commit 82cc687495
10 changed files with 0 additions and 209 deletions

View file

@ -316,11 +316,6 @@
<artifactId>fess-suggest</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>jp.sf.fess</groupId>
<artifactId>fess-launcher</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>

View file

@ -155,8 +155,6 @@ public class Constants extends CoreLibConstants {
public static final String SEARCH_DESKTOP_PROPERTY = "search.desktop";
public static final String SEARCH_FILE_LAUNCHER_PROPERTY = "search.file.launcher";
public static final String SEARCH_RESULT_MAX_PAGE_SIZE = "search.result.max_page_size";
public static final String NOTIFICATION_TO_PROPERTY = "notification.to";

View file

@ -1,96 +0,0 @@
/*
* Copyright 2009-2015 the CodeLibs Project and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.codelibs.fess.action;
import java.io.IOException;
import javax.annotation.Resource;
import org.apache.commons.lang.StringEscapeUtils;
import org.codelibs.core.util.StringUtil;
import org.codelibs.fess.Constants;
import org.codelibs.fess.form.AppletForm;
import org.codelibs.fess.helper.SystemHelper;
import org.codelibs.sastruts.core.exception.SSCActionMessagesException;
import org.seasar.struts.annotation.ActionForm;
import org.seasar.struts.annotation.Execute;
import org.seasar.struts.util.RequestUtil;
import org.seasar.struts.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AppletAction {
private static final Logger logger = LoggerFactory.getLogger(AppletAction.class);
@ActionForm
@Resource
protected AppletForm appletForm;
@Resource
protected SystemHelper systemHelper;
public String path;
public String referrer;
public String launcherJarFile;
public String launcherJnlpFile;
@Execute(validator = true, input = "../index")
public String index() {
try {
ResponseUtil.getResponse().sendRedirect(appletForm.uri);
} catch (final IOException e) {
if (logger.isDebugEnabled()) {
logger.debug(e.getMessage(), e);
}
throw new SSCActionMessagesException(e, "errors.failed_to_redirect", appletForm.uri);
}
return null;
}
@Execute(validator = true, input = "../index")
public String launcher() {
launcherJarFile = systemHelper.getLauncherJarPath();
if (StringUtil.isBlank(launcherJarFile)) {
throw new SSCActionMessagesException("errors.no_launcher_applet_jar");
}
launcherJnlpFile = systemHelper.getLauncherJnlpPath();
if (StringUtil.isBlank(launcherJnlpFile)) {
throw new SSCActionMessagesException("errors.no_launcher_applet_jar");
}
String encoding = appletForm.encoding;
if (StringUtil.isBlank(encoding)) {
encoding = Constants.UTF_8;
}
path = StringEscapeUtils.escapeJavaScript(appletForm.uri);
final String url = RequestUtil.getRequest().getHeader("REFERER");
if (StringUtil.isBlank(url)) {
referrer = StringUtil.EMPTY;
} else {
referrer = StringEscapeUtils.escapeJavaScript(url);
}
return "launcher.jsp";
}
}

View file

@ -460,9 +460,6 @@ public class IndexAction {
ResponseUtil.getResponse().setStatus(HttpServletResponse.SC_NO_CONTENT);
return null;
} else if (Constants.TRUE.equals(crawlerProperties.getProperty(Constants.SEARCH_FILE_LAUNCHER_PROPERTY, Constants.TRUE))) {
ResponseUtil.getResponse().sendRedirect(
RequestUtil.getRequest().getContextPath() + "/applet/launcher?uri=" + S2Functions.u(url));
} else {
ResponseUtil.getResponse().sendRedirect(url + hash);
}

View file

@ -339,9 +339,6 @@ public interface FessJspPath {
/** The path of the JSP: /admin/wizard/startCrawling.jsp */
String path_AdminWizard_StartCrawlingJsp = "/admin/wizard/startCrawling.jsp";
/** The path of the JSP: /applet/launcher.jsp */
String path_Applet_LauncherJsp = "/applet/launcher.jsp";
/** The path of the JSP: /error/badRequest.jsp */
String path_Error_BadRequestJsp = "/error/badRequest.jsp";

View file

@ -65,7 +65,6 @@ errors.target_file_does_not_exist={0} file does not exist.
errors.failed_to_download_file=Failed to download {0} file.
errors.failed_to_delete_file=Failed to delete {0} file.
errors.failed_to_redirect=Failed to redirect {0}.
errors.no_launcher_applet_jar=No launcher file.
errors.unsupported_encoding={0} is not supported as encoding.
errors.docid_not_found=Not found Doc ID:{0}
errors.document_not_found=Not found URL of Doc ID:{0}
@ -467,9 +466,6 @@ labels.footer_back_to_top=Back to top
labels.header_brand_name=Fess
labels.header_form_option_btn=Options
# view/applet/launcher.jsp
labels.open_uri=Accessing {0}<br>At a first time starting, it might take a little more time to open the file.
# view/admin/fileCrawlingConfig/edit.jsp
labels.file_crawling_configuration=File Crawling Configuration
labels.file_crawling_title_details=File Crawling Configuration
@ -960,7 +956,6 @@ labels.design_file_help=Help Page (Content)
labels.design_file_header=Header
labels.design_file_error=Search Error Page
labels.design_file_cache=Cache Page
labels.design_file_appletLauncher=File Launcher Page
labels.design_file_errorHeader=Error Page (Header)
labels.design_file_errorFooter=Error Page (Footer)
labels.design_file_errorNotFound=Error Page (Not Found)

View file

@ -65,7 +65,6 @@ errors.target_file_does_not_exist=\u30d5\u30a1\u30a4\u30eb {0} \u304c\u5b58\u572
errors.failed_to_download_file={0} \u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.failed_to_delete_file=\u30d5\u30a1\u30a4\u30eb {0} \u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.failed_to_redirect={0}\u3078\u306e\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
errors.no_launcher_applet_jar=\u8d77\u52d5\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u305b\u3093\u3002
errors.unsupported_encoding={0}\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u3059\u3002
errors.docid_not_found=ID:{0}\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
errors.document_not_found=ID:{0}\u306eURL\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
@ -467,9 +466,6 @@ labels.footer_back_to_top=\u4e0a\u90e8\u3078\u79fb\u52d5
labels.header_brand_name=Fess
labels.header_form_option_btn=\u30aa\u30d7\u30b7\u30e7\u30f3
# view/applet/launcher.jsp
labels.open_uri=\u30a2\u30af\u30bb\u30b9\u4e2d: {0}<br>\u521d\u56de\u8d77\u52d5\u6642\u306b\u306f\u6642\u9593\u304c\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002
# view/admin/fileCrawlingConfig/edit.jsp
labels.file_crawling_configuration=\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a
labels.file_crawling_title_details=\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u30af\u30ed\u30fc\u30eb\u306e\u8a2d\u5b9a
@ -960,7 +956,6 @@ labels.design_file_error=\u691c\u7d22\u30a8\u30e9\u30fc\u30da\u30fc\u30b8
labels.design_file_cache=\u30ad\u30e3\u30c3\u30b7\u30e5\u30da\u30fc\u30b8
labels.design_file_help=\u30d8\u30eb\u30d7\u30da\u30fc\u30b8 (\u30d5\u30ec\u30fc\u30e0)
labels.design_file_header=\u30d8\u30c3\u30c0\u30fc
labels.design_file_appletLauncher=\u30d5\u30a1\u30a4\u30eb\u8d77\u52d5\u30da\u30fc\u30b8
labels.design_file_errorHeader=\u30a8\u30e9\u30fc\u30da\u30fc\u30b8 (\u30d8\u30c3\u30c0\u30fc)
labels.design_file_errorFooter=\u30a8\u30e9\u30fc\u30da\u30fc\u30b8 (\u30d5\u30c3\u30bf\u30fc)
labels.design_file_errorNotFound=\u30a8\u30e9\u30fc\u30da\u30fc\u30b8 (\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093)

View file

@ -110,10 +110,6 @@ new String[] {
<arg>"error"</arg>
<arg>"error.jsp"</arg>
</initMethod>
<initMethod name="addDesignJspFileName">
<arg>"appletLauncher"</arg>
<arg>"applet/launcher.jsp"</arg>
</initMethod>
<initMethod name="addDesignJspFileName">
<arg>"errorHeader"</arg>
<arg>"error/header.jsp"</arg>

View file

@ -1,43 +0,0 @@
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<title>${f:h(displayQuery)} - <bean:message
key="labels.search_title" /></title>
<link href="${f:url('/css/style-base.css')}" rel="stylesheet"
type="text/css" />
<link href="${f:url('/css/style.css')}" rel="stylesheet"
type="text/css" />
<script type="text/javascript" src="${f:url('/js/jquery-1.11.0.min.js')}"></script>
</head>
<body>
<jsp:include page="/WEB-INF/view/header.jsp" />
<div class="container">
<div class="content">
<div class="span8">
<div>
<bean:message key="labels.open_uri" arg0="${f:h(uri)}" />
</div>
<script src="${f:url('/js/applet/deploy.min.js')}"></script>
<script>
var attributes = {
code:'FileLauncher.class',
archive:'${f:url(launcherJarFile)}',
width:'100%',
height:40};
var parameters = {
jnlp_href:'${f:url(launcherJnlpFile)}',
uri:'${path}'
<c:if test="${referrer != ''}">,referrer: '${referrer}'</c:if>
};
deployJava.runApplet(attributes, parameters, '1.6');
</script>
</div>
</div>
<jsp:include page="/WEB-INF/view/footer.jsp" />
</div>
</body>
</html>

View file

@ -1,43 +0,0 @@
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<title>${f:h(displayQuery)} - <bean:message
key="labels.search_title" /></title>
<link href="${f:url('/css/style-base.css')}" rel="stylesheet"
type="text/css" />
<link href="${f:url('/css/style.css')}" rel="stylesheet"
type="text/css" />
<script type="text/javascript" src="${f:url('/js/jquery-1.11.0.min.js')}"></script>
</head>
<body>
<jsp:include page="/WEB-INF/view/header.jsp" />
<div class="container">
<div class="content">
<div class="span8">
<div>
<bean:message key="labels.open_uri" arg0="${f:h(uri)}" />
</div>
<script src="${f:url('/js/applet/deploy.min.js')}"></script>
<script>
var attributes = {
code:'FileLauncher.class',
archive:'${f:url(launcherJarFile)}',
width:'100%',
height:40};
var parameters = {
jnlp_href:'${f:url(launcherJnlpFile)}',
uri:'${path}'
<c:if test="${referrer != ''}">,referrer: '${referrer}'</c:if>
};
deployJava.runApplet(attributes, parameters, '1.6');
</script>
</div>
</div>
<jsp:include page="/WEB-INF/view/footer.jsp" />
</div>
</body>
</html>