• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error in a single xhtml causes all xhtml pages to not work.

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm developing a JSF web app with primefaces. I have noticed that if I have an error in any single xhtml page within my web app that my login xhtml does not work anymore. Once I fix the error my login page starts working.

for example: I am working on cubeConfigEdit.xhtml and it currently is not finished. My login.xhtml does not work until cubeConfigEdit.xhtml is finished and error free. This happens regardless of which page I am working on. Once the page is error free the login page starts working again. The error I see in the login.xhtml page via the browser is

XML Parsing Error: no element found Location: http://localhost:8080/pm2App/login.xhtml Line Number 1, Column 1:


Is this by design or is their a setting that overrides this behavior?

Any ideas?
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if you're writing your own login code, your troubles are just beginning. But I'll save the lecture about DIY security systems for later.

Unfortunately this is not a problem unique to JSF. I spent a lot of time screaming at Struts because of this same sort of behavior. If you include a page fragment into another page and that fragment is defective, you'll probably get a blank page displayed and no error messages to be found .

About the only thing that you can do is pare everything down to the point where something displays and build it up bit by bit.
 
Tim Resh
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim, yes I remember struts doing the same. I just wanted to make sure I was not missing anything. I am supporting both types of logins now. It just takes a change in properties file to use glassfish login. I also have to support Tomcat which does not have a nice user maintenance option. I'll take any thoughts on this if you have a better idea for tomcat. I also have to support a CAC card login, hence the properties file to control login ability. My login table also has all my user settings like theme, authorization to different screens and projects numbers, so I have to have a user login table anyway.
 
Tim Resh
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim, have you ever used butterfaces, omnifaces, or any other packaged JSF components?
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I have been using RichFaces, although their failure to provide the smooth backwards compatibility and incremental migration that differentiates the Java world from other language platforms has me considering that I may eventually leave that venue. Before RichFaces, I used the Apache MyFaces components, and in fact, there are still some remnants of MyFaces Tomahawk in one of my older apps.

Aside from custom tag add-ons, I'm also a big fan of PrettyFaces. Although JSF2 added considerable support for things like "bookmarking" JSF URLs, I still feel that PrettyFaces offers a few things that JSF2 doesn't. Especially since my older projects are stuck on RichFaces 3, where not all JSF2 functions behave properly.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic