How use Tomcat with MySQL

Can anybody suggest me as how to use Tomcat with MySQL server.
Thanks in advance.
Khiz_eng

add the classpath to the JDBC-driver to the tomcat-
environment (I did it in tomcat.sh)
Then put your code accessing MySQL into a servlet....
You can put the user-ID and the password into a session-
object or read them in as parameters.
The book 'core Servlets and Java Server Pages' from
Marty Hall gave me a lot information.
Regards
Fredy

Similar Messages

  • Step by step to set up tomcat with mysql

    hi i'm new to these things, well i went through the forum , there are load of info but no1 has explain how to set up (step by step) tomcat with mysql using jdbc driver ( also i'll use jsp pages to get info from the database.)
    thx alot.

    Hiya,
    Best way would be to read the README.doc that you get after the installation on the sysetm. Becuase this provided you with the exact info. pertianing to the sysetm etc that you have and also visit this website:
    http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20148108.html
    It gives u a step by step guide to set-up and some sample codes also to test etc.
    Happy Javaing, Cheers

  • About using hibernate with mysql

    hi all,
    i have used hibernate with hsqldb(database given by default) and it works fine.but when i tried to use it with mysql then i have encountered a problem
    xception
    org.hibernate.TransactionException: Transaction not successfully started
         org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:149)
         events.EventManagerServlet.doGet(EventManagerServlet.java:63)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    though i have put jar file of mysql in lib directory and changed the driver name in hibernate.cfg.xml.
    can any one place some example illustrating the steps involving.thanx

    Hi smogura,
    Thanks for the message. Ok I did as you told. I believe I went to the right place:
    Resource->JDBC Connection pools. However I wasn't sure how exactly to go about setting connection pools,
    so I went to the web and did a search and I managed to get hold of this
    website:http://www.albeesonline.com/blog/2008/08/06/creating-and-configuring-a-mysql-datasource-in-
    glassfish-application-server/
    I followed from steps 4 onwards. However at step 14, I did not get a sucesfull ping. The values I used are as follows:
    General:
    Name:               MySQL
    Datasource Classname:     com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
    Resource Type:           javax.sql.ConnectionPoolDataSource
    Advanced Properties:
    databaseName:      ebooking
    ServerName:     GlassFish
    URL          jdbc:mysql://localhost:3306/ebooking
    password          *****
    user:          1234
    I am not sure what is wrong, by the way, I am using Glassfish V3 that comes bundled with netbeans. Any idea what's wrong or missing? Thanks
    regards

  • How use multithead with socket

    How use multithead with socket
    I need do a client and server program that accept multitherad issue
    Thanks who can help me

    you'd have to do something like this:
    (this is all assuming you want to read Strings from the socket. setSoTimeout works for any read() call to the InputStream associated with the Socket)
    ServerSocket ss = new ServerSocket(myPort);
    Socket s = ss.accept();
    s.setSoTimeout(5*60*1000); // 5 mins * 60 secs * 1000ms
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    boolean running = true;
    while(running)
    try
    String readIn = in.readLine();
    // do whatever you want with the data read
    catch(SocketTimeoutException)
    running = false;
    Now. That's what I think needs to be done. I don't have Java on the machine I'm currently on, so I can't test/verify it, but it goes something like that.
    Good luck,
    Radish21

  • How can I use tomcat with Java ServerFaces

    Is there a tutorial on Java ServerFaces using tomcat?

    the JWSDP1.3 download includes Tomcat
    Follow links from here - http://java.sun.com/webservices/index.jsp
    NOTES
    #1 JWSDP1.3 includes a Beta release of Tomcat 5
    So you may want to also download the latest version from the apache/Tomcat websites
    http://jakarta.apache.org/tomcat/index.html
    #2 JWSDP1.3 contains JSF EA4 - JSF 1.0 Beta is now available
    follow the link on the JWSDP web site above

  • Help - JSC to Tomcat with MySql

    I built a simple test app in JSC with MySql.
    Product: MySql Ver. 5.0.27-community-nt
    Database name: Test
    Table name: testtable
    Datasource name: MySql1
    Dataprovider's SQL: SELECT ALL testtable.code, testtable.name FROM testtable WHERE testtable.name LIKE ?
    The page had a textfield, button, statictext and a table mapped to the dataprovider
    The following code was included:
    public void prerender() {
    try {
    String s = "";
    String t = (String) textField1.getText();
    if (t == null || t.equals(""))
    s = "";
    else
    s = t;
    s += "%";
    staticText3.setText(s);
    getSessionBean1().getTesttableRowSet().setObject(1,s);
    getSessionBean1().getTesttableDataProvider().refresh();
    } catch (Exception e) {error(e.toString());}
    public String button1_action() {
    return null;
    When tested in JSC, it worked fine.
    But when I exported it as a war file and deployed it in Tomcat 5.5.17 with the following settings, the statictext
    displayed the selected value, but the table showed "No items found". Please help.
    User: root
    password: adminadmin
    Connector downloaded: mysql-connector-java-5.0.4.zip
    The appropriate jstl.jar and standard.jar where used by copying them from jakarta
    The tomcat's server.xml used is shown below:
    <?xml version="1.0" encoding="UTF-8"?>
    <Server>
    <Listener className="org.apache.catalina.core.AprLifecycleListener"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
    <GlobalNamingResources>
    <Environment
    name="simpleValue"
    type="java.lang.Integer"
    value="30"/>
    <Resource
    auth="Container"
    description="User database that can be updated and saved"
    name="UserDatabase"
    type="org.apache.catalina.UserDatabase"
    pathname="conf/tomcat-users.xml"
    factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
    <Resource
    name="jdbc/Travel"
    type="javax.sql.DataSource"
    driverClassName="org.apache.derby.jdbc.ClientDriver"
    password="travel"
    maxIdle="2"
    maxWait="5000"
    validationQuery="select * from TRAVEL.PRODUCT"
    username="travel"
    url="jdbc:derby://localhost:21527/samp"
    maxActive="4"/>
    </GlobalNamingResources>
    <Service
    name="Catalina">
    <Connector
    port="8080"
    redirectPort="8443"
    minSpareThreads="25"
    connectionTimeout="20000"
    maxThreads="150"
    maxSpareThreads="75">
    </Connector>
    <Connector
    port="8009"
    redirectPort="8443"
    protocol="AJP/1.3">
    </Connector>
    <Engine
    defaultHost="localhost"
    name="Catalina">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    <Host
    appBase="webapps"
    name="localhost">
    <Context
    path="/TomTest">
    </Context>
    <Context
    path="/TradeMeTender">
    <Resource
    auth="Container"
    description="Creator generated DataSource Reference"
    name="jdbc/Travel"
    type="javax.sql.DataSource"
    driverClassName="org.apache.derby.jdbc.ClientDriver"
    password="travel"
    maxIdle="2"
    maxWait="5000"
    validationQuery="SELECT * from TRAVEL.PRODUCT"
    username="travel"
    url="jdbc:derby://localhost:21527/sample"
    maxActive="4"/>
    </Context>
    <Context
    path="/FileUploadExample">
    <EJB
    home="greeting.GreeterHome"
    name="GreeterEJB"
    remote="greeting.Greeter"
    type="Session"/>
    </Context>
         <Context path="/MySqlTest" docBase="MySqlTest"
         debug="5" reloadable="true" crossContext="true">
              <Resource name="jdbc/MySql1" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="root" password="adminadmin" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/Test?autoReconnect=true"/>
         </Context>
    </Host>
    </Engine>
    </Service>
    </Server>

    You could track JDBC calls and the SQL's executed by the driver at the database,
    Update you datasource, DBURL with some parameters/properties to generate some info for debugging like this:
    jdbc:mysql://$hostname:$port/$databasename?autoGenerateTestcaseScript=true&dumpQueriesOnException=true
    Check out your deployment containers log to find out which particular SQL statement is being executed. This could help in identifying performance issues with application. That could possibly give a clue, if something is not working in your application.
    For designtime JDBC calls made, this info is sent to IDE log.
    Reference: http://dev.mysql.com/doc/refman/5.0/en/cj-configuration-properties.html
    HTH,
    Sakthi

  • How use jdbc with swing ? i am new in this concept.

    hi
    freinds,
    i am new in java can any one give the example which explain the how to use jdbc with swing.
    thanks in advace.
    satish
    thanks.

    See here  >  http://support.apple.com/kb/HT4236
    More info in the User Guides for your Devices...

  • Using java with mysql JDBC

    Hello
    I'm trying to write a program which reads in tab-delimeted text files and then stores the results in a mysql database. The files are roughly 20,000 lines long and can have up to 10 columns, so for the biggest files I have 200,000 pieces of data to be stored seperately in the database.
    I'm currently using the readLine() method of bufferedreader, then using the split function to seperate the string into tokens. The problem is that it seems to be very slow. It is a lot of information, and im not running it on a very fast machine, but even so im sure there must be a more efficient way of acheiving this.
    Here's some of my code:
    BufferedReader in = new BufferedReader(new FileReader("test.res"));
    while((result = in.readLine()) != null) {
    result = in.readLine();
    aLine = result.split("\t");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[0] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[1] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[2] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[3] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[4] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[5] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[6] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[7] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[8] +"')");
    stmt.executeUpdate("INSERT INTO test(words)" + "values('" + aLine[9] +"')");
    I would appreciate any advice thanks.
    PS this is the first time ive tried anything like this so im probably missing something obvious.

    Form the example you have chosen it seems to me, that your table only has one column (words) and that you have multiple value entries for that column in one line of your text file ?!
    That is strange. Normaly I would assume (like the other answers indicate) that you have several columns and that each line in your text file has n values each for a different column.
    Have look at PreparedStatement.
    // the name of your connection is con, you have six columns named col1 to col6 and six entries per line, All six are strings...
    PreparedStatement pstmt = con.prepareStatement("insert into test (col1 , col2 , col3,col4,col5,col6) values( ? , ? , ? , ? , ? , ?)") ;
    BufferedReader in = new BufferedReader(new FileReader("test.res"));
    while((result = in.readLine()) != null) {
       result = in.readLine();
       aLine = result.split("\t");
       for (int i = 0 ; i < 6 ; i++) {
           pstmt.setString((i+1),aLine) ;
    pstmt.executeUpdate() ;
    But this is still not the fastest approach. MySQL supports bulk imports
    Have look at this feature. Maybe the fastest way is to 'convert' the textfile into something like a MySQL dump an than process it using it the MySQL import features.

  • Nullpointerexception when using servlet with Mysql on a cobalt Raq3 Server

    I'm a student and i have to use servlets and Mysql to make a Database application. Our school has a Cobalt Raq3 server and has installed Java Dev Kit 1.3a.
    First problem they can't tell me their driver manager for Mysql.
    Second problem when i try my servlet it gives a NullpointerException
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Testingo2 extends HttpServlet {
    // Hier word een Statement en Connectie object aangemaakt die later zullen worden gebruikt om een database aan te spreken
    Statement stm;
    Connection con;
         // Hier word de servlet geinitialiseerd
    public void init() throws ServletException {
         try {
              // Hier wordt de database driver geladen
              Class.forName("org.gjt.mm.mysql.Driver");
              /** Hier gaan we gebruik maken van het Connection Object om verbinding te maken met de database CFP door een           * jdbc.odbc bridge en dit zonder username en passwoord
              con = DriverManager.getConnection("jdbc:mysql://cfp.ehsal.be:3306/cfp","bjorn","disaronno");
              // Hier zorgen we ervoor dat als er een zich een fout voordoet dat deze getoond wordt
                   catch (ClassNotFoundException cnfe ) {
                   System.out.println(cnfe.toString());
                   catch (SQLException e) {
                   System.out.println(e.toString());
    // Als de servlet het einde van zijn levenscyclus heeft bereikt gaat het connectie object worden afgesloten
    public void destroy() {
         try { con.close();}
         catch (SQLException e) {}
    public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
    try {
         /** Hier gaat men met het Connectie object een statement aanmaken,welk dan later zal worden gebruikt voor het           * uitvoeren van query's
         stm = con.createStatement();
         /** Hier gaat men de query "selecteer alles van de tabel projecten" uitvoeren op de cfp database dankzij het      * statement en connection object. Deze gegevens worden dan opgeslagen in de Resultset rs.
         ResultSet rs = stm.executeQuery("SELECT project,land,titel,omschrijving,budget,informatie FROM PROJECTEN ");
         /** Hier gaat men informatie, over de gegevens die in de ResultSet rs zijn opgeslagen, opslaan in ResultSetMetaData      * meta.
         ResultSetMetaData meta = rs.getMetaData();
         // Hiergaat men het aantal kolommen van de tabel tellen en opslagen in de Integer kolom
         int kolom;
         kolom = meta.getColumnCount();
         // Hier declareerd men welk soort meta type we naar browser sturen, hier dus HTML tekst
         res.setContentType("text/html");
         // Hier gaan we een PrintWriter object out aanmaken dat gebruikt zal worden om de html tekst naar de client te sturen
         PrintWriter out = res.getWriter();
         // De basis html code voor deze pagina
         out.println("<HTML >");
         out.println("<BODY BGCOLOR =fd8017>");
         out.println("<H1> <B><CENTER><FONT COLOR='#00008b'> Overzicht van de projecten </FONT></CENTER></B></H1>");
         /** Hier defini�ren we een tabel die van de hoogte en breedte van het scherm volledig gebruik maakt, waarvan de boord      * van de tabel een dikte van 1 heeft, de ruimte tussen de cellen in de tabel en tussen de randen van een cel en de      * inhoud is gelijk aan 2 (in pixels) en een achtergrondkleur fd8017
         out.println("<TABLE HEIGHT='100%' WIDTH='100%' BORDER=1 CELLPADDING = 2 CELLSPACING = 2 BGCOLOR =fd8017>");
              // begintag voor een nieuwe rij
              out.println("<TR>");
              /** Hier creeren we een lus om de kolom hoofden naar de client te sturen. Deze lus begint als j=1 en gaat           * door tot j = aantal kolommen en na elke loop wordt j verhoogd met 1. Normaal werden alle kolom hoofden           * uit de database opgehaald en afgebeeld, maar vermits MySQL geen kolom hoofden aanvaard waar spaties           * inzitten heb ik gekozen om hier de kolom hoofden die uit meer dan 1 woord bestaan op te halen en aan te           * passen. Dit voor estetische redenen, voor het functioneren van de servlet heeft dit echter geen belang
    for(int j=1;j<=kolom;j++){
              if (meta.getColumnName(j).equals("project")) {
              out.println("<TH><FONT COLOR='#00008b'> project nr </TH>");
              else if (meta.getColumnName(j).equals("budget")) {
              out.println("<TH><FONT COLOR='#00008b'> budget (in 1000 �) </TH>");
              else if (meta.getColumnName(j).equals("informatie")) {
              out.println("<TH><FONT COLOR='#00008b'> meer informatie ? </TH>");
              else {
              out.println("<TH><FONT COLOR='#00008b'>");     
              out.println(meta.getColumnName(j)+" ");
              out.println("</TH>");
              // Hier wordt de tag voor een nieuwe rij afgesloten
              out.println("</TR>");
              // Hier initialiseren we een Integer en String die later zullen worden gebruikt
              int k = 0;
              String nummer ="";
    // Dit deel van de programma code gaan we uitvoeren zolang er nog een volgende rij in de database bestaat
    while (rs.next()) {
              // Voor elke nieuwe rij wordt k verhoogd met 1
              k =k +1;
              // De tag voor een nieuwe rij
              out.println("<TR>");
         // Dit deel van de code wordt uitgevoerd zolang Integer i kleiner is dan het aantal kolommen
         for(int i=1;i <= kolom;i++) {
              // Een nieuwe cel waarin de data worden afgebeeld in de kleur #00008b
              out.println("<TD ALIGN='left' VALIGN ='top'>");
              out.println("<FONT COLOR='#00008b'> ");
              /** Hier halen we de kolomnaam op van kolom i en slagen we deze op in de String kolomnaam. Dan gaan we van           * deze naam de overtollige spaties (links en rechts van de naam) wegwerken.
              String kolomnaam = meta.getColumnName(i);
              kolomnaam = kolomnaam.trim();
              /** Als de kolomnaam gelijk is aan "project" dan gaan we de data van deze cel opslagen in de String nummer en           * deze dan doorsturen naar de client. Anders gaan we voort in onze programma code.
              if (kolomnaam.equals("project")) {
              nummer = rs.getString(i);
              out.println(nummer);
              /** Als het vorige niet waar is dan gaan we zien of de kolomnaam gelijk is aan "informatie", als dat zo is           * dan gaan we de data van de cel opslaan in de String celwaarde.
              else if ( kolomnaam.equals("informatie")) {
                   String celwaarde = rs.getString(i);
                   char punt = '.';
                   char under ='_';
                   nummer = nummer.replace(punt,under);               
                   /** Als deze String celwaade gelijk is aan "Y" dan gaan we een hyperlink afbeelden die opgebouwd is                * uit drie delen : de naam "project", de String nummer (de data uit de cel van project waar het                * "." is vervangen door "_" ) en de extensie ".html"
                   if (celwaarde.equals("Y") ){
                   out.println("<A HREF=project" + nummer + ".html> Project" +" "+ k +" </A>");     
                   /** Als de celwaarde niet gelijk is aan "Y" dan gaan we gewoon de naam "Project" en de Integer k                * afbeelden
                   else {
                   out.println("Project" +" " + k);
              else {
              out.println(rs.getString(i));
              out.println("</FONT>");
              out.println("</TD>");
              out.println("</TR>");
         out.println(" </TABLE>");
         out.println("</BODY>");
         out.println("</HTML>");
         // Hier wordt het object Satement afgesloten vermts we het niet meer nodig hebben
         stm.close();
    // Als er bij het uitvoeren van de programma code een fout zich voordoet dan wordt er een foutmelding weergegeven
    catch (SQLException e) {
    System.out.println(e.toString());

    The exception is thrown in the Doget method namely stm = con.createStatement();
    But i think that when i run my servlet that the init method is not used. I believe the problem is the access to the database.
    Thanks for the answer because i'm beginning to hate the cobalt server at my school

  • Using tomcat with Oracle database?

    I am having some difficulty setting up Tomcat 6.0.16 with JDeveloper 10 and Oracle - I have with the kind help of people here found this:
    ADF-BC4J + MySQL 5 + Tomcat 6
    Which helps me some of the way, but it is for MySQL, not Oracle, and I don't know things well enough to change the XML in a meaningful way.
    I did try to install MySQL, but not extremely hard - I would prefer to use Oracle, anyway. Are there any instructions about how to do this for an Oracle database?

    Please refer
    http://www.microdeveloper.com/html/JNDI_Orcl_Tomcat1p.html
    http://www.akadia.com/download/soug/tomcat/html/tomcat_apache.html#Deploying%20Servlets
    http://www.hansbergsten.com/contrib/solaris-oracle-howto.html

  • Using Blobs with MySQL

    Hi,
    I've posted a few thread semi-related to this, and decided I would just ask a more general question.
    Has anyone been able to save (& load) BLOBs in MySQL using ADF BC? If so, how did you do it?

    No, its not the same as doing this process with Oracle.
    First of all, I cannot use BlobDomain, and instead I have to use something else that implements java.sql.Blob. I would use the one from the mysql driver, but it has private constructors....
    So I tried to use SerialBlob, then cast it to java.sql.Blob before committing to the db, and after some efforts I was able to finally save a Blob to my table.
    However, every time I try and load the blob again into my Entity Object, I am getting index out of bounds exceptions.
    (Even when I inserted a blob using PreparedStatements, then tried to have ADF BC retrieve the blob from the db)

  • Cannot make .war file using tomcat with eclipse and ant

    i have made all necesary configuration for deploying application using eclipse and ant for the tomcat server.
    when i start the server by clicking the tomcat icon on eclipse toolbar, the message is prompted that "missing application web.xml and using defaults". i have placed the web.xml file in the web/WEB-INF directory of the source project directory.
    also when i use ant by right-clicking on the build.xml file and choose Run as ant.. the process creates a desired .war file in webapps folder of the tomcat server but that war file does not works.
    where is the error i cannot figure out.
    am attaching the code of build.xml for reference.
    please help.
    build.xml:-
    <project name="BecilCTI" default="compile" basedir=".">
    <property file="build.properties"/>
    <property file="${user.home}/build.properties"/>
    <property name="app.name" value="BecilCTI"/>
    <property name="app.path" value="/${app.name}"/>
    <property name="app.version" value="0.1-dev"/>
    <property name="build.home" value="${basedir}/build"/>
    <property name="catalina.home" value="c:/Tomcat_5.5"/> <!-- UPDATE THIS! -->
    <property name="dist.home" value="${basedir}/dist"/>
    <property name="docs.home" value="${basedir}/docs"/>
    <property name="manager.url" value="http://localhost:8080/manager"/>
    <property name="src.home" value="${basedir}/src"/>
    <property name="web.home" value="${basedir}/web"/>
    <property name="compile.debug" value="true"/>
    <property name="compile.deprecation" value="false"/>
    <property name="compile.optimize" value="true"/>
    <!--<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>-->
    <path id="compile.classpath">
    <!-- Include all elements that Tomcat exposes to applications -->
    <pathelement location="${catalina.home}/common/classes"/>
    <fileset dir="${catalina.home}/common/endorsed">
    <include name="*.jar"/>
    </fileset>
    <fileset dir="${catalina.home}/common/lib">
    <include name="*.jar"/>
    </fileset>
    <pathelement location="${catalina.home}/shared/classes"/>
    <fileset dir="${catalina.home}/shared/lib">
    <include name="*.jar"/>
    </fileset>
    </path>
    <target name="all" depends="clean,compile"
    description="Clean build and dist directories, then compile"/>
    <target name="clean"
    description="Delete old build and dist directories">
         <echo message="Cleaning all dirs."/>
    <delete dir="${build.home}"/>
    <delete dir="${dist.home}"/>
    </target>
    <target name="compile" depends="prepare"
    description="Compile Java sources">
    <!-- Compile Java classes as necessary -->
    <mkdir dir="${build.home}/WEB-INF/classes"/>
    <javac srcdir="${src.home}"
    destdir="${build.home}/WEB-INF/classes"
    debug="${compile.debug}"
    deprecation="${compile.deprecation}"
    optimize="${compile.optimize}">
    <classpath refid="compile.classpath"/>
    </javac>
    <!-- Copy application resources -->
    <copy todir="${build.home}/WEB-INF/classes">
    <fileset dir="${src.home}" excludes="**/*.java"/>
    </copy>
    </target>
    <target name="dist" depends="compile"
    description="Create binary distribution">
    <!-- Copy documentation subdirectories
    <mkdir dir="${dist.home}/docs"/>
    <copy todir="${dist.home}/docs">
    <fileset dir="${docs.home}"/>
    </copy> -->
    <!-- Create application JAR file -->
    <jar jarfile="${catalina.home}/webapps/${app.name}.war"
    basedir="${build.home}"/>
    <!-- Copy additional files to ${dist.home} as necessary -->
    </target>
    <target name="install" depends="compile"
    description="Install application to servlet container">
    <deploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"
    localWar="file://${build.home}"/>
    </target>
    <target name="list"
    description="List installed applications on servlet container">
    <list url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"/>
    </target>
    <target name="prepare">
    <!-- Create build directories as needed -->
    <mkdir dir="${build.home}"/>
    <mkdir dir="${build.home}/WEB-INF"/>
    <mkdir dir="${build.home}/WEB-INF/classes"/>
    <!-- Copy static content of this web application -->
    <copy todir="${build.home}">
    <fileset dir="${web.home}"/>
    </copy>
    <mkdir dir="${build.home}/WEB-INF/lib"/>
    </target>
    <target name="reload" depends="compile"
    description="Reload application on servlet container">
    <reload url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"/>
    </target>
    <target name="remove"
    description="Remove application on servlet container">
    <undeploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"/>
    </target>
    </project>

    So is context.xml actually overwriting the settings found in server.xml?I think so. The way I understand it is the the context.xml file saves you from having to edit server.xml. It is preferred for each web app to do its own config, rather than lumping them all together in server.xml.
    And what would be the best way to create the war file? IAt its heart, a WAR is just a zip file with its contents laid out in according to the specification of a web application directory structure.
    So the simplest way to make a war file is to zip up your directory structure with a tool like winzip, and rename it to be myApp.war.
    Regarding ant, I would recommend you take a look through [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
    ]this tutorial. It explains the basics of website layout, configuration and deployment.
    On [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/source.html] this page  in particular, it includes a link to a basic ant file that you can use as a starting point.
    Cheers,
    evnafets

  • How use REPORT_DESTYPE with WebDAV

    Hi,
    How can I use the RUN_REPORT_OBJECT command to send report to Portal via WebDAV. If I try:
    SET_REPORT_OBJECT_PROPERTY( repid, REPORT_DESTYPE,WEBDAV);
    there is an error:
    identifier "WEBDAB" must be declared !
    In the Document " Oracle Application Server 10G -Integrating Oracle Reports in Oracle Forms Services applications" It said the REPORT_DESTYPE may be FILE, PRINTER, MAIL or CACHE only. What about other types like OraclePortal and WebDAV ?

    Hi Fang,
    As far as I know, SQL Server Reporting Services (SSRS), have no permission extension. In Reporting Services, it is use role-based security to grant user access to a report server. There are two types of roles: Item-level roles and System-level roles.
    Based on my test, if we assign user with System User System-level role, the user will have permission to user Report Builder to create report. However, if we only assigned Browser or Report Builder Item-level role to the user, he/she will have no permission
    to publish the report to the report server. In this situation, although user have permission user Report Builder to edit the report, it will have no effect of the report in report server. User who has assigned Browser or Report Builder Item-level role will
    have no permission to delete report in the report server.
    There is an article about Setting Permissions in Reporting Services, you can refer to it.
    http://technet.microsoft.com/en-us/library/aa337491(v=sql.105).aspx
    Hope this helps.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How use locator with sax to get line number of an element?

    dear friends,
    it's clearly stated in subject. after trying for hours, i still couldn't figure out how to get line numbers. my class extends defaulthandler. please help.
    ozgur

    hi
    i am also struggling with same problem
    someone plssssssss help.....
    how can i use Locator to get line number of the XML document.
    in my extended DefaultHandler class i have just implemented this,
    public void setDocumentLocator(Locator location) {
         lineNumber = location.getLineNumber();
    but no help...
    how to register my parser to the documnet locator events?
    plzzzzzzz help...
    -Soni

  • How use xml with namespaces

    I have the following xml which is output from Oracle Bpel.
    <OglRapportPerAdresnrResponse xmlns="http://www.itude.com/technology/Ogl/RapportPerAdresnrResponse">
    <AdresGegevens>
    <Adresnr>54321</Adresnr>
    <Straatkode>12345</Straatkode>
    </AdresGegevens>
    </OglRapportPerAdresnrResponse>
    If i remove the namespace info everything works fine but with the namespace info the output is empty if i insert e.g. <Adresnr> into a template. The field browser shows everything fine and also the value but when rendering a PDF it disappears. I read in the user guide that i need to declare the namspace in a form field like <?namespace:namespace name= namespace url?> but how do i do that with the above namespace notation where the namespace name is empty ?
    Regards,
    Andre

    Hi Tim,
    I found part of the solution but i am still stuck when i need to use <?for-each?> tags. When i use the following XML:
    <OglRapportPerAdresnrResponse xmlns="http://www.itude.com/technology/Ogl/RapportPerAdresnrResponse">
         <AdresGegevens>
              <Adresnr>8391</Adresnr>
              <Straatkode>11070</Straatkode>
         </AdresGegevens>
         <Basisgegevens>
              <paramPResult xmlns="urn:generated.ws.kgb.itude.com">
                   <paramAdresnr>8391</paramAdresnr>
                   <paramGegevenstype>GEBRUIK</paramGegevenstype>
              </paramPResult>
              <paramPResult xmlns="urn:generated.ws.kgb.itude.com">
                   <paramAdresnr>8391</paramAdresnr>
                   <paramGegevenstype>STADSDEEL</paramGegevenstype>
              </paramPResult>
         </Basisgegevens>
    </OglRapportPerAdresnrResponse>
    I read the xml file in Word. I then have access to the fields but when i select AdresGegevens/Adresnr the output is not rendered. The namespace is a default namespace for that element. I found out that if i define a namespace like <?xmlns:bpel=http://www.itude.com/technology/Ogl/RapportPerAdresnrResponse?> and then access the AdresGegevens/Adresnr through <?bpel:Adresnr?> it works!
    I then defined a second namespace <?xmlns:bpel2=urn:generated.ws.kgb.itude.com?> and tried to render the paramPResult tags with:
    <?for-each:paramPResult?>
    <?bpel2:paramAdresnr?>
    <?bpel2:paramGegevenstype?>
    <?end for-each?>
    But the above does not work. Any ideas?
    Regards,
    Andre Jochems

Maybe you are looking for

  • From Query to Excel

    Is there a way I can generate an Excel file from a cfm page (html table) without having to install MS Excel on the server?

  • Cant Open Camera Raw file in PSE8

    Hi Folks Please help ?.. I have recently purchased PSE8 for the Imac. I cant open my Camera Raw processed Images in PSE8. My workflow is very simple > Bridge > Select Image I want to work on > Open in Camera raw > alter Image > Select Done when finis

  • KE30 report is capturing Excise values

    Hi Gurus, In my pricing procedure I had used condition type VPRS & condition types for excise,education cess & higher education cess. The same VPRS has been assigned to COPA value fields. COPA actual line items shows 2 line items-  (1) For Excise (2)

  • POP mail doesn't show subfolders (mailboxes)

    I have more than 100 rules that direct my POP email to 15 mailboxes. None of them show up on the iPhone. Instead, all of the email - including junk mail - appears in a single inbox. If anyone knows of a way to make these subfolders appear, I'm all ea

  • AirTunes remote speaker menu not recognized in iTunes

    When I first got my AirPort Express, I had no problems playing my iTunes music over stereo speakers connected to the AX. Now the Airtunes remote speaker menu does not show up in the lower right corner of iTunes. This problem started many months ago,