• 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
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

JSF Application Not Working on New Server

 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I've been given the task of migrating an application that I didn't write in a framework that I'm not familiar with to our new server. Lucky me, but I suspect everyone's been in this boat before.

The framework in question is JSF - I have very little experience with the framework so I know little about how things function. What I do know is that this application appears to be using MyFaces 1.1.4 (according to the jar file in WEB-INF/lib, anyway). I also know that, when I deploy the application to our old target environment (WebSphere 6.0), it works fine. If I then deploy the exact same code to our new target environment (WebSphere 6.1), it fails. The particularly frustrating part is that I have no indication as to why it's failing; there are no warnings or error messages. It seems that, whenever I reach a JSP tag such as:



It simply doesn't resolve. This should hit a backing bean named "test" and pull out the value for lastName, correct? Rather, it does nothing at all. The backing bean is never instantiated (I can see that the constructor is not being invoked) and these calls in the JSP seem to be simply ignored. Like I said, it's not giving me an error when it tries to evaluate them. Rather, they don't seem to get evaluated, at all.

The end result is that, in the old environment (WAS 6.0), I get a page that looks like this (with my own text inserted for testing purposes):



If I generate that same page in WAS 6.1, I get this:



Any ideas about this? Like I said, I'm not horribly well versed in JSF, but this seems to be some issue with JSF and WebSphere 6.1, rather than the code, so I'm gravitating toward explanations involving the jar files I'm using or what order they're being loaded, but I haven't been able to find a solution. Any thoughts from the community? I've been pulling my hair out over this one for some time now and just not getting anywhere.

Thanks,
Corey
 
Saloon Keeper
Posts: 23920
163
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
You probably should have asked about this in the WebSphere Forum.

The behavior you're seeing is consistent with the backing bean not being instantiated.

It's a good idea to check faces-config to make sure that the scope of the bean is correct - it's possible that someone fixed a WebSphere bug that was permitting an incorrect definition to work.

More likely, however, you've got a JAR issue. For older J2EE servers, you had to supply your own JSF implementation JAR. For newer ones, there's JSF built into the server and if you has a JSF implementation and the server has a JSF implementation, trouble will ensue (speaking from experience ). I wouldn't expect that to change in a minor release, but it is possible,
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the tips. I'm also guessing it's some sort of jar issue, but I can't seem to track down what it is.

Tim Holloway wrote:You probably should have asked about this in the WebSphere Forum.



I honestly wasn't sure if this was more of a JSF issue or a WebSphere issue so I was unsure of where to post it. Any chance a moderator could move this to the WebSphere forum for me?

Thanks.
 
author and cow tipper
Posts: 5001
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do I wonder about the dollar sign? Could a hash sign, #, give you different results?

-Cameron McKenzie
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cameron Wallace McKenzie wrote:Why do I wonder about the dollar sign? Could a hash sign, #, give you different results?

-Cameron McKenzie



Sorry, that was a typo on my part - I slipped from JSF back into EL. I've fixed it in my original post.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic