Displaying keyword search results 1 - 4
Created by Fang on November 10, 2011 09:26:12 Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines!
<?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by Fang on November 03, 2011 19:47:38 Last update: November 08, 2011 20:24:47
This is a step-by-step example to create a really simple facelet taglib (in JSF 2 with Maven). Create a simple Maven project with:
mvn archetype:create -DgroupId=com.example -Dartif...Three files are created as a result: pom.xml src/main/java/com/example/App.java src/test/java/com/example/AppTest.java This project should be able to build with:
mvn packageAdd facelet API dependencies to pom.xml :
<project xmlns="http://maven.apache.org/POM/4....The compiler plugin section is optional. Remove src/main/java/com/example/App.java , create a new Java class as the facelet Tag Handler ( HelloTagHandler.java ):
package com.example; import java.io.IOExcep...This tag handler simply prints a "Hello" message. Create facelet tag declaration file src/main/resources/META-INF/hello.taglib.xml :
<?xml version="1.0" encoding="UTF-8"?> <facelet...Build the JAR with
mvn clean packageOptionally, install it to the local repository:
mvn installTo use the taglib, simply drop the...
Created by nogeek on September 29, 2010 19:22:15 Last update: September 29, 2010 19:22:15
Assuming you are using the default server. Edit the file server/default/conf/login-config.xml Copy & paste the section:
<application-policy name="web-console"> ...Change the copy to:
<application-policy name="myapp"> <auth...Create users properties file Copy server/default/conf/props/jmx-console-users.properties to server/default/conf/props/myapp-users.properties . Change contents to:
# users.properties file for use with the Users...Create roles properties file Copy server/default/conf/props/jmx-console-roles.properties to server/default/conf/props/myapp-roles.properties . Change contents to:
# roles.properties file for use with the Users...Edit web.xml in the application myapp . Add security constraints:
<security-constraint> <web-resource-col...Add file WEB-INF/jboss-web.xml with the following contents:
<?xml version='1.0' encoding='UTF-8' ?> ...where myapp corresponds to the name attribute for application-policy in step 1.
Created by Fang on September 07, 2009 16:39:37 Last update: September 07, 2009 18:43:04
It's easiest to use the archetype plugin to start a new Maven project. I'll use struts 1 as example since it's not in the built-in archetypes for archetype:generate . Generate a simple webapp with archetype:generate :
C:\work\maven>mvn archetype:generate -DarchetypeAr...It generates a directory structure like this:
struts1app struts1app/pom.xml struts1app/src...with a simple POM:
<project xmlns="http://maven.apache.org/POM/4.0.0"...Create settings.xml in $HOME/.m2 , add Java.net repository for Java EE dependencies:
<?xml version="1.0" encoding="UTF-8"?> <setting...Add Java EE and Struts dependencies in pom.xml . Note that the Java EE dependency has scope provided , meaning that the web app container provides the jars, therefore we don't need to bundle them with our war fie.
<project xmlns="http://maven.apache.org/POM/4.0.0"...Create a directory named java under main , create the Struts form and...