You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Virtudazo, Dennis (Exchange)" <dv...@bear.com> on 2005/02/25 21:32:52 UTC
MyFaces with Weblogic -- need a production solution
To recap: I had a problem with MyFaces trying to validate the web.xml
against the dtd when run in weblogic.
The solution: use a local dtd reference.
However, I just realized I will be deploying my application as a war
file. Right now the only dtd reference that I was able to use was an
absolute path e.g "d:/dtd/web-app_2_3.dtd". But I cannot do this when I
deploy my application in production. First I don't want to hardcode an
absolute path to the location of the dtd in the production machine.
Second, If I'm going to use a local dtd, I want to bundle it in the war
file.
Question: how do I tell MyFaces to get the dtd from the war file? What
location should I put the dtd in? If I was writing my own code to parse
the xml, I would set an entity resolver. But I'm just using MyFaces
code. Does anyone know where MyFaces's entity resolver expects the dtd?
I've tried the following in my web.xml file:
<!DOCTYPE web-app SYSTEM "web-app_2.3.dtd">
<!DOCTYPE web-app PUBLIC "whatever" "web-app_2.3.dtd">
<!DOCTYPE web-app SYSTEM "/web-app_2.3.dtd">
<!DOCTYPE web-app SYSTEM "WEB-INF/web-app_2.3.dtd">
I've tried the above in combination with:
- putting the dtd in the domain directory
- putting the dtd under a WEB-INF directory under the domain directory
- putting the dtd in the web-apps WEB-INF directory
What I found to work was this combination:
<!DOCTYPE web-app SYSTEM "web-app_2.3.dtd">
And
Putting the dtd in d:/WEB-INF/
Looks like the entity resolver that MyFaces uses prepends the dtd with
"/WEB-INF" and looks for it in from the root of the file system.
Of course if I specify an absolute path it also works (e.g
"d:/dtd/web-app_2.3.dtd"), but I don't want that.
Is this a bug in MyFaces?
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************