[EJB 3.0] - Re: need help for deploying javaServer face application in j
by shupingChen
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045648#4045648
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045648
19 years, 1 month
[EJB 3.0] - need help for deploying javaServer face application in jboss
by shupingChen
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)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045646#4045646
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045646
19 years, 1 month
[JBoss Seam] - Search Form Scope
by Delphi's Ghost
I have a quick question regarding the scope of a bean used in a search form. The search bean holds a fixed number of results (i.e. the first 100 results) and since it is not an unbounded query, I'd like to make it stateful so I don't have to re-query every time the user changes page number, or triggers some other action.
So, I could use the conversational scope, but that seems overkill since it is only one page. I know some of the examples use Session scope but I don't want the results lingering round in the session.
I could use a conversation since there are only a couple of links out of the page to put the end conversation tags on.
I did take a look at page scope, but it cannot be a stateful bean, but it would be nice to have a bean that lasted for the duration of the page and could be stateful.
Which leads me to another question. Whats the difference between event and page scope? For that matter, when you have a stateless bean, why have scope at all since I thought they were all shared between threads since they are stateless? My thinking was that a pool of stateless beans could be used to provide the bean to threads that needed it, and since it was stateless, after the call, it can be returned to the pool. I realize that this is probably an implementation issue on the application server, and may not apply across all servers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045644#4045644
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045644
19 years, 1 month