JBoss 4.2.3 Servlet API 2.5 Support for JSF 2.0 Hibernate 3.0 Added support

When I deployed my project on Redhat 6 with Jboss 4.2.3, I had the following difficulties, so I decided to put it on stackoverflow so that it could help other people. If someone can suggest a good title so that it can be easily found, please

Q: How to make Jboss 4.2.x ignore old JSF libraries and use them inside your projects?

Q: How to set up a specific Jboss scan path to scan files WAR?

Q: How to associate Jboss with an IP address, and not with localhost?

Q: Where did Jboss put the exploded WARfile?

Q: Hibernate-annotationsConflicts with Jboss 4.2.3 annotations and throws the next Exception.

java.lang.ClassCastException: org.hibernate.validator.event.ValidateEventListener cannot be cast to org.hibernate.event.PreInsertEventListener 

Q: How to run JSF 2.0.xon JBoss 4.0.x? Since it JSF 2.0supports no less Servlet 2.5 API, but JBoss has Tomcat 5.x, which can support Servlet 2.4at max.

Q: How to change the servlet version of a dynamic web project?

+1
source share
1 answer

Q: How to configure a specific Jboss scan path to scan WAR files?

  • Open $JBOSS_HOME/server/default/conf/jboss-service.xml
  • Add the path where you put the war after the decimal point in the next tag. Suppose my war is inserted in/Oracle/my-web-apps

    <attribute name="URLs">
       deploy,/Oracle/my-web-apps <as many comma separated path for Jboss to scan war>
    </attribute>
    

Q: How to associate Jboss with an IP address, and not with localhost?

Associate JBOSS with an IP address so that you can access it if with an IP address with the following command

sh /Jboss/bin/run.sh -b 0.0.0.0

Q: Where did Jboss enter the exploded WAR file?

WAR /Jboss/server/default/temp/deploy, , Jboss, Jboss, .

: Jboss 4.2.x JSF- ?

JBoss, web.xml . context-param

<context-param>
   <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
   <param-value>true</param-value>
</context-param>

: http://docs.jboss.org/jbossas/6/JSF_Guide/en-US/html/

Q: Hibernate-annotations Jboss 4.2.3 .

/jboss-4.2.3.GA/server/default/lib hibernate-annotations.jar Hibernate-annotations. . .: -)

Q: JSF 2.0.x JBoss 4.0.x? JSF 2.0 , , Servlet 2.5 API, JBoss Tomcat 5.x, 2.4 .

EL-, , Servlet 3.0, Async .. JSF 2.0 Jboss 4.x

fooobar.com/questions/8761/...

JSF 2.0 EL 2.1, Servlet 2.5 EL 2.0, Servlet 2.4, - API- Servlet 2.5. 2.4 . JSF 2.0 Servlet 2.4, API EL 2.1 /WEB-INF/lib. , Tomcat 5.5.33, /WEB-INF/lib:

2.4 web.xml, JBoss EL:

<context-param>     
    <param-name>com.sun.faces.expressionFactory</param-name>
    <param-value>org.jboss.el.ExpressionFactoryImpl</param-value>   
</context-param>
    <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener> 
<context-param>
    <param-name>com.sun.faces.validateXML</param-name>
    <param-value>false</param-value>

JSF 2.0 Facelet ( JSP!) <h:form> <f:ajax> @ViewScoped @ManagedBean Tomcat 5.5.33. JBoss 4.0.5 .

, JDK 1.5, JDK 1.4. , Servlet 3.0 - el-api.jar 2.5.

: -?

Eclipse , Project Facet, , , , . Project faced

Eclipse , $ProjectWorkSpace/.settings/org.eclipse.wst.common.project.facet.core.xml facet="jst.web" 2.4, XML- Servlet 2.4 web.xml

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
                             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
0

All Articles