3 Replies Latest reply on Nov 23, 2008 10:35 PM by Hendi Sumarna

    need help for deploying javaServer face application in jboss

    shuping chen Newbie

      when I deploy the duke's bookstore application(bookstore6) on jboss 4.2.GA, it doesn't work. The application comes from the javaee tutorial on Sun's web site. It works when I deploy it on the Sun's Application Server.


      org.apache.jasper.JasperException: /chooselocale.jsp(45,12) Unknown attribute type (void) for attribute actionListener.
       org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
       org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
       org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
       org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1097)
       org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:819)
       org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
       org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
       org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
       org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
       org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
       org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
       org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
       org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
       org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
       org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
       org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
       org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
       org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
       org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
       org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
       org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
       org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
       org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
       org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
       org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
       org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
       org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       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.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)
       org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
       org.apache.jsp.index_jsp._jspService(index_jsp.java:91)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
      


        • 1. Re: need help for deploying javaServer face application in j
          shuping chen Newbie

          the code for the JSP page:

          --%>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
          <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
          <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
          <%@ taglib prefix="bookstore" uri="/WEB-INF/bookstore.tld" %>
          
          
          <%@ page errorPage="errorpage.jsp" %>
          <html>
          <head>
          <title>
          Duke's Bookstore
          </title>
          <link rel="stylesheet" type="text/css" href="stylesheet.css">
          </head>
          <body bgcolor="#FFFFFF">
          
          <center>
          <hr>
          <br> 
          <h1>
          <font size="+3" color="#CC0066">Duke's </font>
          <img src="template/duke.books.gif" alt="Duke holding books" />
          <font size="+3" color="black">Bookstore</font>
          </h1>
          </center>
          <br> 
          <hr>
          </center>
          <br> 
          
          <f:view>
           <f:loadBundle basename="com.sun.bookstore.messages.BookstoreMessages" var="bundle"/>
           <h:form>
           <h:panelGrid columns="1"
           footerClass="form-footer"
           headerClass="form-header"
           styleClass="main-background"
           columnClasses="single-column"
           summary="#{bundle.ChooseLocale}"
           title="#{bundle.ChooseLocale}" >
           <h:outputText styleClass="maintitle"
           value="#{bundle.ChooseLocale}" />
           <h:graphicImage id="mapImage" url="/template/world.jpg"
           alt="#{bundle.ChooseLocale}"
           usemap="#worldMap" />
           <bookstore:map id="worldMap" current="NAmericas" immediate="true"
           action="bookstore"
           actionListener="#{localeBean.chooseLocaleFromMap}" >
           <bookstore:area id="NAmerica" value="#{NA}"
           onmouseover="/template/world_namer.jpg"
           onmouseout="/template/world.jpg"
           targetImage="mapImage" />
           <bookstore:area id="SAmerica" value="#{SA}"
           onmouseover="/template/world_samer.jpg"
           onmouseout="/template/world.jpg"
           targetImage="mapImage" />
           <bookstore:area id="Germany" value="#{gerA}"
           onmouseover="/template/world_germany.jpg"
           onmouseout="/template/world.jpg"
           targetImage="mapImage" />
           <bookstore:area id="France" value="#{fraA}"
           onmouseover="/template/world_france.jpg"
           onmouseout="/template/world.jpg"
           targetImage="mapImage" />
           </bookstore:map>
           </h:panelGrid>
          </h:form>
          <h:form>
           <h:panelGrid id="links" columns="4"
           summary="#{bundle.chooseLocale}"
           title="#{bundle.chooseLocale}" >
           <h:commandLink id="NAmerica" action="bookstore"
           actionListener="#{localeBean.chooseLocaleFromLink}">
           <h:outputText value="#{bundle.English}" />
           </h:commandLink>
           <h:commandLink id="Germany" action="bookstore"
           actionListener="#{localeBean.chooseLocaleFromLink}" >
           <h:outputText value="#{bundle.German}" />
           </h:commandLink>
           <h:commandLink id="France" action="bookstore"
           actionListener="#{localeBean.chooseLocaleFromLink}">
           <h:outputText value="#{bundle.French}" />
           </h:commandLink>
           <h:commandLink id="SAmerica" action="bookstore"
           actionListener="#{localeBean.chooseLocaleFromLink}">
           <h:outputText value="#{bundle.Spanish}" />
           </h:commandLink>
           </h:panelGrid>
           </h:form>
          </f:view>
          </html>
          


          it uses two custom componets:MapCommonent and AreaComponent.

          • 3. Re: need help for deploying javaServer face application in j
            Hendi Sumarna Newbie

            I'm new member and new with jboss too. I got the same problem too.
            the problem is in custom tag <deferred-method> where the signature is void.
            <deferred-method>
            <method-signature>void actionListener(javax.faces.event.ActionEvent)</method-signature>
            </deferred-method>

            anyone know why?