4 Replies Latest reply on Feb 2, 2010 5:12 AM by Jigar Joshi

    JSF at jboss-4.0.5.GA

    Jinsuk Solomon Newbie

      Hi,

      I had problems to see jsf tables implemented in my application that uses SUN jsf-api.jar and jsf-impl.jar on JBossAS.

      I had to remove jsf-lib at /server/default/deploy/jbossweb-tomcat55.sar/ to deploy my application(.war) without any errors and exceptions.

      After that, I could make the application work, however I could not see jsf tables at all.

      I found that the server was still looking for myfaces(in jsf-lib) and furthermore it was looking for tlds in myfaces.

      So I included tlds in .war and add in web.xml as followings:

      <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
      <taglib-location>/WEB-INF/html_basic.tld</taglib-location>



      <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
      <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>


      Plus, I commented out the followings at ${jbossr.home}/server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml

      <!--init-param>
      MyFaces tlds
      <param-name>tagLibJar0</param-name>
      <param-value>jsf-libs/myfaces-impl.jar</param-value>
      </init-param-->

      I hope that anyone who has this kind of problem can get help from my experience and I wish I can find better solution.

        • 1. Re: JSF at jboss-4.0.5.GA
          Stan Silvert Master

          See the instructions at the end of this wiki:
          http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWithIntegratedMyFaces

          To switch to the RI, you may also need to delete temp directories such as server/default/tmp and server/default/work. And of course, you need to get rid of the MyFaces context listener in your web.xml. In short, if you completely get rid of MyFaces you will have no danger of executing MyFaces classes. You shouldn't need to extract the TLD into your WAR. The proper TLD's are packaged with the RI. JSF will discover them automatically.

          In JBoss 4.2 and JBoss 5.0, the RI is installed by default.
          http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWithJSFCDDL

          Stan

          • 2. Re: JSF at jboss-4.0.5.GA
            Chris Lenz Newbie

            Thanx for the help:
            But one more question:

            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
            <param-name>compilerTargetVM</param-name>
            <param-value>1.5</param-value>
            </init-param>
            <init-param>
            <param-name>compilerSourceVM</param-name>
            <param-value>1.5</param-value>
            </init-param>

            Where can I put this.
            To my projectsettings?
            Whats the global web.xml?
            please help.

            • 3. Re: JSF at jboss-4.0.5.GA
              Stan Silvert Master

              The global web.xml is in deploy/jbossweb-tomcat55.sar/conf. This file defines things that are automatically added to the web.xml of your WAR.

              The JSP servlet is already defined in this file so you don't need to declare it in your own WAR. If you need to change the settings for the JSP servlet then you can do it in deploy/jbossweb-tomcat55.sar/conf/web.xml.

              Stan

              • 4. Re: JSF at jboss-4.0.5.GA
                Jigar Joshi Newbie

                Is it possible to deploy jsf 1.2 or 1.1 application in jboss 4.0.2 ?

                 

                i am trying to deploy sample hello world application in jboss 4.0.2 ..

                but after a day of work still i am facing deployment exceptions.

                 

                then i read,

                 

                The JSF specification was developed under the Java Community Process (JCP) as JSR 127, which released JSF 1.0 and1.1, and JSR 252 which released JSF 1.2. The first release of JSF is JSF 1.0 in 2004. JSF 1.0 supports servlet 2.3 and jsp 1.2. After JSF 1.0, JSF 1.1 was released. The main purpose of this release was bug-fixing. There were no specification or HTML renderkit changes. This version also works with same version of servlet 2.3 and jsp 1.2 as in the case of JSF 1.0

                 

                and following this link i got tomcat version on jboss4.0.2 doesn't supports jsf'sservlet specifications,

                 

                 

                http://community.jboss.org/wiki/VersionOfTomcatInJBossAS

                 

                 

                so is there any way around ?

                in any case i can't upgrade my jboss

                so is there any way, can i configure tomcat 6 with jboss 4.0.2 ?

                 

                Thanks in advance..

                 

                 

                I am continuously getting exceptions..

                i have some how managed to deploy sample application.

                 

                here is web.xml

                 

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

                <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

                 

                <listener>

                <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

                </listener>

                    <context-param>

                        <param-name>com.sun.faces.verifyObjects</param-name>

                        <param-value>false</param-value>

                    </context-param>

                    <context-param>

                        <param-name>com.sun.faces.validateXml</param-name>

                        <param-value>true</param-value>

                    </context-param>

                    <context-param>

                        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

                        <param-value>client</param-value>

                    </context-param>

                    <servlet>

                        <servlet-name>Faces Servlet</servlet-name>

                        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

                        <load-on-startup>1</load-on-startup>

                    </servlet>

                    <servlet-mapping>

                        <servlet-name>Faces Servlet</servlet-name>

                        <url-pattern>/faces/*</url-pattern>

                    </servlet-mapping>

                    <session-config>

                        <session-timeout>

                            30

                        </session-timeout>

                    </session-config>

                    <welcome-file-list>

                        <welcome-file>faces/welcomeJSF.jsp</welcome-file>

                    </welcome-file-list>

                 

                </web-app>

                but i am getting

                 

                org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application
                     org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
                     org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
                     org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
                     org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
                     org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
                     org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
                     org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
                     org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
                     org.apache.jasper.compiler.Parser.parse(Parser.java:126)
                     org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
                     org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
                     org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
                     org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
                     org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
                     org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
                     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
                     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
                     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                     javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                     com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
                     com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:439)
                     com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:114)
                     com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
                     com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
                     com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
                     javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
                     org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)