- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在观看有关“使用 JSF 的动态 Web 应用程序”的教程,尽管我有与导师相同的代码,但还是遇到了问题。他的例子效果很好。
我认为我有几个问题。最大的问题是,我的 JSF 示例不起作用,如果我更改代码,我总是必须重新启动 Eclipse。完整发布不起作用。
23:18:14,562 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
23:18:14,695 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
23:18:14,747 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) starting
23:18:15,417 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 10) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
23:18:15,418 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 8) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
23:18:15,435 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0015: Re-attempting failed deployment JSF_Contacts.war
23:18:15,440 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found JSF_Contacts.war in deployment directory. To trigger deployment create a file called JSF_Contacts.war.dodeploy
23:18:15,455 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
23:18:15,466 INFO [org.xnio] (MSC service thread 1-4) XNIO version 3.3.1.Final
23:18:15,472 INFO [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.3.1.Final
23:18:15,501 INFO [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem
23:18:15,501 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
23:18:15,502 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem.
23:18:15,505 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem
23:18:15,512 INFO [org.jboss.as.security] (MSC service thread 1-3) WFLYSEC0001: Current PicketBox version=4.9.2.Final
23:18:15,511 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
23:18:15,514 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension
23:18:15,547 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
23:18:15,547 INFO [org.jboss.as.connector] (MSC service thread 1-7) WFLYJCA0009: Starting JCA Subsystem (IronJacamar 1.2.4.Final)
23:18:15,551 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0003: Undertow 1.2.9.Final starting
23:18:15,564 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
23:18:15,565 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0003: Undertow 1.2.9.Final starting
23:18:15,571 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = h2
23:18:15,571 INFO [org.jboss.as.naming] (MSC service thread 1-1) WFLYNAM0003: Starting Naming Service
23:18:15,570 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
23:18:15,697 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path C:\wildfly-9.0.1.Final/welcome-content
23:18:15,731 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 4.0.9.Final
23:18:15,762 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0012: Started server default-server.
23:18:15,768 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0018: Host default-host starting
23:18:15,913 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006: Undertow HTTP listener default listening on localhost/127.0.0.1:8080
23:18:16,034 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) WFLYDS0013: Started FileSystemDeploymentService for directory C:\wildfly-9.0.1.Final\standalone\deployments
23:18:16,036 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "JSF_Contacts.war" (runtime-name: "JSF_Contacts.war")
23:18:16,190 INFO [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.0.0.Final
23:18:16,211 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
23:18:16,223 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:269)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:160)
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:235)
... 5 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:437)
at sun.nio.ch.Net.bind(Net.java:429)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:182)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:147)
... 6 more
23:18:16,339 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) WFLYWELD0003: Processing weld deployment JSF_Contacts.war
23:18:16,385 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-3) HV000001: Hibernate Validator 5.1.3.Final
23:18:16,520 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0006: Starting Services for CDI deployment: JSF_Contacts.war
23:18:16,540 INFO [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900: 2.2.14 (Final)
23:18:16,561 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0009: Starting weld service for deployment JSF_Contacts.war
23:18:17,198 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."JSF_Contacts.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."JSF_Contacts.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type SalutationHandler with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private training.data.ContactData.salutationHandler
at training.data.ContactData.salutationHandler(ContactData.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
23:18:17,201 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("core-service" => "management"),
("management-interface" => "http-interface")
]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.serverManagement.controller.management.http" => "org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
Caused by: java.net.BindException: Address already in use: bind"}}
23:18:17,202 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "JSF_Contacts.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"JSF_Contacts.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"JSF_Contacts.war\".WeldStartService: Failed to start service
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type SalutationHandler with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private training.data.ContactData.salutationHandler
at training.data.ContactData.salutationHandler(ContactData.java:0)
"}}
23:18:17,224 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "JSF_Contacts.war" (runtime-name : "JSF_Contacts.war")
23:18:17,225 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."JSF_Contacts.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."JSF_Contacts.war".WeldStartService: Failed to start service
service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
23:18:17,299 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0063: Http management interface is not enabled
23:18:17,300 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0054: Admin console is not enabled
23:18:17,300 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) started (with errors) in 2915ms - Started 274 of 478 services (21 services failed or missing dependencies, 221 services are lazy, passive or on-demand)
23:18:17,319 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0010: Stopping weld service for deployment JSF_Contacts.war
23:18:17,336 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028: Stopped deployment JSF_Contacts.war (runtime-name: JSF_Contacts.war) in 18ms
23:18:17,367 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "JSF_Contacts.war" (runtime-name: "JSF_Contacts.war")
23:18:17,368 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.deployment.unit."JSF_Contacts.war".WeldBootstrapService (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.deployment.unit."JSF_Contacts.war".CdiValidatorFactoryService]
service jboss.deployment.unit."JSF_Contacts.war".WeldStartService (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService, service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacetTag".WeldInstantiator, service jboss.deployment.unit."JSF_Contacts.war".CdiValidatorFactoryService]
service jboss.deployment.unit."JSF_Contacts.war".component."com.sun.faces.config.ConfigureListener".CREATE (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."com.sun.faces.config.ConfigureListener".START]
service jboss.deployment.unit."JSF_Contacts.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService, service jboss.deployment.unit."JSF_Contacts.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./JSF_Contacts]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacesServlet".CREATE (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacesServlet".START]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacesServlet".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacesServlet".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacesServlet".START]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".CREATE (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".CREATE (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START]
service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldInitialListener".CREATE (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldInitialListener".START]
service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldInitialListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldInitialListener".START]
service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldTerminalListener".CREATE (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldTerminalListener".START]
service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldTerminalListener".START]
service jboss.deployment.unit."JSF_Contacts.war".ee.ComponentRegistry (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.deployment.unit."JSF_Contacts.war".jndiDependencyService (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START, service jboss.deployment.unit."JSF_Contacts.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START, service jboss.deployment.unit."JSF_Contacts.war".component."javax.faces.webapp.FacetTag".START, service jboss.deployment.unit."JSF_Contacts.war".component."org.jboss.weld.servlet.WeldInitialListener".START, WFLYCTL0208: ... and 3 more ]
service jboss.server.global-request-controller.control-point."JSF_Contacts.war".undertow (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.undertow.deployment.default-server.default-host./JSF_Contacts (missing) dependents: [service jboss.deployment.unit."JSF_Contacts.war".deploymentCompleteService]
service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.codec (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.session (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JSF_Contacts.UndertowDeploymentInfoService]
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."JSF_Contacts.war".WeldStartService
service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
23:18:22,242 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found JSF_Contacts.war in deployment directory. To trigger deployment create a file called JSF_Contacts.war.dodeploy
package training.data;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;
@SuppressWarnings("serial")
@Named
@SessionScoped
public class ContactData implements Serializable {
private String firstName;
private String lastName;
private String email;
private String phone;
private String message;
private String salutation;
@Inject
private SalutationHandler salutationHandler;
@PostConstruct
private void initialize() {
salutation = salutationHandler.getSalutations().get(0);
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getSalutation() {
return salutation;
}
public void setSalutation(String salutation) {
this.salutation = salutation;
}
}
package training.data;
import javax.enterprise.context.Dependent;
import javax.inject.Named;
@Named
@Dependent
public class ContactsController {
public String showData() {
return "data";
}
public String inputData() {
return "index";
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<meta http-equiv="X-UA-Compatible" content="IE-edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/bootstrap-theme.css" />
</h:head>
<body>
<div class="container">
<div class="jumbotron">
<h1>Kontakt</h1>
<div>Bitte füllen Sie das Formular vollständig aus!</div>
</div>
<h:form>
<div class="form-group">
<h:outputLabel value="Andrede" for="salutation" />
<h:selecOneMenu value="#{contactData.salutation}" id="salutation"
styleClass="form-control">
<f:selectItems value="#salutationHandler.salutations" />
</h:selecOneMenu>
</div>
<div class="form-group">
<h:outputLabel value="Ihr Nachname" for="lastName" />
<h:inputText value="#{contactData.lastName}" id="lastName"
styleClass="form-control" />
</div>
<div class="form-group">
<label>Ihr Vorname</label>
<h:inputText value="#{contactData.firstName}"
styleClass="form-control" />
</div>
<div class="form-group">
<label>Ihre E-Mail</label>
<h:inputText value="#{contactData.email}" styleClass="form-control" />
</div>
<div class="form-group">
<label>Phone</label>
<h:inputText value="#{contactData.phone}" styleClass="form-control" />
</div>
<div class="form-group">
<label>Ihre Nachricht</label>
<h:inputTextarea value="#{contactData.message}" rows="7"
styleClass="form-control" />
</div>
<div class="row">
<div class="col-lg-12">
<h:commandButton action="#{contactsController.showData()}"
value="Absenden" styleClass="btn btn-success" />
</div>
</div>
</h:form>
</div>
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
<小时/>
原因是导入错误。我必须导入
javax.ejb.Singleton;
而不是
javax.inject.Singleton;
最佳答案
仔细阅读堆栈跟踪...尤其是第一个跟踪和由消息引起的。您将看到:java.net.BindException:地址已在使用中
。
这是什么意思?这意味着在启动过程中,jboss尝试启动一个服务,而这个服务需要使用一个端口,但不幸的是,在你的计算机上这个端口已经被某个进程使用了。
根据您的评论(即“需要重新启动eclipse”),看来这个进程可能是jboss的先前实例。看看当你停止 JBoss 时发生了什么......那里一定有问题,因为它没有正确停止(即仍然有东西在运行并且所需的端口没有释放) p>
关于java - 为什么我的 JSF 示例不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32029499/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!