mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -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,
|
||||
maxRequestSize = 10_000_000,
|
||||
fileSizeThreshold = 1_000_000,
|
||||
location = "/tmp/DecodeServlet")
|
||||
location = "/tmp")
|
||||
@WebServlet("/w/decode")
|
||||
public final class DecodeServlet extends HttpServlet {
|
||||
|
||||
|
|
|
@ -45,9 +45,8 @@ public final class RedirectFilter implements Filter {
|
|||
FilterChain filterChain) throws IOException, ServletException {
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
String requestURI = request.getRequestURI();
|
||||
if ("/index.jspx".equals(requestURI) ||
|
||||
"/w/".equals(requestURI) ||
|
||||
"/w/index.jspx".equals(requestURI)) {
|
||||
if ("/".equals(requestURI) || "/index.jspx".equals(requestURI) ||
|
||||
"/w/".equals(requestURI) || "/w/index.jspx".equals(requestURI)) {
|
||||
redirect(servletResponse, "/w/decode.jspx");
|
||||
} else if (requestURI.startsWith(OLD_JAVADOC_PREFIX)) {
|
||||
String withoutPrefix = requestURI.substring(OLD_JAVADOC_PREFIX.length());
|
||||
|
|
|
@ -14,19 +14,19 @@
|
|||
See the License for the specific language governing permissions and
|
||||
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:text><![CDATA[<!DOCTYPE html>]]></jsp:text>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title><c:out value="${requestScope['title']}"/></title>
|
||||
<title>${requestScope['title']}</title>
|
||||
<link rel="stylesheet" href="style.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<div id="header"><h1><img src="zxing-icon.png" id="icon" alt=""/>&nbsp;<c:out value="${requestScope['title']}"/></h1></div>
|
||||
<p><c:out value="${requestScope['text']}"/></p>
|
||||
<div id="header"><h1><img src="zxing-icon.png" id="icon" alt=""/>&nbsp;${requestScope['title']}</h1></div>
|
||||
<p>${requestScope['text']}</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue