JSF very newbie question

D

db

Hi@all

I have written a web application in jsf. It works. And then i searched
some jsf examples and tried to see the source code. In order to see it
clearly, i dragged an faces-config.xml directly to the home directory
under eclipse of the webapplication. While i opened this
faces-config.xml in eclipse, i was informed that whether to generate a
..faces-config.mex. I clicked yes. After i saw the faces-config.xml, i
deleted it immediately. Then the problem comes:

It says:

File not found: "D:\cvs\fu\workspace\zeiterfassung\faces-config.xml
(Das System kann die angegebene Datei nicht finden)".

It seems that some configuration file is changed so that it always
searches the faces-config.xml. I also deleted the .faces-config.mex,
but the error is still there. I dont know how to get rid of it? Can
someone help me?

thanks

db
 
M

Moiristo

db said:
Hi@all

I have written a web application in jsf. It works. And then i searched
some jsf examples and tried to see the source code. In order to see it
clearly, i dragged an faces-config.xml directly to the home directory
under eclipse of the webapplication. While i opened this
faces-config.xml in eclipse, i was informed that whether to generate a
.faces-config.mex. I clicked yes. After i saw the faces-config.xml, i
deleted it immediately. Then the problem comes:

It says:

File not found: "D:\cvs\fu\workspace\zeiterfassung\faces-config.xml
(Das System kann die angegebene Datei nicht finden)".

It seems that some configuration file is changed so that it always
searches the faces-config.xml. I also deleted the .faces-config.mex,
but the error is still there. I dont know how to get rid of it? Can
someone help me?

thanks

db

JSF needs the faces-config file. I guess they have hard-coded a check
for this.
 
D

db

Moiristo said:
JSF needs the faces-config file. I guess they have hard-coded a check
for this.

Thanks for reply. But how can i remove this hard-coded check since i
have my faces-config.xml in other place of the project. And i dont want
to build a new project... T_T

any idea?

db
 
M

Moiristo

db said:
Thanks for reply. But how can i remove this hard-coded check since i
have my faces-config.xml in other place of the project. And i dont want
to build a new project... T_T

Well, with Apache Myfaces, you can specify the location of the
faces-config file in the webapp web.xml file like this:

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
/WEB-INF/faces-config.xml
</param-value>
<description>
Comma separated list of URIs of (additional) faces
config files.
(e.g. /WEB-INF/my-config.xml)
See JSF 1.0 PRD2, 10.3.2
</description>
</context-param>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top