0

To get a init parameter from same package, I can make it:

in web.xml

<context-param>
    <param-name>PARAM</param-name>
    <param-value>1</param-value>
</context-param>

and my java class:

FacesContext.getCurrentInstance().getExternalContext().getInitParameter( "PARAM" );

It's ok for same package. But, if I want access via my class java, a web.xml from another package? How I should make it?

Helio Bentzen
  • 645
  • 2
  • 12
  • 24

1 Answers1

0

You should only have a single web.xml per war. You could set parameters in a file in the same class package, and read it like this:

YourClassName.class.getResourceAsStream("/Parameters.xml");
ra2085
  • 814
  • 4
  • 13