- 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/
我正在编写一个具有以下签名的 Java 方法。 void Logger(Method method, Object[] args); 如果一个方法(例如 ABC() )调用此方法 Logger,它应该
我是 Java 新手。 我的问题是我的 Java 程序找不到我试图用作的图像文件一个 JButton。 (目前这段代码什么也没做,因为我只是得到了想要的外观第一的)。这是我的主课 代码: packag
好的,今天我在接受采访,我已经编写 Java 代码多年了。采访中说“Java 垃圾收集是一个棘手的问题,我有几个 friend 一直在努力弄清楚。你在这方面做得怎么样?”。她是想骗我吗?还是我的一生都
我的 friend 给了我一个谜语让我解开。它是这样的: There are 100 people. Each one of them, in his turn, does the following
如果我将使用 Java 5 代码的应用程序编译成字节码,生成的 .class 文件是否能够在 Java 1.4 下运行? 如果后者可以工作并且我正在尝试在我的 Java 1.4 应用程序中使用 Jav
有关于why Java doesn't support unsigned types的问题以及一些关于处理无符号类型的问题。我做了一些搜索,似乎 Scala 也不支持无符号数据类型。限制是Java和S
我只是想知道在一个 java 版本中生成的字节码是否可以在其他 java 版本上运行 最佳答案 通常,字节码无需修改即可在 较新 版本的 Java 上运行。它不会在旧版本上运行,除非您使用特殊参数 (
我有一个关于在命令提示符下执行 java 程序的基本问题。 在某些机器上我们需要指定 -cp 。 (类路径)同时执行java程序 (test为java文件名与.class文件存在于同一目录下) jav
我已经阅读 StackOverflow 有一段时间了,现在我才鼓起勇气提出问题。我今年 20 岁,目前在我的家乡(罗马尼亚克卢日-纳波卡)就读 IT 大学。足以介绍:D。 基本上,我有一家提供簿记应用
我有 public JSONObject parseXML(String xml) { JSONObject jsonObject = XML.toJSONObject(xml); r
我已经在 Java 中实现了带有动态类型的简单解释语言。不幸的是我遇到了以下问题。测试时如下代码: def main() { def ks = Map[[1, 2]].keySet()
一直提示输入 1 到 10 的数字 - 结果应将 st、rd、th 和 nd 添加到数字中。编写一个程序,提示用户输入 1 到 10 之间的任意整数,然后以序数形式显示该整数并附加后缀。 public
我有这个 DownloadFile.java 并按预期下载该文件: import java.io.*; import java.net.URL; public class DownloadFile {
我想在 GUI 上添加延迟。我放置了 2 个 for 循环,然后重新绘制了一个标签,但这 2 个 for 循环一个接一个地执行,并且标签被重新绘制到最后一个。 我能做什么? for(int i=0;
我正在对对象 Student 的列表项进行一些测试,但是我更喜欢在 java 类对象中创建硬编码列表,然后从那里提取数据,而不是连接到数据库并在结果集中选择记录。然而,自从我这样做以来已经很长时间了,
我知道对象创建分为三个部分: 声明 实例化 初始化 classA{} classB extends classA{} classA obj = new classB(1,1); 实例化 它必须使用
我有兴趣使用 GPRS 构建车辆跟踪系统。但是,我有一些问题要问以前做过此操作的人: GPRS 是最好的技术吗?人们意识到任何问题吗? 我计划使用 Java/Java EE - 有更好的技术吗? 如果
我可以通过递归方法反转数组,例如:数组={1,2,3,4,5} 数组结果={5,4,3,2,1}但我的结果是相同的数组,我不知道为什么,请帮助我。 public class Recursion { p
有这样的标准方式吗? 包括 Java源代码-测试代码- Ant 或 Maven联合单元持续集成(可能是巡航控制)ClearCase 版本控制工具部署到应用服务器 最后我希望有一个自动构建和集成环境。
我什至不知道这是否可能,我非常怀疑它是否可能,但如果可以,您能告诉我怎么做吗?我只是想知道如何从打印机打印一些文本。 有什么想法吗? 最佳答案 这里有更简单的事情。 import javax.swin
我是一名优秀的程序员,十分优秀!