You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by PÉNET LUDOVIC <l....@senat.fr> on 2014/11/25 11:34:55 UTC
Stock Tomcat 7.0.54 vs JBoss EWS 2.0
Dear all,
I am a bit puzzled in my attemps to get a very simple example app to run
on an openshift gear using the JBoss EWS 2.0 cartridge.
As far as I understand, this cartridge is equivalent to Tomcat 7.
When I look in the lib directory in my "gear" (openshift name for a VM), I
can find Tomcat 7.0.54 jars.
The attached example works just as expected on a stock 7.0.54 tomcat. I
just download the tar.gz from apache site, uncompress it and starts the
webapp.
With JBoss EWS, I got not error messages, but it seems that no beans or
context exists.
In my welcome file, accueil.xhtml, I put the following tests :
<h:body>
<h:form>
<p:panelGrid columns="1">
<!-- ok -->
<h:outputText value="Hello JSF World !"/>
<!-- ok -->
<h:outputText value="#{'test3'}"/>
<!-- ko -->
<h:outputText
value="#{facesContext.externalContext.requestContextPath}"/>
<!-- ko -->
<h:outputText value="#{testBean.test1}"/>
<!-- ko -->
<h:outputText value="#{testBean.uneMethode('Test2')}"/>
</p:panelGrid>
</h:form>
</h:body>
TestBean is just dead simple :
@Named
@SessionScoped
public class TestBean implements Serializable {
@Getter
private String test1 = "Test1";
public String uneMethode(String test) {
return "Une Methode : " + test;
}
}
I started with a @ViewAccessScoped bean, but tried a @SessionScoped one
just to be sure there was nothing wrong with DS.
I also tried to use Weld instead of OWB as I read of problems with VFS
(but they seemed to be with 1.1.x versions and AFAIK should be fixed in
1.2.x).
Does anyone have an idea of what is wrong ? Of a way to investigate ?
It does not seem to be an EL problem, nor a bean only problem as even
facesContext is not defined...
Thanks in advance !
Ludovic
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|