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

  • Home
  • SEARCH
  • 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 8467861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:46:06+00:00 2026-06-10T15:46:06+00:00

I need to support both HTTP and HTTPS in my Spring Security file and

  • 0

I need to support both HTTP and HTTPS in my Spring Security file and dynamically switch between those at runtime.

So I am trying to create properties file which would contain one of any/http/https, but that won’t parse the XML config.

Spring Security config:

<sec:http entry-point-ref="portalEntryPoint">
    <sec:anonymous />
    <sec:intercept-url pattern = "/portal" access="IS_AUTHENTICATED_ANONYMOUSLY"
            requires-channel="${user-security.login.channel}" />
    <!-- rest omitted -->
</sec:http>

Properties file:

user-security.login.channel=https

I am getting following error:

Caused by: org.xml.sax.SAXParseException: cvc-enumeration-valid: Value '${user-security.login.channel}' is not facet-valid with respect to enumeration '[http, https, any]'. It must be a value from the enumeration.

I am using Spring 3 and Spring Security 2. Any ideas?

  • 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-06-10T15:46:07+00:00Added an answer on June 10, 2026 at 3:46 pm

    If you absolutely MUST then use profiles to configure your portal entry point. Obviously this means a lot of copy and paste in your spring config ….

    Example from springsource docs :

    <bean id="transferService" class="com.bank.service.internal.DefaultTransferService">
        <constructor-arg ref="accountRepository"/>
        <constructor-arg ref="feePolicy"/>
    </bean>
    
    <bean id="accountRepository" class="com.bank.repository.internal.JdbcAccountRepository">
        <constructor-arg ref="dataSource"/>
    </bean>
    
    <bean id="feePolicy" class="com.bank.service.internal.ZeroFeePolicy"/>
    
    <beans profile="dev">
        <jdbc:embedded-database id="dataSource">
            <jdbc:script location="classpath:com/bank/config/sql/schema.sql"/>
            <jdbc:script location="classpath:com/bank/config/sql/test-data.sql"/>
        </jdbc:embedded-database>
    </beans>
    
    <beans profile="production">
        <jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/datasource"/>
    </beans>
    

    link http://blog.springsource.com/2011/02/14/spring-3-1-m1-introducing-profile/

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

Sidebar

Related Questions

I need to make a dmg that support both 1x and 2x background, but
I'm using Mime::Lite to create and send E-Mails. Now I need to add support
We need to decide between Support Vector Machines and Fast Artificial Neural Network for
We have several domain objects which need to support both read-only and read-write modes;
i create an android application to support both mobile android phone and galaxy tab,
I have a requirement wherein I need to support both Oracle and PostgreSQL. I
I'm trying to create a lightweight, self-contained webservice using the spark microframework ( http://www.sparkjava.com/readme.html
I need a Python library that supports PEM files and both RSA signing and
Since i'm a poor sql developer, i need support to write a sql query
I need to support Chinese in one of my application on Windows, the problem

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.