HTML and CSS Reference
In-Depth Information
<cc:interface>
<cc:attribute name="label" type="java.lang.String" required="true"/>
<cc:attribute name="value" type="java.lang.String" required="true" />
</cc:interface>
<cc:implementation>
<li><a href="#{cc.attrs.value}">#{cc.attrs.label}</a></li>
</cc:implementation>
</html>
Not another case that can be converted to a JSF composite component is the menu fragment which is located in
listing 13-22. We will leave this one for you as an exercise.
Packaging and Deploying the Mega App
First of all, in order to deploy Mega App in your local environment, you need to build the application using Maven 3
from the application pom.xml directory as follows:
> mvn clean install
After running this command, the application war file will be generated in the target directory of the application
with the following name ( megaapp-1.0-SNAPSHOT.war ).
MegaApp is developed under Glassfish version 4. Listing 13-41 shows the application's
glassfish-resources.xml , which defines the application data source.
Listing 13-41. MegaApp's glassfish-resources.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource
Definitions//EN" " http://glassfish.org/dtds/glassfish-resources_1_5.dtd " >
<resources>
<jdbc-connection-pool ...>
<property name="serverName" value="localhost"/>
<property name="portNumber" value="1527"/>
<property name="databaseName" value="megaApp"/>
<property name="User" value="mega"/>
<property name="Password" value="password"/>
<property name="URL" value="jdbc:derby://localhost:1527/megaApp"/>
<property name="driverClass" value="org.apache.derby.jdbc.ClientDriver"/>
</jdbc-connection-pool>
<jdbc-resource enabled="true" jndi-name="jdbc/mega" object-type="user"
pool-name="derby_net_megaApp_megaPool"/>
</resources>
In order to add the defined application resources of glassfish-resources.xml in your GlassFish 4, you need to
start your GlassFish server by running the following command from the bin directory of the server.
> asadmin start-domain
 
 
Search WWH ::




Custom Search