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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:52:19+00:00 2026-06-17T15:52:19+00:00

Our web application requires custom form authentication with specific logic inside. The current form

  • 0

Our web application requires custom form authentication with specific logic inside. The current form authenticator implementation requires the authenticator module, let’s call it custom.auth.jar, to be present in %CATALINA_HOME%/lib before the web application starts. The web application uses that custom authenticator module using the following context.xml directive:

<Valve className="foo.bar.CustomAuth" characterEncoding="UTF-8"/>

As far as I understand Tomcat requirements, this module, custom.auth.jar, must be present in Tomcat’s lib directory before the web application starts, because the web application does not seem to require the authenticator code packaged with the web archive — it always tries to find it in %CATALINA_HOMA%/lib. Otherwise the web application simply cannot start:

SEVERE: Parse error in context.xml for /webapp
java.lang.ClassNotFoundException: foo.bar.CustomAuth

Due to the specifics of the authentication business logic and some protection, we were forced to introduce some kind of versioning of the authentication module, and check its version in the web application application listener — if the web application finds an incompatible version of authentication module (not checking the JAR-file provided in the Tomcat’s library directory — we use reflection instead) — it simply refuses to start reporting the compatibility error between the web application being tried to start and the authentication module. Again, an existing authenticator module must be specified in context.xml.

Despite it protects the incompatible versions, this gives some major difficulties: we cannot start another version of the same application in the same Tomcat instance, because these two applications require different versions of the authentication module. But there can be a single version in the Tomcat’s lib directory.

My question is: is it possible to package the custom FormAuthenticator directly in the web application not requiring that single version of the FormAuthenticator to be loaded before the web application is being started? This would allow to start as many versions of the web application as we want and do not touch %CATALINA_HOME%/lib at all.

In other words: how can I make Tomcat to take the custom authenticator module from the web application, not from its home library directory? Thanks.

  • 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-17T15:52:20+00:00Added an answer on June 17, 2026 at 3:52 pm

    Valve classes cannot be loaded by a webapp class loader. Take a look at the answer to this question.

    As a possible solution to the versioning issue, consider starting different Tomcat instances by overriding the CATLINA_BASE environment variable. Running with separate CATALINA_HOME and CATALINA_BASE is documented in RUNNING.txt file which can be found in Tomcat distribution. I could also share a working example configuration.

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

Sidebar

Related Questions

In our web application, we have multiple small applications availables. Let us say A,B,C.
One of our customers has a web application that requires login, and they would
Our Web application is based on IE9, which means only IE9 can open the
In our web-application we manage our continuous integration using TeamCity. So far we have
For our web application, we are sending the X-UA-Compatible -> IE=EmulateIE7 for all the
On our web application I am trying to ping a 3rd party site to
We generate reports in our web application by querying our sql server for data
As part of our web application's build process, I have set up our XSLT
Requirements: On a web page in our web application, we have a requirement to
We have a staging version of our web application (it is basically a subversion

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.