Skip to main content

JSF 2.0: Residual code when rendering a page.

3 replies [Last post]
Anonymous

Hello,

I have a problem in my web project. I’m using JSF mojarra 2.0 with Facelets and its template system, JDK 1.6, Hibernate 3.2.5, Primefaces 2.0.0, all of it running in a Tomcat 6.0.24, developing in Netbeans 6.8 and deploying in an HP-UX machine. The problem: I get residual code in the page. That is, if I have an EL expression like

#{myBean.myMethod}

in my. xhtml page, when I render it in the browser I get something like

yBean.myM

in the middle of the page. Sometimes I also get something like

application
bundle

en
en

*

logout
/index.xhtml

selectItemConverter

...

...

This is my web.xml file:

<?xml version="1.0" encoding="UTF-8"?>

Developed by: edatasystems GmbH, 2010
m/reliability/fleet - DEV

javax.faces.PROJECT_STAGE
Production

Facelets additional taglibs
javax.faces.FACELETS_LIBRARIES
/WEB-INF/tlds/custom-taglib.tld.xml

Don't render show html commernts
javax.faces.FACELETS_SKIP_COMMENTS
false

com.sun.faces.allowTextChildren
true

javax.faces.STATE_SAVING_METHOD
client

File Upload Filter
...

HibernateTransactionFilter
...

File Upload Filter
Faces Servlet

HibernateTransactionFilter
Faces Servlet

”A Session Listener

A Context Listener

org.apache.commons.fileupload.servlet.FileCleanerCleanup

Faces Servlet
javax.faces.webapp.FacesServlet
1

Faces Servlet
/faces/*

Resource Servlet
org.primefaces.resource.ResourceServlet
2

Resource Servlet
/primefaces_resource/*

ImageServlet
...

ImageServlet
/ImageServlet/*

30

faces/index.xhtml

Default
/*

Faces Context
/
/faces/*
/resources/*
/primefaces_resource/*
/primefaces_comet/*

403
/faces/noaccess.xhtml?

java.lang.Throwable
/faces/noaccess.xhtml

This is my hibernate configuration file:

<?xml version="1.0" encoding="UTF-8"?>

org.hibernate.dialect.Oracle10gDialect
oracle.jdbc.OracleDriver
...
...
...
1
5

1

20

1000

1000

300

.
.
.
..

The context.xml file in the tomcat/conf/Catalina/machine/ directory is this:

<?xml version="1.0" encoding="UTF-8"?>

WEB-INF/web.xml

I have a facelets template file, which looks like this:

<?xml version='1.0' encoding='UTF-8' ?>

//

.yui-skin-sam .mask {
...
}

/** Override for default primefaces autcomplete components **/
.yui-skin-sam .yui-ac-bd{
...
}

/* styles for results list */
...
}

/* styles for result item */
.yui-skin-sam .yui-ac-content li {
...
}

/**move the list closer to input autocomplete **/
.yui-skin-sam .yui-ac-content{
...
}

Header

NavigationPath

News

headline

Login failed. Please try again.

content

footer

mainmenu

.
.
.

//

In the content section I would include a page like this:

<?xml version='1.0' encoding='UTF-8' ?>

//

.
.

here goes the page code.

.
.
.

Any ideas?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
raulpalma
Offline
Joined: 2010-10-21
Points: 0

Ok. The problem was solved. We changed from an HP-UX to a Linux-based system and change the HP virtual miachine for the latest Sun virtual machine. Now, everything work just fine :)

ethermion
Offline
Joined: 2005-06-21
Points: 0

Remove any reference to Primefaces from your web.xml. That setup is for JSF 1.x. Primefaces 2.x for JSF 2.x needs nothing in web.xml, except for upload - but I would not do that until you get this problem cleaned up.

Also note that the current version of Primefaces is 2.1, and 2.2 is almost RC. Might be worth an upgrade. Also, Mojarra should be 2.0.3.

Otherwise I don't know, but this is cleanup you need to do anyway.

raulpalma
Offline
Joined: 2010-10-21
Points: 0

The problem of changing to Primefaces 2.2 or 2.1 is that there are some components that change of behaviour, and I want the behaviour shown in the first verisons. I also tried with Mojarra 2.0.3, but the problam was not solved.

I have removed the references to primefaces in the web page, but it did not change anything.

Thanks anyway.