Skip to content

Instantly share code, notes, and snippets.

@lukenvn
Created September 26, 2017 15:16
Show Gist options
  • Save lukenvn/b58b28a14897ccc00116a8d6fa8478b2 to your computer and use it in GitHub Desktop.
Save lukenvn/b58b28a14897ccc00116a8d6fa8478b2 to your computer and use it in GitHub Desktop.
<classpath>
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
<classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" path="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar" sourcepath="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.2/jstl-1.2.jar" sourcepath="M2_REPO/javax/servlet/jstl/1.2/jstl-1.2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/sun/el/el-ri/1.0/el-ri-1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/com/sun/faces/jsf-api/2.1.7/jsf-api-2.1.7.jar"/>
<classpathentry kind="var" path="M2_REPO/com/sun/faces/jsf-impl/2.1.7/jsf-impl-2.1.7.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
# Created by .ignore support plugin (hsz.mobi)
### Java template
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
!/.mvn/wrapper/maven-wrapper.jar
/.idea/
/.settings/
<component name="ArtifactManager">
<artifact type="war" name="JavaServerFaces:war">
<output-path>$PROJECT_DIR$/target</output-path>
<root id="archive" name="JavaServerFaces.war">
<element id="artifact" artifact-name="JavaServerFaces:war exploded" />
</root>
</artifact>
</component>
<component name="ArtifactManager">
<artifact type="exploded-war" name="JavaServerFaces:war exploded">
<output-path>$PROJECT_DIR$/target/JavaServerFaces</output-path>
<root id="root">
<element id="directory" name="WEB-INF">
<element id="directory" name="classes">
<element id="module-output" name="JavaServerFaces" />
</element>
<element id="directory" name="lib">
<element id="library" level="project" name="Maven: org.primefaces:primefaces:5.3" />
<element id="library" level="project" name="Maven: log4j:log4j:1.2.17" />
<element id="library" level="project" name="Maven: com.sun.faces:jsf-impl:2.1.7" />
<element id="library" level="project" name="Maven: javax.servlet:jstl:1.2" />
<element id="library" level="project" name="Maven: javax.servlet:servlet-api:2.5" />
<element id="library" level="project" name="Maven: javax.servlet.jsp:jsp-api:2.1" />
<element id="library" level="project" name="Maven: com.sun.el:el-ri:1.0" />
<element id="library" level="project" name="Maven: javax.faces:javax.faces-api:2.2" />
</element>
</element>
<element id="directory" name="META-INF">
<element id="file-copy" path="$PROJECT_DIR$/target/JavaServerFaces/META-INF/MANIFEST.MF" />
</element>
<element id="javaee-facet-resources" facet="JavaServerFaces/web/Web" />
</root>
</artifact>
</component>
<component name="ArtifactManager">
<artifact name="unnamed">
<output-path>$PROJECT_DIR$/classes/artifacts/unnamed</output-path>
<root id="root">
<element id="module-output" name="JavaServerFaces" />
<element id="library" level="project" name="Maven: com.sun.faces:jsf-api:2.1.7" />
<element id="library" level="project" name="Maven: com.sun.faces:jsf-impl:2.1.7" />
<element id="library" level="project" name="Maven: javax.servlet:jstl:1.2" />
<element id="library" level="project" name="Maven: javax.servlet:servlet-api:2.5" />
<element id="library" level="project" name="Maven: javax.servlet.jsp:jsp-api:2.1" />
<element id="library" level="project" name="Maven: com.sun.el:el-ri:1.0" />
</root>
</artifact>
</component>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="JavaServerFaces" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel>
<module name="JavaServerFaces" target="1.6" />
</bytecodeTargetLevel>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinCommonCompilerArguments">
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
</component>
</project>
<component name="libraryTable">
<library name="Maven: com.sun.el:el-ri:1.0">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/sun/el/el-ri/1.0/el-ri-1.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/sun/el/el-ri/1.0/el-ri-1.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/sun/el/el-ri/1.0/el-ri-1.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Maven: com.sun.faces:jsf-impl:2.1.7">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/sun/faces/jsf-impl/2.1.7/jsf-impl-2.1.7.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/com/sun/faces/jsf-impl/2.1.7/jsf-impl-2.1.7-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/sun/faces/jsf-impl/2.1.7/jsf-impl-2.1.7-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Maven: javax.faces:javax.faces-api:2.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/faces/javax.faces-api/2.2/javax.faces-api-2.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/faces/javax.faces-api/2.2/javax.faces-api-2.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/faces/javax.faces-api/2.2/javax.faces-api-2.2-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Maven: javax.servlet.jsp:jsp-api:2.1">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Maven: javax.servlet:jstl:1.2">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/jstl/1.2/jstl-1.2.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/jstl/1.2/jstl-1.2-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/jstl/1.2/jstl-1.2-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Maven: javax.servlet:servlet-api:2.5">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/servlet-api/2.5/servlet-api-2.5-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Maven: log4j:log4j:1.2.17">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/log4j/log4j/1.2.17/log4j-1.2.17.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/log4j/log4j/1.2.17/log4j-1.2.17-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/log4j/log4j/1.2.17/log4j-1.2.17-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Maven: org.primefaces:primefaces:5.3">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/primefaces/primefaces/5.3/primefaces-5.3.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/org/primefaces/primefaces/5.3/primefaces-5.3-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/org/primefaces/primefaces/5.3/primefaces-5.3-sources.jar!/" />
</SOURCES>
</library>
</component>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/JavaServerFaces.iml" filepath="$PROJECT_DIR$/JavaServerFaces.iml" />
</modules>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
<projectDescription>
<name>JavaServerFaces</name>
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
</natures>
</projectDescription>
#Tue Sep 07 10:21:39 SGT 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
org.eclipse.jdt.core.builder.invalidClasspath=ignore
org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
#Tue Sep 07 10:21:34 SGT 2010
eclipse.preferences.version=1
org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="JavaServerFaces">
<property name="context-root" value="JavaServerFaces"/>
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
<property name="java-output-path" value="/target/classes"/>
<dependent-module archiveName="el-ri-1.0.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/sun/el/el-ri/1.0/el-ri-1.0.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="jsf-api-2.1.0-b03.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/sun/faces/jsf-api/2.1.0-b03/jsf-api-2.1.0-b03.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="jsf-impl-2.1.0-b03.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/com/sun/faces/jsf-impl/2.1.0-b03/jsf-impl-2.1.0-b03.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="jsp-api-2.1.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="jstl-1.2.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/javax/servlet/jstl/1.2/jstl-1.2.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="servlet-api-2.5.jar" deploy-path="/WEB-INF/lib" handle="module:/classpath/var/M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/resources"/>
</wb-module>
</project-modules>
<root>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-user-library-provider"/>
</node>
</facet>
</root>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="jst.java"/>
<fixed facet="jst.web"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="jst.java" version="6.0"/>
<installed facet="jst.jsf" version="2.0"/>
</faceted-project>
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<varelement var="file://$M2_REPO$/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar" value="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar" />
<varelement var="file://$M2_REPO$/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1-sources.jar" kind="src:" value="M2_REPO/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1-sources.jar" />
<varelement var="file://$M2_REPO$/javax/servlet/jstl/1.2/jstl-1.2.jar" value="M2_REPO/javax/servlet/jstl/1.2/jstl-1.2.jar" />
<varelement var="file://$M2_REPO$/javax/servlet/jstl/1.2/jstl-1.2-sources.jar" kind="src:" value="M2_REPO/javax/servlet/jstl/1.2/jstl-1.2-sources.jar" />
<varelement var="file://$M2_REPO$/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" value="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" />
<varelement var="file://$M2_REPO$/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar" kind="src:" value="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar" />
<varelement var="file://$M2_REPO$/com/sun/el/el-ri/1.0/el-ri-1.0.jar" value="M2_REPO/com/sun/el/el-ri/1.0/el-ri-1.0.jar" />
<varelement var="file://$M2_REPO$/com/sun/faces/jsf-api/2.1.7/jsf-api-2.1.7.jar" value="M2_REPO/com/sun/faces/jsf-api/2.1.7/jsf-api-2.1.7.jar" />
<varelement var="file://$M2_REPO$/com/sun/faces/jsf-impl/2.1.7/jsf-impl-2.1.7.jar" value="M2_REPO/com/sun/faces/jsf-impl/2.1.7/jsf-impl-2.1.7.jar" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src/main/java" expected_position="0" />
<src_folder value="file://$MODULE_DIR$/src/main/resources" expected_position="1" />
</src_description>
</component>
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<descriptors>
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
</descriptors>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="jsp-api-2.1.jar">
<CLASSES>
<root url="file://$M2_REPO$/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1.jar" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$M2_REPO$/javax/servlet/jsp/jsp-api/2.1/jsp-api-2.1-sources.jar" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jstl-1.2.jar">
<CLASSES>
<root url="file://$M2_REPO$/javax/servlet/jstl/1.2/jstl-1.2.jar" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$M2_REPO$/javax/servlet/jstl/1.2/jstl-1.2-sources.jar" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="servlet-api-2.5.jar">
<CLASSES>
<root url="file://$M2_REPO$/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$M2_REPO$/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar" />
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="el-ri-1.0.jar">
<CLASSES>
<root url="file://$M2_REPO$/com/sun/el/el-ri/1.0/el-ri-1.0.jar" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jsf-api-2.1.7.jar">
<CLASSES>
<root url="file://$M2_REPO$/com/sun/faces/jsf-api/2.1.7/jsf-api-2.1.7.jar" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jsf-impl-2.1.7.jar">
<CLASSES>
<root url="file://$M2_REPO$/com/sun/faces/jsf-impl/2.1.7/jsf-impl-2.1.7.jar" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="inheritedJdk" />
<orderEntry type="library" name="Maven: org.primefaces:primefaces:5.3" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
<orderEntry type="library" name="Maven: com.sun.faces:jsf-impl:2.1.7" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:jstl:1.2" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
<orderEntry type="library" name="Maven: javax.servlet.jsp:jsp-api:2.1" level="project" />
<orderEntry type="library" name="Maven: com.sun.el:el-ri:1.0" level="project" />
<orderEntry type="library" name="Maven: javax.faces:javax.faces-api:2.2" level="project" />
</component>
</module>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.luke</groupId>
<artifactId>JavaServerFaces</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>JavaServerFaces Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.primefaces/primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.sun.el</groupId>
<artifactId>el-ri</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
<build>
<finalName>JavaServerFaces</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.luke.example.bean;
import javax.annotation.PostConstruct;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PreRenderViewEvent;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@ManagedBean
@ApplicationScoped
public class HelloBean implements Serializable {
private static final long serialVersionUID = 1L;
private List<String> carts = new ArrayList<String>();
{
carts.add("11111");
carts.add("22222");
carts.add("33333");
carts.add("44444");
}
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<String> getCarts() {
return carts;
}
public void setCarts(List<String> carts) {
this.carts = carts;
}
public void addNewCard() {
carts.add("hellllllll");
}
}
package com.luke.example.event;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
/**
* Created by user1 on 09/22/2017.
*/
public class PreRenderComponentImpl implements SystemEventListener {
@Override
public void processEvent(SystemEvent systemEvent) throws AbortProcessingException {
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = context.getViewRoot();
}
@Override
public boolean isListenerForSource(Object o) {
return true;
}
}
package com.luke.example.event;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
/**
* Created by user1 on 09/22/2017.
*/
public class PreRenderViewEventImpl implements SystemEventListener {
@Override
public void processEvent(SystemEvent systemEvent) throws AbortProcessingException {
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = context.getViewRoot();
}
@Override
public boolean isListenerForSource(Object o) {
return true;
}
}
package com.luke.example.listener;
import com.luke.example.bean.HelloBean;
import com.sun.faces.util.Util;
import javax.el.ELContext;
import javax.faces.application.ViewHandler;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
import javax.faces.view.ViewDeclarationLanguage;
/**
* Created by user1 on 09/22/2017.
*/
public class InvokeApplicationListener implements PhaseListener {
@Override
public void afterPhase(PhaseEvent phaseEvent) {
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = context.getViewRoot();
HelloBean helloBean = getBean("helloBean", HelloBean.class);
ViewHandler viewHandler = Util.getViewHandler(context);
ViewDeclarationLanguage vhl = viewHandler.getViewDeclarationLanguage(context, context.getViewRoot().getViewId());
}
@Override
public void beforePhase(PhaseEvent phaseEvent) {
HelloBean helloBean = getBean("helloBean", HelloBean.class);
}
public static <T> T getBean(final String beanName, final Class<T> clazz) {
ELContext elContext = FacesContext.getCurrentInstance().getELContext();
return (T) FacesContext.getCurrentInstance().getApplication().getELResolver().getValue(elContext, null, beanName);
}
@Override
public PhaseId getPhaseId() {
return PhaseId.INVOKE_APPLICATION;
}
}
package com.luke.example.listener;
import com.luke.example.event.PreRenderComponentImpl;
import com.luke.example.event.PreRenderViewEventImpl;
import javax.el.ELContext;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.*;
/**
* Created by user1 on 09/22/2017.
*/
public class RestoreViewPhaseListener implements PhaseListener {
@Override
public void afterPhase(PhaseEvent phaseEvent) {
FacesContext context = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = context.getViewRoot();
viewRoot.subscribeToViewEvent(PreRenderViewEvent.class,new PreRenderViewEventImpl());
viewRoot.subscribeToViewEvent(PreRenderComponentEvent.class,new PreRenderComponentImpl());
}
@Override
public void beforePhase(PhaseEvent phaseEvent) {
}
public static <T> T getBean(final String beanName, final Class<T> clazz) {
ELContext elContext = FacesContext.getCurrentInstance().getELContext();
return (T) FacesContext.getCurrentInstance().getApplication().getELResolver().getValue(elContext, null, beanName);
}
@Override
public PhaseId getPhaseId() {
return PhaseId.RESTORE_VIEW;
}
}
package com.luke.example.logging;
import java.io.IOException;
import java.util.logging.Logger;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.view.ViewDeclarationLanguage;
import javax.faces.view.ViewDeclarationLanguageWrapper;
public class VdlLogger extends ViewDeclarationLanguageWrapper {
private static final Logger logger = Logger.getLogger(VdlLoggerFactory.class.getName());
private ViewDeclarationLanguage wrapped;
public VdlLogger(ViewDeclarationLanguage wrapped) {
this.wrapped = wrapped;
}
@Override
public UIViewRoot createView(FacesContext context, String viewId) {
long start = System.nanoTime();
UIViewRoot view = super.createView(context, viewId);
long end = System.nanoTime();
logger.info(String.format("create %s: %.6fms", viewId, (end - start) / 1e6));
return view;
}
@Override
public void buildView(FacesContext context, UIViewRoot view) throws IOException {
long start = System.nanoTime();
super.buildView(context, view);
long end = System.nanoTime();
logger.info(String.format("build %s: %.6fms", view.getViewId(), (end - start) / 1e6));
}
@Override
public void renderView(FacesContext context, UIViewRoot view) throws IOException {
long start = System.nanoTime();
super.renderView(context, view);
long end = System.nanoTime();
logger.info(String.format("render %s: %.6fms", view.getViewId(), (end - start) / 1e6));
}
@Override
public ViewDeclarationLanguage getWrapped() {
return wrapped;
}
}
package com.luke.example.logging;
import javax.faces.view.ViewDeclarationLanguage;
import javax.faces.view.ViewDeclarationLanguageFactory;
public class VdlLoggerFactory extends ViewDeclarationLanguageFactory {
private ViewDeclarationLanguageFactory wrapped;
public VdlLoggerFactory(ViewDeclarationLanguageFactory wrapped) {
this.wrapped = wrapped;
}
@Override
public ViewDeclarationLanguage getViewDeclarationLanguage(String viewId) {
return new VdlLogger(wrapped.getViewDeclarationLanguage(viewId));
}
@Override
public ViewDeclarationLanguageFactory getWrapped() {
return wrapped;
}
}
# Root logger option
log4j.rootLogger=WARN, console, file
#enable JSF logging
log4j.logger.javax.faces=DEBUG
log4j.logger.com.sun.faces=DEBUG
# Redirect log messages to console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Target=System.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
# Redirect log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=/logs/jsfapp.log
log4j.appender.file.MaxFileSize=5KB
log4j.appender.file.MaxBackupIndex=5
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
<?xml version="1.0" encoding="UTF-8"?>
<!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:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>JSF 2.0 Hello World</title>
</h:head>
<h:body>
<h3>JSF 2.0 example using c:foreach and p:datalist</h3>
<h:form>
c:foreach
<br/>
<c:forEach items="#{helloBean.carts}" var="name">
<c:if test="#{name == '11111'}">
<h:outputText value="c:if work in c:forEach but p:datalist don't" />
<br/>
</c:if>
<h:outputText value="-#{name}" />
<br/>
</c:forEach>
<br/>
p:dataList
<br/>
<p:dataList value="#{helloBean.carts}" var="name">
<c:if test="#{name == '11111'}">
<h:outputText value="you'll never see this text when the page be loaded" />
</c:if>
<h:outputText value="#{name}" />
</p:dataList>
<p:commandButton actionListener="#{helloBean.addNewCard}" value="add new" update="@form" />
</h:form>
</h:body>
</html>
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<factory>
<view-declaration-language-factory>com.luke.example.logging.VdlLoggerFactory</view-declaration-language-factory>
</factory>
<lifecycle>
<phase-listener>com.luke.example.listener.InvokeApplicationListener</phase-listener>
<!--<phase-listecom.luke.example.listener.RestoreViewPhaseListenerener</phase-listener>-->
</lifecycle>
<application>
<system-event-listener>
<system-event-listener-class>com.luke.example.event.PreRenderViewEventImpl</system-event-listener-class>
<system-event-class>javax.faces.event.PreRenderViewEvent</system-event-class>
</system-event-listener>
<system-event-listener>
<system-event-listener-class>com.luke.example.event.PreRenderComponentImpl</system-event-listener-class>
<system-event-class>javax.faces.event.PreRenderComponentEvent</system-event-class>
</system-event-listener>
</application>
</faces-config>
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>JavaServerFaces</display-name>
<!-- Change to "Production" when you are ready to deploy -->
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<!-- Welcome page -->
<welcome-file-list>
<welcome-file>faces/hello.xhtml</welcome-file>
</welcome-file-list>
<!-- JSF mapping -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Map these files with JSF -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
</web-app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment