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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:02:27+00:00 2026-06-18T07:02:27+00:00

In our web.xml we have something like <security-constraint> <auth-constraint> <role-name>ROLE_USER</role-name> </auth-constraint> <web-resource-collection> <url-pattern>/app/*</url-pattern> </web-resource-collection>

  • 0

In our web.xml we have something like

 <security-constraint>
    <auth-constraint>
        <role-name>ROLE_USER</role-name>
    </auth-constraint>
    <web-resource-collection>
        <url-pattern>/app/*</url-pattern>
    </web-resource-collection>
</security-constraint>

This is only there for our production Websphere environment.
Now we don’t test with Websphere, we use Jetty and JBoss. So we have specific Spring profiles to deal with the different security configuration for these environment. But Spring profiles scope don’t reach the web.xml and we are stuck with these security-constraint instructions which conflict with Spring Security for our test environments.

Now we could use Maven profiles to deal with that as explained in this question, but that would involve having more than 1 build, and we want to avoid that extremity.

To summarize, is there a way to not take into account the web.xml security for Jetty? (and if you have the answer for JBoss 7, that’d be great too!)

EDIT: error when executing Jetty 6 is http 500 with the short message "No Realm". Another solution could be to log automatically a default dummy user, but I don’t know if this is possible.

  • 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-18T07:02:29+00:00Added an answer on June 18, 2026 at 7:02 am

    The way finally did it (Jetty 6):

    we added a jetty-web.xml in WEB-INF:

    <?xml version="1.0"  encoding="ISO-8859-1"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
    <Configure class="org.mortbay.jetty.webapp.WebAppContext">
      <Set name="securityHandler">
          <New class="mypackage.util.JettySecurityHandler" />
      </Set>
    </Configure>
    

    The overridden SecurityHandler:

    package mypackage.util;
    
    import org.mortbay.jetty.Request;
    import org.mortbay.jetty.Response;
    import org.mortbay.jetty.security.SecurityHandler;
    import java.io.IOException;
    
    public class JettySecurityHandler extends SecurityHandler {
    
        @Override
        public boolean checkSecurityConstraints(String pathInContext, Request request, Response response)
                throws IOException {
            return true;
        }
    }
    

    This is not great because:
    – custom code
    – version specific (won’t work for Jetty 7 and 8)
    but it works.

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

Sidebar

Related Questions

I'd like to have our user landing web-server POST XML to our computation web
Our users return to our web site from an external site, to a URL
In our web application, we have multiple small applications availables. Let us say A,B,C.
In our web-application we manage our continuous integration using TeamCity. So far we have
We are having trouble getting Spring Security/Kerberos/AD to work for our web app. Our
We have a url-pattern of /* and requests get to our controller, but we
We have a couple of .asmx soap web services that handle communication between our
We are migrating our web application from Spring 2.5 to Spring 3.0.5. Looks like
HI, In our web application it prints all the logs are printed like Spring
I have a web-service which gives a xml feed for number of clients of

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.