Having separate classes defeats what I am trying to accomplish. I am trying to combine all elements into a single DTO that can be passed around the business layer of an application without having to know the structure of the XML source. Is there any way to map specific field values of a single bean to different levels of an XML document. For instance, can JavaBean.id be mapped to XML tag MESSAGE/HEADER/ID directly without creating separate classes or inner classes to maintain the XML structure?
Annotations on several of my beans are not getting called in JSF 2.0. One of my bean's annotations, however, are getting called. Any idea why that may be?
Here's a snippet of the bean that has an annotation being correct called. This bean is called when a page with a datatable loads.
Here is an example of a bean whose annotations are never called. It is a POJO bean rather than a backing bean as above. The bean is populated when a separate backing bean's method is called from a command button.
I tried using a JSP page for my error page but got the same blank page when the business logic threw an error and the login filter was turned on. Any other ideas to try? I am using Apache Tomcat 6 if that matters.
I am using a login filter with Facelets and JSF 2.0 that is giving me a blank page when an error is generated by business logic. When I take the filter off, the error page is shown properly. It is happening on a request (rather than a forward). It worked in JSF 1.2 with JSPs. Any ideas what I might be doing wrong?
Here's the filter mapping from my web.xml.
Here's my error-page definitions in my web.xml:
My actual error page is called /pages/error.xhtml. The error is happening on a call to chain.doFilter() in the Filter. Is there a good way to see what page the filter might be trying to load on the error? Any other tips to debug?
I added the extra leading slash so the welcome-file-list now looks like:
When I hit the URL http://localhost:8080/testapp, it now finds the resource, but it doesn't recognize it as a web page that it should render in the browser. Instead, it asks if I want to save or open the resource. Any ideas on how to get the page to load in a browser by default? I thought the servlet mapping and javax.faces.DEFAULT_SUFFIX would take care of that but apparently not.
I am trying to get my application to map all files under /pages/* to JSF and facelets. However, I get a '/register.xhtml Not Found in ExternalContext as a Resource' error when I use the following web.xml with the URL http://localhost:8080/testapp. Any ideas on what might be wrong? Strangely, I can access the file as pages/register.jsf when I change the Faces Servlet mapped url-pattern to *.jsf.