PA165/Cvičení-podzim2008: Porovnání verzí

Z FI WIKI
Přejít na: navigace, hledání
(cv 4)
Řádka 1: Řádka 1:
== cv 3 ==
+
== Cvičení (3) ==
  
===SVN testing repozitory===
+
=== SVN testing repozitory ===
  
 
* https://kore.fi.muni.cz:5443/repos/test/
 
* https://kore.fi.muni.cz:5443/repos/test/
  
===Catalina ant example===
+
=== Catalina ant example ===
  
 
* '''build.xml'''
 
* '''build.xml'''
Řádka 53: Řádka 53:
 
  $ ant undeploy
 
  $ ant undeploy
  
== cv 4 ==
+
== Cvičení (4) ==
 
=== JDBC ===
 
=== JDBC ===
 
* https://is.muni.cz/auth/el/1433/jaro2005/pv168/um/ jdbcExample
 
* https://is.muni.cz/auth/el/1433/jaro2005/pv168/um/ jdbcExample

Verze z 18. 10. 2005, 09:15

Cvičení (3)

SVN testing repozitory

Catalina ant example

  • build.xml
<?xml version="1.0" encoding="utf-8"?>
<project name="Uloha2" default="run" basedir=".">
<description>
</description>
<property file="build.properties"/>
<taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask" classpath="${catalina-ant.jar}" />
<taskdef name="list"      classname="org.apache.catalina.ant.ListTask" classpath="${catalina-ant.jar}" />
<taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask" classpath="${catalina-ant.jar}"/>
<taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask" classpath="${catalina-ant.jar}"/>
<taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask" classpath="${catalina-ant.jar}"/>
<taskdef name="start"     classname="org.apache.catalina.ant.StartTask" classpath="${catalina-ant.jar}"/>
<taskdef name="stop"      classname="org.apache.catalina.ant.StopTask" classpath="${catalina-ant.jar}"/>
<taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask" classpath="${catalina-ant.jar}"/>
<target name="deploy" description="Deploy the web application">
 <deploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="/${app.path}" 
         war="file:${dist.home}/${app.name}.war"/>
</target>
<target name="undeploy" description="Undeploy web application">
 <undeploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="/${app.path}"/>
</target>
</project>
  • build.properties
app.name=WebApplication2
dist.home=${app.name}/dist
app.path=xlogin
manager.url=http://kore.fi.muni.cz:8080/manager
manager.username=manager
manager.password=managerpass
catalina-ant.jar=/packages/share/tomcat-5.5.3/server/lib/catalina-ant.jar

použití:

  1. upravíme build.properties
  2. deploydneme war soubor do tomcatu pomocí:
  3. undeploydneme war soubor z tomcatu:
$ ant deploy
$ ant undeploy

Cvičení (4)

JDBC

Hibernate