Don’t close your scanner!!

NoSuchElementException if no more tokens are available Do not use scanner.close() <- source of your error! remove the lines scanner.close() and newScanner.close() From Java DOCs: When a Scanner is closed, it will close its input source if the source implements the Closeable interface. Which means it closes the System.in – bad choice! From source code…

Read More

Installing WildFly 10 standalone

Unzip Wildfly distro set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_91 set WILDFLY_HOME=C:\dev\wildfly set JBOSS_HOME=C:\dev\wildfly To add a new user execute the add-user.bat script within the bin folder of your WildFly installation and enter the requested information. If you get this error: Calling „xxx…standalone.conf.bat“ Setting Java property to „c:\Program Files\Java\JDK1.8.0_91\bin\bin\java“ and WildFly stopping Bootprocess, then check the standalone.conf.bat and set the…

Read More

Creating Java EE 6 Projects With Maven 3

Ein auf das Allernotwendigste reduzierter Archetyp für Java EE Anwendungen stammt von Adam Bien (airhacks.com) und wird mit folgender Befehlszeile aufgerufen: E:\ProjectsMaven>mvn archetype:generate -DarchetypeGroupId=com.airhacks -DarchetypeArtifactId=javaee7-essentials-archetype -DarchetypeVersion=1.3 Im interaktiven Teil werden dann noch folgende Werte abgefragt: ‚groupId‚: org.ragin ‚artifactId‚: myProjectSeven ‚version‚: Vorgabe kann so übernommen werden: 1.0-SNAPSHOT ‚package‚: org.ragin.myProjectSeven   Allerdings kann man auch direkt die Archetype-ID…

Read More

JSF 2.2 AND HTML 5 PLACEHOLDER (PASSTHROUGH)

The Java EE 7 version of JSF (2.2) enables the definition of any arbitrary attributes, which are not going to be processed by the JSF runtime and directly passed to the browser. However, you will have to declare an additional namespace and qualify the attribute with the namespace: <html xmlns=“http://www.w3.org/1999/xhtml“ xmlns:h=“http://xmlns.jcp.org/jsf/html“ xmlns:f=“http://xmlns.jcp.org/jsf/core“ xmlns:p=“http://xmlns.jcp.org/jsf/passthrough“> <!– ……

Read More