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 6614517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:20:54+00:00 2026-05-25T20:20:54+00:00

I need to serve a specific CXF web service over HTTPS (I have several

  • 0

I need to serve a specific CXF web service over HTTPS (I have several others that need to work over plain HTTP). In SecurityConfig.groovy, I set:

httpsPort = 8443

and tried both of

secureChannelDefinitionSource = '''
   CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
   PATTERN_TYPE_APACHE_ANT
   /services/doodah/**=REQUIRES_SECURE_CHANNEL
   /**=REQUIRES_INSECURE_CHANNEL
'''

and

channelConfig = [ secure: ['/services/productid/**'], insecure: '/' ]

The service stops responding to http protocol at 8080, but doesn’t appear to be on https:8443 – at least, telnet connection to 8443 fails.

If I run the app with grails run-app -https, all the application works over https.

To separate http from https services, I’ll probably need to do this: “Automatic http/httpS switching with Grails“, but for now I’d like at least to get different services running on two different ports.

  1. What steps should I follow to have one service working over HTTPS only?

  2. Looks like there is something else SSL need to work in war, like in this quesion: SSL, Tomcat and Grails?

My environment is: Grails 1.3.5, acegi-security 0.5.3 (I know it’s outdated), Tomcat 6.

  • 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-25T20:20:54+00:00Added an answer on May 25, 2026 at 8:20 pm

    Please correct me if I’m wrong.

    Both options in SecurityConfig.groovy do work.

    In a standalone Tomcat, there’s no way to programmatically enable SSL Connector, one has to enable it in global server configuration (server.xml): SSL, Tomcat and Grails.

    For run-app, I added scripts/_Events.groovy with a eventConfigureTomcat hook and copied a piece of TomcatServer.groovy in Tomcat plugin:

    eventConfigureTomcat = { Tomcat tomcat ->
        keystore = "./some-keystore"
        keystoreFile = new File(keystore)
        keyPassword = "123456"
        System.setProperty('org.mortbay.xml.XmlParser.NotValidating', 'true')
    
        if (!(keystoreFile.exists())) {
            createSSLCertificate(keystore, keyPassword, keystoreFile)
        }
    
        def httpsPort = 8443 // TODO: Take from SecurityConfig.groovy
    
        Connector sslConnector = loadInstance(
            tomcat, 'org.apache.catalina.connector.Connector')
        sslConnector.scheme = "https"
        sslConnector.secure = true
        sslConnector.port = httpsPort
        sslConnector.setProperty("SSLEnabled", "true")
        sslConnector.setAttribute("keystore", keystore)
        sslConnector.setAttribute("keystorePass", keyPassword)
        sslConnector.URIEncoding = 'UTF-8'
        tomcat.service.addConnector sslConnector
    }
    

    I don’t have to do protocol switch trick, Grails correctly redirects between http and https for me.

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

Sidebar

Related Questions

I have a web service that I have published locally. I wrote an HTML
I need to serve several Java web applications on a single server instance, but
I need to set some server specific variables in a rails application that will
I have a case where I need to serve raw swf files to the
I'm building a web application, and I need to use an architecture that allows
I have so many images in a slide show and I need serve this
i have a web.config file that looks like this: <?xml version=1.0?> <configuration> <system.web> <compilation
We have a web application (Metro web services on tomcat) and need to handle
I have a blog on Wordpress in which I need to serve contents in
I have a system in production that has several servers in several roles. I

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.