-
1. Re: Local page.xml navigation rules
gavin.king Mar 29, 2007 11:40 AM (in response to artur.chyzy)This should *definitely* work. Look at the code in HotDeployFilter.
-
2. Re: Local page.xml navigation rules
artur.chyzy Mar 30, 2007 5:17 AM (in response to artur.chyzy)Yes it should but it doesn't for me for sure.
Also i decided you get seam code and put some additional logs for filter.
Here are my results:
following statememnt always returns falseif ( init!=null && init.hasHotDeployableComponents() )
init != null returns true (because it exists in ServletContext) but has not got any hot deployable components
The for loop is never executed and the scan method also.
When running on debug mode i also found in logs sth like this:DEBUG [Pages] reading pages.xml DEBUG [DTDEntityResolver] trying to resolve system-id http://jboss.com/products/seam/pages-1.2.dtd] DEBUG [DTDEntityResolver] recognized Seam namespace; attempting to resolve on classpath under org/jboss/seam/ DEBUG [DTDEntityResolver] located http://jboss.com/products/seam/pages-1.2.dtd] in classpath
This comes from initialize method from Pages class@Create public void initialize() { InputStream stream = Resources.getResourceAsStream("/WEB-INF/pages.xml"); if (stream==null) { log.debug("no pages.xml file found"); } else { log.debug("reading pages.xml"); parse(stream); } }
So this method always is looking only for pages.xml.
Because the filter is never executed and Pages class looks only for pages.xml in WEB-INF it does not refresh other page.xml files.
When starting app the setter method from Init classpublic void setHotDeployPaths(File[] hotDeployJars)
is executed. The problem is that the array is always null. Thats why statement init.hasHotDeployableComponents() return false
Also my config in components.xml for debug mode looks like this<core:init debug="true" jndi-pattern="@jndiPattern@" />
jndiPattern is replaced by ant script
I don't know why but for me the filter does absolutly nothing (for loop searching for refresh is never executed)
Anyone has similar problem ? -
3. Re: Local page.xml navigation rules
gavin.king Mar 30, 2007 12:43 PM (in response to artur.chyzy)Sorry, your analysis is way off. The line which supports hot deployment of pages.xml files is this one:
getServletContext().removeAttribute( Seam.getComponentName(Pages.class) );
Which is not inside that if block. -
4. Re: Local page.xml navigation rules
artur.chyzy Apr 2, 2007 5:33 AM (in response to artur.chyzy)Then I really don't know why it doesn't work for me.
I put local page.xml files to WEB-INF/classes of war file (which is inside ear file).
The structure of folders is exactly the same like jspx files.
Example
if my web module (war) is colled Project1 then my files are in userFiles folder
f.e. /Project1/userFiles/edit.jspx.
So the local page.xml file is located in /Project/WEB-INF/classes/userFiles/edit.page.xml.
For me it is correct beacuse app works fine.
The pages.xml file is located in /Project1/WEB-INF/pages.xml and is refreshed correctly.
The local files (like edit.page.xml) is not refreshed.
Anyone had similar situation or maybe i made mistake which i'm not aware of.
Artur -
5. Re: Local page.xml navigation rules
pmuir Apr 3, 2007 11:49 AM (in response to artur.chyzy)Follow the examples/seam-gen for packaging.
/path/to/foo.xhtml /path/to/foo.page.xml
is correct