mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
Fix Tomcat rendering issues and redirect
This commit is contained in:
parent
2d280f7b14
commit
53d562f7c9
|
@ -83,7 +83,7 @@ import javax.servlet.http.Part;
|
||||||
maxFileSize = 10_000_000,
|
maxFileSize = 10_000_000,
|
||||||
maxRequestSize = 10_000_000,
|
maxRequestSize = 10_000_000,
|
||||||
fileSizeThreshold = 1_000_000,
|
fileSizeThreshold = 1_000_000,
|
||||||
location = "/tmp/DecodeServlet")
|
location = "/tmp")
|
||||||
@WebServlet("/w/decode")
|
@WebServlet("/w/decode")
|
||||||
public final class DecodeServlet extends HttpServlet {
|
public final class DecodeServlet extends HttpServlet {
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,8 @@ public final class RedirectFilter implements Filter {
|
||||||
FilterChain filterChain) throws IOException, ServletException {
|
FilterChain filterChain) throws IOException, ServletException {
|
||||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||||
String requestURI = request.getRequestURI();
|
String requestURI = request.getRequestURI();
|
||||||
if ("/index.jspx".equals(requestURI) ||
|
if ("/".equals(requestURI) || "/index.jspx".equals(requestURI) ||
|
||||||
"/w/".equals(requestURI) ||
|
"/w/".equals(requestURI) || "/w/index.jspx".equals(requestURI)) {
|
||||||
"/w/index.jspx".equals(requestURI)) {
|
|
||||||
redirect(servletResponse, "/w/decode.jspx");
|
redirect(servletResponse, "/w/decode.jspx");
|
||||||
} else if (requestURI.startsWith(OLD_JAVADOC_PREFIX)) {
|
} else if (requestURI.startsWith(OLD_JAVADOC_PREFIX)) {
|
||||||
String withoutPrefix = requestURI.substring(OLD_JAVADOC_PREFIX.length());
|
String withoutPrefix = requestURI.substring(OLD_JAVADOC_PREFIX.length());
|
||||||
|
|
|
@ -14,19 +14,19 @@
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.1">
|
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
|
||||||
<jsp:directive.page contentType="text/html" session="false"/>
|
<jsp:directive.page contentType="text/html" session="false"/>
|
||||||
<jsp:text><![CDATA[<!DOCTYPE html>]]></jsp:text>
|
<jsp:text><![CDATA[<!DOCTYPE html>]]></jsp:text>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<title><c:out value="${requestScope['title']}"/></title>
|
<title>${requestScope['title']}</title>
|
||||||
<link rel="stylesheet" href="style.css" type="text/css"/>
|
<link rel="stylesheet" href="style.css" type="text/css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<div id="header"><h1><img src="zxing-icon.png" id="icon" alt=""/>&nbsp;<c:out value="${requestScope['title']}"/></h1></div>
|
<div id="header"><h1><img src="zxing-icon.png" id="icon" alt=""/>&nbsp;${requestScope['title']}</h1></div>
|
||||||
<p><c:out value="${requestScope['text']}"/></p>
|
<p>${requestScope['text']}</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue