user550738
user550738

Reputation:

JSF simple example on Tomcat works, but weird problem on GlassFish

I have a simple JSF application, a search form and results table, and a search button that calls a managed bean called SearchHandler.doSearch to populate the results. (I'm using Eclipse and WTP.)

On Tomcat everything works fine, the web page shows, click the button hits a break point in SearchHandler.doSearch, it does the search and populates the table.

However, running on GlassFish, the web page shows, click the button just causes the page to refresh. It never hits the breakpoint in SearchHandler.doSearch and doesn't do the search and populate the table.

Is there something simple I am missing?

rob

Upvotes: 0

Views: 301

Answers (1)

user550738
user550738

Reputation:

Answering my own question ...

It turns out my Eclipse (with WTP) project was configured to work with MyFaces. When I deployed it on Tomcat, everything worked fine.

But GlassFish has its own implementation of JSF in its classpath already (Mojarra). The two JSF implementations were stepping on each other's toes.

I created a new Eclipse "Dynamic Web Project" and specified "Disable Library Configuration" as the "JSF Implementation Library" and now it runs/debugs on GlassFish just fine.

Thanks for reading!

Upvotes: 1

Related Questions