Tapestry and Jboss
empress101 Jan 21, 2005 1:24 PMHi am trying to set up Tapestry with Jboss
I am using Tapestry3.0, Jboss4.0 and Eclipse.
Have done the tutorial that uses Tomcat, but i need to use Jboss. Tomcat uses manager role. Have to set user and passward, but i came across something saying Jboss doess not use this. Here is the build file can you tell me exaclty what i need to change in it to make it work under Jboss?
<?xml version="1.0"?>
<project name="ServletDeploy" default="Build_All">
<!--
This ANT script does NOT compile the application,
we are relying on Eclipse to do all Java compilation.
This script merely deploys the application to Tomcat.
This script will work with Tomcat 4.0, but Tapestry
says it requires Tomcat 4.1, so make sure you have
Tomcat 4.1 running.
You will need Tomcat manager running and working
login for Tomcat manager. To create a user for
Tomcat manager, edit the file
<tomcat>\conf\tomcat-users.xml
and add a line for the desired user, such as
<user
username="username"
password="password"
fullName="Your Fullname"
roles="manager"/>
If it is not already there, you may want a to add
the manager role above the user line... such as
<role rolename="manager"/>
This script was designed to deploy a Tapestry servlet
application using Tomcat 4.1+. This script assumes
that the project is laid out how Spindle lays out
applications. All that should need to be modified
is the few lines near the top...
application
tomcatHome
workspaceHome
mgrUsername
mgrPassword
Using the manager to install/remove applications keeps
you from having to stop and restart Tomcat every time
you need to update your application.
-->
<property name="application" value="hangman2" />
<property name="tomcatHome" value="c:/tomcat" />
<property name="workspaceHome" value="c:/save/eclipse/TapestryTutorialWorkspace" />
<property name="mgrUsername" value="username" />
<property name="mgrPassword" value="password" />
<property name="webappsHome" value="${tomcatHome}/webapps" />
<property name="appHome" value="${webappsHome}/${application}" />
<property name="contextHome" value="${workspaceHome}/${application}/context" />
<property name="deployWarsDir" value="${workspaceHome}/${application}/DeployWars" />
<property name="mgrUrl" value="http://localhost:8080/manager" />
<property name="mgrRemoveUrl" value="${mgrUrl}/remove" />
<property name="mgrDeployUrl" value="${mgrUrl}/install" />
<target name="Deploy_to_LocalDev">
<!-- LocalDev deploys right into the local tomcat -->
<mkdir dir="${deployWarsDir}/local-dev" />
<delete file="${deployWarsDir}/local-dev/${application}.war" />
<war
duplicate="preserve"
destfile="${deployWarsDir}/local-dev/${application}.war"
webxml="${contextHome}/WEB-INF/web.xml">
<classes dir="${contextHome}/WEB-INF/classes" />
<fileset dir="${contextHome}">
<include name="*" />
<include name="css/*.css" />
<include name="images/*" />
<include name="WEB-INF/*.page" />
<include name="WEB-INF/*.application" />
<include name="WEB-INF/*.jwc" />
<include name="WEB-INF/*.html" />
</fileset>
</war>
<!-- Deploy to Tomcat 4.1 -->
<!-- NOTE: The remaineder of this installation requires the Tomcat 4.0+
manager be running and the build will fail if it is not. -->
<!-- Remove the application -->
<delete file="deploy-local-remove.txt" />
<get
src="${mgrRemoveUrl}?path=/${application}"
dest="deploy-local-remove.txt"
username="${mgrUsername}"
password="${mgrPassword}" />
<loadfile property="deploy.local.remove.result"
srcFile="deploy-local-remove.txt" />
<echo>${deploy.local.remove.result}</echo>
<delete file="deploy-local-remove.txt" />
<!-- Remove the directory containing the old version of the application -->
<!--
<delete dir="${webappsHome}/${application}" />
-->
<unzip
src="${deployWarsDir}/local-dev/${application}.war"
dest="${webappsHome}/${application}" />
<!-- Install the application -->
<delete file="deploy-local-remove.txt" />
<property name="mgrDeployParams"
value="path=/${application}&war=file://${webappsHome}/${application}/" />
<get
src="${mgrDeployUrl}?${mgrDeployParams}"
dest="deploy-local-remove.txt"
username="${mgrUsername}"
password="${mgrPassword}" />
<loadfile property="deploy.local.remove.resultb"
srcFile="deploy-local-remove.txt" />
<echo>${deploy.local.remove.resultb}</echo>
<delete file="deploy-local-remove.txt" />
</target>
<target name="Build_All" depends="Deploy_to_LocalDev" />
</project>