为什么我的 jsp 页面无法使用 https 而不是 http 解析包含 jsp 标签库?
Why can't my jsp page resolve inclusion of jsp taglibs using https instead of http?
由于公司安全更新,我最近不得不将 Web 应用程序中的所有导入从 http 更新为 https。但是我的 jstl 导入不起作用。这是一个例子。我所做的唯一更改是添加一个 s。顶线是以前的样子,底线是现在的样子:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="c" uri="https://java.sun.com/jsp/jstl/core"%>
我希望它能工作,因为 the tutorial from this link 使用 https 的方式与我尝试做的完全一样。 Copy/pasted,以防 link 死机:
<%@ taglib uri="https://java.sun.com/jsp/jstl/core" prefix="c" %>
但是我的网络应用程序服务器现在抛出这个异常:
Caused by: org.apache.jasper.JasperException: JBWEB004113: The absolute uri: https://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:57)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:278)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:218)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:124)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:412)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1456)
at org.apache.jasper.compiler.Parser.parse(Parser.java:143)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:223)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:652)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:402)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:346)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:266)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:201)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:202)
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:109)
at servlet.EditorFrontControllerServlet.service(EditorFrontControllerServlet.java:54)
... 28 more
关于为什么这不起作用的任何想法?或者如何解决?
taglib的URI只是一个标识符,不用于获取任何资源。它们在 JSTL 规范中定义:
因此 URI 必须完全相同。
由于公司安全更新,我最近不得不将 Web 应用程序中的所有导入从 http 更新为 https。但是我的 jstl 导入不起作用。这是一个例子。我所做的唯一更改是添加一个 s。顶线是以前的样子,底线是现在的样子:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="c" uri="https://java.sun.com/jsp/jstl/core"%>
我希望它能工作,因为 the tutorial from this link 使用 https 的方式与我尝试做的完全一样。 Copy/pasted,以防 link 死机:
<%@ taglib uri="https://java.sun.com/jsp/jstl/core" prefix="c" %>
但是我的网络应用程序服务器现在抛出这个异常:
Caused by: org.apache.jasper.JasperException: JBWEB004113: The absolute uri: https://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:57)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:278)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:218)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:124)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:412)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1456)
at org.apache.jasper.compiler.Parser.parse(Parser.java:143)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:223)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:652)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:402)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:346)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:266)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:201)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:202)
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:109)
at servlet.EditorFrontControllerServlet.service(EditorFrontControllerServlet.java:54)
... 28 more
关于为什么这不起作用的任何想法?或者如何解决?
taglib的URI只是一个标识符,不用于获取任何资源。它们在 JSTL 规范中定义:
因此 URI 必须完全相同。