Skip to content

Commit

Permalink
bugfix(ITs): standalone deployment of Jakarta EE test app actually wo…
Browse files Browse the repository at this point in the history
…rks now
  • Loading branch information
lprimak committed Sep 23, 2023
1 parent c2323d0 commit 946aab8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion integration-tests/jakarta-ee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@
<groupId>com.flowlogix</groupId>
<artifactId>flowlogix-jee</artifactId>
<version>5.5.2</version>
<scope>test</scope>
</dependency>

<!-- Arquillian test dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
</factory>
<application>
<resource-handler>org.omnifaces.resourcehandler.VersionedResourceHandler</resource-handler>
<resource-handler>org.omnifaces.resourcehandler.UnmappedResourceHandler</resource-handler>
</application>
</faces-config>
4 changes: 4 additions & 0 deletions integration-tests/jakarta-ee/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
<param-name>org.omnifaces.FACES_VIEWS_SCAN_PATHS</param-name>
<param-value>/*.xhtml</param-value>
</context-param>
<context-param>
<param-name>com.flowlogix.add-unmapped-resources</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.shiro.ee.disabled</param-name>
<param-value>false</param-value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import java.net.CookieManager;
import java.net.HttpCookie;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.net.http.HttpClient;
import java.net.http.HttpHeaders;
Expand Down Expand Up @@ -240,7 +239,7 @@ static String getReferer(HttpServletRequest request) {
* @param fallbackPath
* @param resubmit if true, attempt to resubmit the form that was unsubmitted prior to logout
*/
@SneakyThrows({IOException.class, URISyntaxException.class, InterruptedException.class})
@SneakyThrows({IOException.class, InterruptedException.class})
static void redirectToSaved(HttpServletRequest request, HttpServletResponse response,
FallbackPredicate useFallbackPath, String fallbackPath, boolean resubmit) {
String savedRequest = Servlets.getRequestCookie(request, WebUtils.SAVED_REQUEST_KEY);
Expand Down Expand Up @@ -268,7 +267,7 @@ static void redirectToSaved(HttpServletRequest request, HttpServletResponse resp


private static void doRedirectToSaved(HttpServletRequest request, HttpServletResponse response,
@NonNull String savedRequest, boolean resubmit) throws IOException, URISyntaxException, InterruptedException {
@NonNull String savedRequest, boolean resubmit) throws IOException, InterruptedException {
deleteCookie(response, request.getServletContext(), WebUtils.SAVED_REQUEST_KEY);
String savedFormDataKey = Servlets.getRequestCookie(request, SHIRO_FORM_DATA_KEY);
boolean doRedirectAtEnd = true;
Expand Down Expand Up @@ -358,7 +357,7 @@ static boolean isLoginUrl(HttpServletRequest request) {
static String resubmitSavedForm(@NonNull String savedFormData, @NonNull String savedRequest,
HttpServletRequest originalRequest, HttpServletResponse originalResponse,
ServletContext servletContext, boolean rememberedAjaxResubmit)
throws InterruptedException, URISyntaxException, IOException {
throws InterruptedException, IOException {
if (log.isDebugEnabled()) {
log.debug("saved form data: {}", savedFormData);
log.debug("Set Cookie Headers: {}", originalResponse.getHeaders(SET_COOKIE));
Expand Down Expand Up @@ -477,7 +476,7 @@ private static String resubmitResponseCleanup(HttpServletRequest originalRequest
}

private static HttpClient buildHttpClient(URI savedRequest, ServletContext servletContext,
HttpServletRequest originalRequest) throws URISyntaxException {
HttpServletRequest originalRequest) {
CookieManager cookieManager = new CookieManager();
var session = SecurityUtils.getSubject().getSession();
var sessionCookieName = getSessionCookieName(servletContext, SecurityUtils.getSecurityManager());
Expand Down

0 comments on commit 946aab8

Please sign in to comment.