Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7070785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:36:29+00:00 2026-05-28T05:36:29+00:00

On login, my application is redirected from 443 to 80 : The original URL

  • 0

On login, my application is redirected from 443 to 80 :
The original URL is https://myhost.com/myapp/login.jsp
but when I submit the URL https ://myhost.com/myapp/j_spring_security_check is called, and on login success, try to connect to https://myhost.com:80/myapp/

The URL https ://myhost.com/myapp/login.jsp call a apache server.
This apache called a tomcat with http (port 11080).

The login action is handled with Spring Security with that config :

<?xml version="1.0" encoding="UTF-8"?>

<beans:beans xmlns="http://www.springframework.org/schema/security"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.1.xsd">
    <global-method-security secured-annotations="enabled">
    </global-method-security>
    <http auto-config="true">
        <intercept-url pattern="/faces/secure/**" access="ROLE_ADMIN" />
        <intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
        <form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?login_error=1"/>
        <logout logout-success-url="/index.jsp"/>
        <concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="true"/>
    </http>
    <authentication-provider>
        <jdbc-user-service data-source-ref="dataSource"/>
    </authentication-provider>
</beans:beans>

This problem is only with login and logout actions, so I think Spring Security is the problem.

Everything works fine and there is no redirection when the original URL don’t use default https port 443 : https ://myhost.com:12345/myapp/login.jsp

Everything works fine too when apache called Tomcat with protocol ajp.

Unfortunately, I have to call apache on port 443 and Tomcat with protocol http.

The thread Spring Security Https Wrong Port is nearly my problem, except I don’t called Tomcat with https, but with http.

My Tomcat configuration for connectors is :

<Connector port="11080" maxHttpHeaderSize="8192"
           maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
           enableLookups="false" redirectPort="8443" acceptCount="100"
           connectionTimeout="20000" disableUploadTimeout="true" />

<Connector port="11009" 
           enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:36:30+00:00Added an answer on May 28, 2026 at 5:36 am

    The problem seems to be the instruction response.sendRedirect which is in Spring security to login, and in my application to logout :

    response.sendRedirect(response.encodeRedirectURL(finalUrl));
    

    To solve the problem, I added a valve in tomcat as described in this article : http://blog.inuus.com/vox/2009/04/tomcat-and-ssl-accelerators.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I was redirected from the OAuth Dialog, my application URL looks like this.
I'm trying to intercept WindowsAuthenticationModule to login into application as another user, but I
My login redirect is being built with an absolute url but I need to
I would like to provide user possibility to select application language on login. But
I built a Login application in which I have 3 Windows Log In Windows
While deplyoing Struts 1.3 Login application on localhost 8080 (Apache Tomcat 6.0.16 Server). I
I have an ASP.NET Login Application. When login is successful, my application creates a
I have finally gotten my login application to function with my online database. I
i am writing code for login application. can anyone help me how to parse
I'm new to JavaFX and I'm writing a simple login application that I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.