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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:50:08+00:00 2026-06-12T12:50:08+00:00

Basic question is do we need to run our war as ROOT.war to get

  • 0

Basic question is do we need to run our war as ROOT.war to get the context path correct with spring security?

Background:

We have a grails application that is using spring security plugin. It is proxied by nginx and the war is NOT running as ROOT.war in tomcat.

Web site: https://www.example.com
Login: https://www.example.com/login

War name is foo.war and nginx is proxying requests to http://tomcat:8080/foo

Spring security is using: ${request.contextPath}

Do we install the app as a ROOT.war or is there a context path variable in grails spring security that we can modify?

The spring security auth cookies are being set with /foo in the path … and our session management in not working correctly.

  • 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-12T12:50:09+00:00Added an answer on June 12, 2026 at 12:50 pm

    @Ian-Roberts is correct.

    You cannot just use grails.app.context = '/foo' or grails.app.context = '/'. I appears that Tomcat is messing with the applications context, ergo you have to run it as ROOT.war.

    Instructions:

    • You do need grails.app.context = '/' in Config.groovy in order to do grails run-app
    • grails war ROOT.war
    • copy your war file into ROOT.war in your tomcat webapps folder.
    • create a ROOT.xml file

    ROOT.xml in $TOMCAT_CONF/Catalina/localhost

    <Context path="" antiResourceLocking="false" privileged="true" >
                      <Resource name="jdbc/****x" 
                  auth="Container" 
                  type="javax.sql.DataSource"
                  maxActive="300" 
                 edited :)
                  />
               <Resource name="jdbc/***" 
                  auth="Container" 
                 edited :)
                />
    </Context>
    

    Because I was getting URL Mapping Errors. Oh and do not try to run the war outside of the AppBase, because tomcat will not expand it and all hell will break out 🙂

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

Sidebar

Related Questions

Just a basic html link question. I have an intranet setup, and I need
I have some basic knowledge about compiling C but need to get a couple
I'm new to C#, so this may be a basic question. What I need
Basic question here - I have many lines of code that look something like:
Basic question! I have 2 tables PRODUCE +-----+--------------+ | id | fruit_name | +--------------------+
Fairly basic question i'm hoping. In the following javascript, I want to run the
really basic question, I have a string to generate as SQL statement that I
I have a very basic question about the LocalMon print monitor found at http://msdn.microsoft.com/en-us/library/windows/hardware/ff556478%28v=vs.85%29.aspx
I'm new to Flex/Actionscript and have a very basic question. Let's say I have
This is a very basic question but wanted to confirm that if we have

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.