Deploying Application
Make sure that cache id specified in session.xml file, exists in client.ncconf file located at %NC_HOME%/config with correct server IP Address and is started.
Assume your cache server IP is 20.200.20.54, then following is an example of how the 'client.conf' should look like.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<cache-server retry-interval="1"connection-retries="5"local-server-ip=""port="9800"connection-timeout="5"client-request-timeout="90"retry-connection-delays="0"/>
<cache id="clusteredcache"default-readthru-provider=""client-cache-id=""load-balance="true"default-writethru-provider=""client-cache-syncmode="optimistic">
<server name="20.200.20.54"/>
</cache>
</configuration>
Please follow the steps mentioned below to deploy an application on the respective server.
Apache Tomcat
The following instructions use tomcat version 6.0.29. Steps remain the same but the location of the files might change depending upon the version of tomcat. For the following steps %TOMCAT_HOME% refers to the location where Tomcat is installed.
Open the command prompt, change directory to
%TOMCAT_HOME%/bin
and executeshutdown.bat
. This will stop the server.NCache uses
log4j
for logging. Place thelog4j
at the following location.%TOMCAT_HOME%/lib. You can find log4j in %INSTALL_PATH%/lib/resources.Create a new text document with the following contents and save it with the name of
log4j.properties
in the%TOMCAT_HOME%/lib
folder.log4j.rootLogger=DEBUG, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.home}/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
Download the 'commons-logging-x.x.x-bin.zip' from http://commons.apache.org/logging/download_logging.cgi.
Extract it and copy the
commons-logging-x.x.x.jar
file into the location%TOMCAT_HOME%/lib
.Open the command prompt, change directory to '%TOMCAT_HOME%/bin' and execute
startup.bat
. This will start the server.Move the
GuessGame.war
file located at %NC_HOME%/samples/sessions/dist/ to the directory %TOMCAT_HOME%/webapps.Open the web browser and try to access the following URL: http://host:port/GuessGame/index.jsp, where 'host' will be the address/IP of the machine where Tomcat is installed (in case of local machine it should be 'localhost'), and 'port' where Tomcat is listening to the request. The default port for Tomcat is 8080.
JBoss
For the following steps, %JBOSS_HOME%
refers to the location where JBoss is installed.
NCache uses
log4j
for logging. JBoss by default useslog4j
for logging so no need to place it.Move the 'GuessGame.war' file located at
%NC_HOME%/samples/sessions/dist/
to the directory%JBOSS_HOME%/server/default/deploy
.Open the web browser and try to access the following URL: http://host:port/GuessGame/index.jsp , where 'host' will be the address/IP of the machine where JBoss is installed (in case of local machine it should be 'localhost'), and 'port' where JBoss is listening for the request. The default port for JBoss is 8080.
WebLogic
For the following steps, %WEBLOGIC_HOME% refers to the location where WebLogic is installed.%DOMAIN_NAME%
is the domain already created on the server.
NCache uses
log4j
for logging. Place thelog4j
at the following location:%WEBLOGIC_HOME%/user_projects/domains/%DOMAIN_NAME%/lib
and restart server.Move the 'GuessGame.war'file located at '%NC_HOME%/samples/sessions/dist/' to the directory
%WEBLOGIC_HOME%/user_projects/domains/%DOMAIN_NAME%/autodeploy
.Open the web browser and try to access the following URL: http://host:port/GuessGame/index.jsp, where 'host' will be the address/IP of the machine where WebLogic is installed (in case of local machine it should be 'localhost'), and 'port' where WebLogic is listening the request. The default port for WebLogic is 7001.
WebSphere
For the following steps, %WEBSPHERE_HOME% refers to the location where WebSphere is installed.
NCache uses 'log4j' for logging. Place the 'log4j' at the following location and restart server:'%WEBSPHERE_HOME%/AppServer/lib/ext'
If WebSphere is installed properly, you will be able to access the admin console through browser with the help of the following URL: http://ip-address:port/ibm/console/
By default, 9060 is the port used by WAS. Make sure that you are using the correct port if you changed it during installation.
You can go to Applications -> New Application -> New Enterprise Application.
Specify the path of the 'GuessGame.war' file and click Next. You can locate the 'GuessGame.war' at the following location: '%NC_HOME%/samples/sessions/dist'
Select Fast Path installation mode and click Next.
Specify the Application Name and Application Directory both as 'GuessGame'and click Next.
Map the application to the server, select 'GuessGame.war' from the list with the default settings and click Next.
Map the application to the virtual host, Select 'GuessGame.war' from the list with the default settings and click Next.
Map the context root to the application, type 'GuessGame' into the textbox resulting in '/GuessGame' as the contents of the textbox and click Next.
Click Finish to complete the deployment.
Go to Applications -> Application Types -> WebSphere Enterprise Applications.
You should see the GuessGame application in the list, select the GuessGame application by clicking on the checkbox.
Click Start at the top left. You should see a green icon indicating that the application has started.
Open the web browser and try to access the following URL: http://host:port/GuessGame/index.jsp, where 'host' will be the address/IP of the machine where WebSphere is installed (in case of local machine it should be 'localhost') and 'port' where WebSphere is listening for the request. Make sure that you are using the correct port. The default port for WebSphere is 9080.
See Also
Conceptual Overview
Adding Libraries
Multi-site Java Session Support
Error Logging