You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2021/12/29 07:30:29 UTC
[struts] branch master updated: Update: - Fix REST Showcase JSP issue for s:link tags that replaced HTML link tags. - s:link tags cannot use JSP EL in them. Modified JSPs to use scriptlet, JSP expression, and OGNL expression to work with s:link tag.
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git
The following commit(s) were added to refs/heads/master by this push:
new 583d399 Update: - Fix REST Showcase JSP issue for s:link tags that replaced HTML link tags. - s:link tags cannot use JSP EL in them. Modified JSPs to use scriptlet, JSP expression, and OGNL expression to work with s:link tag.
new 74f1f86 Merge pull request #520 from JCgH4164838Gh792C124B5/localS2_26_RestShowcaseFix1
583d399 is described below
commit 583d399c243a5665cb23a4770d4526533c472664
Author: JCgH4164838Gh792C124B5 <43...@users.noreply.github.com>
AuthorDate: Mon Dec 27 21:23:35 2021 -0500
Update:
- Fix REST Showcase JSP issue for s:link tags that replaced HTML link tags.
- s:link tags cannot use JSP EL in them. Modified JSPs to use scriptlet,
JSP expression, and OGNL expression to work with s:link tag.
---
.../src/main/webapp/WEB-INF/content/orders-deleteConfirm.jsp | 6 ++++--
apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-edit.jsp | 6 ++++--
.../src/main/webapp/WEB-INF/content/orders-editNew.jsp | 7 +++++--
.../rest-showcase/src/main/webapp/WEB-INF/content/orders-index.jsp | 6 ++++--
apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-show.jsp | 6 ++++--
5 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-deleteConfirm.jsp b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-deleteConfirm.jsp
index 03a017c..11d02a3 100644
--- a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-deleteConfirm.jsp
+++ b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-deleteConfirm.jsp
@@ -27,8 +27,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Orders</title>
- <s:link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
- <s:link href="${pageContext.request.contextPath}/css/app.css" rel="stylesheet"></s:link>
+ <!-- Using a standard HTML link tag with JSP EL to get the contextPath may be simpler, but this is an equivalent for s:link -->
+ <s:set var="pageContextPath"><%=((HttpServletRequest)request).getContextPath()%></s:set>
+ <s:link href="%{#pageContextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
+ <s:link href="%{#pageContextPath}/css/app.css" rel="stylesheet"></s:link>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
diff --git a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-edit.jsp b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-edit.jsp
index 48ca6f0..f237641 100644
--- a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-edit.jsp
+++ b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-edit.jsp
@@ -27,8 +27,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Orders</title>
- <s:link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
- <s:link href="${pageContext.request.contextPath}/css/app.css" rel="stylesheet"></s:link>
+ <!-- Using a standard HTML link tag with JSP EL to get the contextPath may be simpler, but this is an equivalent for s:link -->
+ <s:set var="pageContextPath"><%=((HttpServletRequest)request).getContextPath()%></s:set>
+ <s:link href="%{#pageContextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
+ <s:link href="%{#pageContextPath}/css/app.css" rel="stylesheet"></s:link>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
diff --git a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-editNew.jsp b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-editNew.jsp
index 74da515..2951e5a 100644
--- a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-editNew.jsp
+++ b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-editNew.jsp
@@ -27,8 +27,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Orders</title>
- <s:link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
- <s:link href="${pageContext.request.contextPath}/css/app.css" rel="stylesheet"></s:link>
+ <!-- Using a standard HTML link tag with JSP EL to get the contextPath may be simpler, but this is an equivalent for s:link -->
+ <s:set var="pageContextPath"><%=((HttpServletRequest)request).getContextPath()%></s:set>
+ <s:link href="%{#pageContextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
+ <s:link href="%{#pageContextPath}/css/app.css" rel="stylesheet"></s:link>
+
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
diff --git a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-index.jsp b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-index.jsp
index 477e91f..7bbbc2d 100644
--- a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-index.jsp
+++ b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-index.jsp
@@ -27,8 +27,10 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Orders</title>
- <s:link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
- <s:link href="${pageContext.request.contextPath}/css/app.css" rel="stylesheet"></s:link>
+ <!-- Using a standard HTML link tag with JSP EL to get the contextPath may be simpler, but this is an equivalent for s:link -->
+ <s:set var="pageContextPath"><%=((HttpServletRequest)request).getContextPath()%></s:set>
+ <s:link href="%{#pageContextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
+ <s:link href="%{#pageContextPath}/css/app.css" rel="stylesheet"></s:link>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
diff --git a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-show.jsp b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-show.jsp
index 0c8ceb8..03153ff 100644
--- a/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-show.jsp
+++ b/apps/rest-showcase/src/main/webapp/WEB-INF/content/orders-show.jsp
@@ -27,8 +27,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Orders</title>
-<s:link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
- <s:link href="${pageContext.request.contextPath}/css/app.css" rel="stylesheet"></s:link>
+ <!-- Using a standard HTML link tag with JSP EL to get the contextPath may be simpler, but this is an equivalent for s:link -->
+ <s:set var="pageContextPath"><%=((HttpServletRequest)request).getContextPath()%></s:set>
+ <s:link href="%{#pageContextPath}/css/bootstrap.min.css" rel="stylesheet"></s:link>
+ <s:link href="%{#pageContextPath}/css/app.css" rel="stylesheet"></s:link>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->