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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:50:13+00:00 2026-05-20T18:50:13+00:00

I have following web-fragment.xml in a jar file, under META-INF/ It seems I cannot

  • 0

I have following web-fragment.xml in a jar file, under META-INF/

It seems I cannot get it to work (although I think it did in previous tests).

The same content works in web.xml.

The web application is itself part of an ear, but I wouldn’t expect that to matter.

I tried with <web-app> tag and <web-fragment>. Where is the reference documentation, btw?

The idea is to include my jar in all of my ear’s wars (10+) to have common things implemented in one place (authentication, …). The question is about web-fragment, I’ll get the things working (which was the case in web.xml) once I can migrate to that.

tag was itself at 2.5 before, changed it to 3.0 (and cleaned the project to be sure).

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>javax.faces.FACELETS_RESOURCE_RESOLVER</param-name>
        <param-value>be.epc.common.web.util.EpcResourceResolver</param-value>
    </context-param>    
    <error-page>
        <error-code>403</error-code>
        <location>/epcResources/noaccess.jsf</location>
    </error-page>    
    <error-page>
        <exception-type>javax.ejb.AccessLocalException</exception-type>
        <location>/epcResources/noaccess.jsf</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/epcResources/notfound.jsf</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/epcResources/error.jsf</location>
    </error-page>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
        <url-pattern>/icefaces/*</url-pattern>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Toutes pages</web-resource-name>
            <description/>
            <url-pattern>*.xhtml</url-pattern>
            <url-pattern>*.jsf</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <description/>
            <role-name>APP_EPC</role-name>
        </auth-constraint>
        <user-data-constraint>
            <description>HTTPS</description>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <login-config>
        <auth-method>FORM</auth-method>
        <realm-name>epcRealm</realm-name>
        <form-login-config>
            <form-login-page>/unauthenticated-redirect.jsp</form-login-page>
            <form-error-page>/unauthenticated-redirect.jsp</form-error-page>
        </form-login-config>
    </login-config>
    <security-role>
        <description/>
        <role-name>APP_EPC</role-name>
    </security-role>
</web-app>
  • 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-20T18:50:14+00:00Added an answer on May 20, 2026 at 6:50 pm

    Ok, I lost some time on it, but it was quite simple.

    I use Netbeans, and expected it to put CommonWeb.jar in my WAR’s WEB-INF/lib. It didn’t. I don’t know why it does for some libraries and not for others.

    Anyway, I just unchecked “package” under my WAR project properties’ lib directory, and added an entry for the same jar in project properties / packaging, specyfing WEB-INF/lib as path. Something classical, I’m not too proud for having to ask for something like that 😉

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

Sidebar

Related Questions

I have the following web.xml <error-page> <error-code>500</error-code> <location>/WEB-INF/views/errorPages/500.jsp</location> </error-page> <error-page> <exception-type>java.lang.Exception</exception-type> <location>/WEB-INF/views/errorPages/error.jsp</location> </error-page> <error-page>
In a web project using jsp, I have following requirement Upload a file (say
I current have the following XML fragment that I'm parsing to read its values
I have the following in my Web.config: <httpHandlers> . . . <add verb=GET,HEAD path=/
I have the following Web API (GET): public class UsersController : ApiController { public
I have the following web config file. I am having some difficulty in retrieving
Say I have the following web.config: <?xml version=1.0 encoding=utf-8?> <configuration> <system.web> <authentication mode=Windows></authentication> </system.web>
I have following web.xml. my jsf tags are rendered fine outsite folder /Pages but
I have the following web service method (.ASMX file): [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat =
I have the following Web page: link to page . If you go to

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.