Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Seam v2.2.2.Final with JSF v1.2 in JBoss v7.1 – JSF tags won't render – why?
    text
    copied!<p>I'm currently migrating a larger project which primarily uses <strong>Seam 2</strong>, <strong>Hibernate</strong> and <strong>JSF 1.2</strong> from <strong>JBoss 4.2.x</strong> to <strong>JBoss 7.1</strong> – and I've managed to solve most problems so far. The application server starts just fine and deployes my EAR project without errors at the moment. JSF 1.2 und Seam 2 seam to start properly.</p> <p>However - as soon as I try to access the first page (i.e. context/login.seam) the browser loads the source of my jsp instead of the rendered content. So far I've no idea where to go on. Have web.xml, faces-config.xml or any related setup files changed for using this environment?</p> <hr> <p>Briefly summarized I've made the following updates to my project so far:</p> <p>Some lines from web.xml in WAR</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;org.jboss.jbossfaces.JSF_CONFIG_NAME&lt;/param-name&gt; &lt;param-value&gt;Mojarra-1.2&lt;/param-value&gt; &lt;/context-param&gt; &lt;listener&gt; &lt;listener-class&gt;org.jboss.seam.servlet.SeamListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;filter&gt; &lt;filter-name&gt;Seam Filter&lt;/filter-name&gt; &lt;filter-class&gt;org.jboss.seam.servlet.SeamFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;Seam Filter&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; &lt;servlet&gt; &lt;servlet-name&gt;Seam Resource Servlet&lt;/servlet-name&gt; &lt;servlet-class&gt; org.jboss.seam.servlet.SeamResourceServlet &lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;Seam Resource Servlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/seam/resource/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;servlet&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;url-pattern&gt;*.seam&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; </code></pre> <p>jboss-deployment-structure.xml in EAR</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"&gt; &lt;deployment&gt; &lt;exclusions&gt; &lt;module name="javax.faces.api" slot="main" /&gt; &lt;module name="com.sun.jsf-impl" slot="main" /&gt; &lt;/exclusions&gt; &lt;dependencies&gt; &lt;!-- Wir brauchen in jedem Fall Java Server Faces v1.2... nicht das aktuelle v2.0! --&gt; &lt;module name="javax.faces.api" slot="1.2" export="true" /&gt; &lt;module name="com.sun.jsf-impl" slot="1.2" export="true" /&gt; &lt;!-- Seam braucht einige Libraries, die der JBoss teilweise schon mitbringt... --&gt; &lt;module name="org.apache.commons.beanutils" export="true" /&gt; &lt;module name="org.apache.commons.collections" export="true" /&gt; &lt;module name="org.apache.commons.lang" export="true" /&gt; &lt;module name="org.dom4j" export="true" /&gt; &lt;module name="org.hibernate.validator" export="true" /&gt; &lt;/dependencies&gt; &lt;/deployment&gt; &lt;/jboss-deployment-structure&gt; </code></pre> <p>I've also stripped all JARs from the EAR that already come with JBoss v7.1 as modules and modified MANIFEST.MF files.</p> <p>And I've replaced Log4J with JBoss-Logging, fixed some outdated FacesMessages code and disabled @Service und @Management classes for now.</p> <p>Also my Oracle datasource has been added to standalone.xml (using ojdbc6.jar) and initializes successfully.</p> <hr> <p>PS: It's currently no option to replace Seam2 with Seam3 for this project. I've not yet tried to use the Seam2-JSF2-Branch (https://github.com/heyoulin/seam2jsf2) - I want to understand my current problems before evaluating alternatives.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload