Introduction
As part of my attempt to work with my brother to dig a bit deeper into a Java based application running on Tomcat, I chose to write a simple HelloDB application in Java-JSP-JSTL.
Microsoft SQL Server JDBC Driver
Download Location
The latest Microsoft SQL Server JDBC Driver is v4.0. And, the URL is http://www.microsoft.com/en-us/download/details.aspx?id=11774
Extract files
We need a couple of Jar files from the compressed (*.tar.gz) file. On Linux we will use tar to extract the needed jar files.
Syntax:
tar -zxvf <compressed-file> *.jar
Sample:
tar -zxvf /tmp/sqljdbc_4.0.2206.100_enu.tar.gz *.jar
Output:
Where is $CATALINA_HOME/lib
We installed Apache Tomcat version 6 using yum, and our install location is /usr/share/tomcat6.
Underneath /usr/share/tomcat there is a lib folder; which is actually a symbolic link to /usr/share/java/tomcat6.
Copy JDBC Jar files into $CATALINA_HOME/lib
We need to copy sqljdbc4.jar unto the lib folder.
Copy Files
Syntax:
sudo cp <jar-files> <tomcat>/lib
Sample:
sudo cp sqljdbc_4.0/enu/*.jar /usr/share/tomcat6/lib
Output:
JSTL
Download Location
Download javax.servlet.jsp.jstl-1.2.1.jar from http://search.maven.org/#browse|-1002239620
Code – WAR File
File Contents
Here are the regular files that we will be including in our Jar file:
- WEB-INF/web.xml
- WEB-INF/lib
- WEB-INF/classes
- META-INF/context.xml
- html files
- image files
- jsp files
- 3rd Party Jar files – jstl files
Here are the files that we will not be including:
- Notice that you do not to indicate the manifest file, as that file is auto created
WAR File – Folder Structure
|
Source Code Location
On our system, we will place our source files in /home/dadeniji/development/apache.org/tomcat/MSAdventureWorksDWDB
Create empty file structure
Create empty file structure
if [[!-e WEB-INF ]]; then sudo mkdir -p WEB-INF if [[!-e WEB-INF/lib ]]; then sudo mkdir -p WEB-INF/lib if [[!-e WEB-INF/classes ]]; then sudo mkdir -p WEB-INF/classes if [[!-e META-INF ]]; then sudo mkdir -p META-INF
WEB-INF/web.xml
Create WEB-INF/web.xml
Here is the contents of our web xml file:
<?xml version="1.0" encoding="ISO-8859-1"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xsi="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <resource-ref> <description>DB Connection</description> <res-ref-name><strong>msadworks</strong></res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> </web-app>
There are a couple of areas to note:
- Our app version is targeting Servlet/JSP API version 2.5
- For our DB, we are defining a resource self-named msadworks and its type is javax.sql.DataSource
META-INF/context.xml
Create META-INF/context.xml
<xml version="1.0" encoding="UTF-8"?> <Context> <Resource name="<strong>msadworks</strong>" auth="Container" type="javax.sql.DataSource" username="ADWorksDW" password="sleeper" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://hrdb;databaseName=AdventureWorksDW2008R2;" maxActive="1000" maxIdle="30" maxWait="10000" factory="org.apache.commons.dbcp.BasicDataSourceFactory" logValidationErrors="true" > </Resource> </Context>
There are a couple of areas to note:
- We are further defining our database resource, msadworks
- Its type is javax.sql.DataSource
- The username & password that is predefined on the DB are noted
- The Driver Class Name for MS SQL Server JDBC 4.0 is indicated as com.microsoft.sqlserver.jdbc.SQLServerDriver
- The Url is “jdbc:sqlserver://<sqlmachinename>;databaseName=dbName
- For the Connection factor we are hard-coding org.apache.commons.dbcp.BasicDataSourceFactory
- And, logging validation errors via set setting logValidationErrors to true
Copy jstl jar files into WEB-INF lib
Here are the steps to copy the jstl files under WEB-INF/lib:
if [[ !-e WEB-INF/lib ]]; then sudo mkdir -p WEB-INF/lib sudo cp --update /tmp/jstl/javax.servlet.jsp.jstl-1.2.1.jar WEB-INF/lib sudo cp --update /tmp/jstl/javax.servlet.jsp.jstl-api-1.2.1.jar WEB-INF/lib
Source Code :- jspSimple.jsp
Here is a sample source code that connects to the hard coded sql server and relies on JDBC APIs to query and return the recordset from a table.
<html> <head>jspSimple.jsp</head> <body> <%@ page import="java.sql.*" %> <% String connectionUrl = "jdbc:sqlserver://hrdb:1433;databasename=AdventureWorksDW2008R2;user=AdWorksDW;password=sleeper"; String strSQLStatement = "select top 3 FirstName, LastName, EmailAddress from dbo.DimCustomer"; Connection con = null; Statement statement = null; ResultSet resultset = null; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); con = DriverManager.getConnection(connectionUrl); statement = con.createStatement() ; resultset = statement.executeQuery(strSQLStatement); %> <table> <tr> <th><b>First Name</b></th> <th><b>Last Name </b></th> <td><b>Email Address</b> </th> </tr> <% while (resultset.next()) { %> <tr> <td><%= resultset.getString("FirstName") %></td> <td><%= resultset.getString("LastName") %></td> <td><%= resultset.getString("EmailAddress") %></td> </tr> <% } %> </table> </body> </html>
Source Code :- explicit.jsp
The code below relies on the Context (part of javax.naming.) and DataSource (part of javax.sql).
Obviously, javax.naming.Context allows us to hide the server name and authentication credentials in xml files outside of the Source Code.
<%@ page contentType="text/html;charset=UTF-8" %> <%@ page import="java.sql.*" %> <%@ page import="javax.sql.*" %> <%@ page import="javax.naming.*" %> <HTML> <HEAD> <TITLE>JSP example</TITLE> </HEAD> <BODY> <h1>Hello,test JNDI ! </h1> <% Context ctx = new InitialContext(); Context envctx = (Context) ctx.lookup("java:comp/env"); DataSource ds = (DataSource) envctx.lookup("msadworks"); //DataSource ds = (DataSource) ctx.lookup("msadworks"); Connection conn=ds.getConnection(); Statement st=conn.createStatement(); String sql="select top 3 FirstName, LastName, EmailAddress" + " from dbo.DimCustomer"; ResultSet rs=st.executeQuery(sql); while(rs.next()) { %> FirstName:<%=rs.getString(1) %> LastName:<%=rs.getString(2) %> EmailAddress:<%=rs.getString(3) %> <% } %> <% rs.close(); st.close(); conn.close(); %> </BODY> </HTML>
Source Code :- queryDB.jsp
The code below uses JSTL tags and allows us closer to HTML/Code Fusion type programming.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <sql:query var="rs" dataSource="msadworks" > select top 3 FirstName, LastName, EmailAddress from dbo.DimCustomer </sql:query> <head> <title>DB Test</title> </head> <body> <h2>Results</h2> <table border="1" align="center" valign="center"> <th>Id</th> <th>Name</th> <th>Address</th> <c:forEach var="rs" items="${rs.rows}"> <tr> <td><c:out value="${rs.FirstName}"/>&nbsp;</td> <td><c:out value="${rs.LastName}"/>&nbsp;</td> <td><c:out value="${rs.EmailAddress}"/>&nbsp;</td> </tr> </c:forEach> </table> </body> </html>
Create Jar file
Here are the steps to create a jar file
Syntax:
jar cvf <war-file> *.jsp *.html images WEB-INF META-INF
Sample:
jar cvf MSAdventureWorksDWDB.war *.jsp *.html images WEB-INF META-INF
View Jar file Contents
View Jar file contents
Syntax:
jar tf <jar-file>
Sample:
jar tf MSAdventureWorksDWDB.war
Output:
Deploy – Manual
Manually deploy jar file by copying the war file into your webapps folder
There is a very noteworthy coverage of manually deploying WAR file available @
#un-deploy war if [[ -f "/usr/share/tomcat6/webapps/MSAdventureWorksDWDB.war" ]]; then echo "Removing file /usr/share/tomcat6/webapps/MSAdventureWorksDWDB.war ..." sudo rm "/usr/share/tomcat6/webapps/MSAdventureWorksDWDB.war" echo "Removed file /usr/share/tomcat6/webapps/MSAdventureWorksDWDB.war" fi #deploy war echo "Deploying file /usr/share/tomcat6/webapps/MSAdventureWorksDWDB.war ..." sudo cp MSAdventureWorksDWDB.war /usr/share/tomcat6/webapps/MSAdventureWorksDWDB.war echo "Deployed file /usr/share/tomcat6/webapps/MSAdventureWorksDWDB.war"
Deploy – Verification – CATALINA_HOME/conf/Catalina/localhost/<APP-NAME>.XML
File Name:
Review CATALINA_HOME/conf/Catalina/localhost and look for a configuration file (XML) bearing your Application Name.
In our case, our folder’s name is /usr/share/tomcat/conf/Catalina/localhost
And, the file we are looking for is MSAdventureWorksDWDB.xml
File Contents:
TroubleShooting
TroubleShooting – Log files
As Apache Tomcat is a server side architecture one needs to pay attention to its log files to see how things are going.
On Apache Tomcat 6, the log files are placed in /var/log/tomcat6
Diagnostic Steps
Use lsof
Use lsof to determine where sqljdbc4.jar is being loaded from:
[dadeniji@adelia MSAdventureWorksDWDB]$ sudo lsof | grep sqljdbc java 13196 tomcat mem REG 253,0 584207 522998 /usr/share/java/tomcat6/sqljdbc4.jar java 13196 tomcat 25r REG 253,0 584207 522998 /usr/share/java/tomcat6/sqljdbc4.jar [dadeniji@adelia MSAdventureWorksDWDB]$
Stolen Code from dinesh
Here is a piece of code stolen from Iscocra Consulting @ http://isocra.com/2007/10/jndi-problems-with-tomcat-5515/
<%@ page contentType="text/html;charset=UTF-8" %> <%@ page import="java.sql.*" %> <%@ page import="javax.sql.*" %> <%@ page import="javax.naming.*" %> <% Context initContext = new InitialContext(); out.println("1. Got the initial context"+ "\n "); String envContextName = "java:/comp/env"; Context envContext = (Context)initContext.lookup(envContextName); out.println("2. Got the context: "+ envContextName + "\n "); String jndiName = "msadworks"; DataSource ds = (DataSource)envContext.lookup(jndiName); out.println("3. Got the datasource: "+ds.getClass().getName() +" for context "+jndiName + "\n "); Connection conn = ds.getConnection(); out.println("4. Got the connection: "+conn); %>
Run-Time Error Messages
Wrong Folder Group
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /webapps/MSAdventureWorksDWDB does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142)
References – Name is not bound in this context
18: //Context envctx = (Context) ctx.lookup("java:comp/env"); 19: //DataSource ds = (DataSource) envctx.lookup("jdbc/MSAdventureWorksDWDB"); 20: 21: DataSource ds = (DataSource) ctx.lookup("jdbc/msadworks"); 22: 23: Connection conn=ds.getConnection(); 24: Statement st=conn.createStatement(); Stacktrace: root cause javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
Does not work:
//Context envctx = (Context) ctx.lookup("java:comp/env"); //DataSource ds = (DataSource) envctx.lookup("jdbc/msadworks"); DataSource ds = (DataSource) ctx.lookup("msadworks");
Works:
Context envctx = (Context) ctx.lookup("java:comp/env"); DataSource ds = (DataSource) envctx.lookup("jdbc/msadworks"); //DataSource ds = (DataSource) ctx.lookup("msadworks");
Actual SQL Database Connectivity Error – SQL Instance Connectivity
Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) javax.servlet.ServletException: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'sa'. com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'sa'. note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
Actual SQL Database Connectivity Error – SQL Instance \ Database Connectivity
Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "AdventureWorkDWs2008R2" requested by the login. note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
Actual SQL Database Connectivity Error – SQL Instance Connectivity – Wrong User/Password
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'AdventureWorksDW_v2'. ClientConnectionId:cd487d05-422d-4dcd-9cdd-f26d236428dd)" javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'AdventureWorksDW_v2'.
In our case, we had the wrong password
Actual SQL Database Connectivity Error – SQL Instance \ Database Connectivity
In the /var/log/tomcat6/catalina.<YYYY-MM-DD>.log, you might see warnings about a missing dll sqljdbc_auth.dll.
The warning speaks about the aforementioned file missing from the java.library.path.
Apr 24, 2014 11:13:15 AM com.microsoft.sqlserver.jdbc.AuthenticationJNI WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path Apr 24, 2014 11:13:15 AM org.apache.coyote.http11.Http11Protocol destroy
If your environment/OS is not Microsoft Windows, then you are OK.
It simply means you will not be able to use trusted authentication.
Actual SQL Database Connectivity Error – Cannot create JDBC Driver of class ” for connect URL ‘null’
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'" javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'" javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'"
The fix here could be so many things. Here are some things to try out.
- If you are manually modifying files in your your WAR directory, you might run into trouble with proper creation\update of your xml config file that is housed in /usr/share/tomcat/conf/Catalina/localhost.When an application is properly deployed, the system does an excellent job maintaining this file.
Conclusion
I stumbled quite a bit with this simple Application. And really, because I was a bit stuck with an unhelpful error message “Cannot create JDBC driver of class ” for connect URL ‘null'””, I dug and tried my best to have a clean room environment where I could really say this is the most straightforward way to fix that error.
But, it wasn’t to be. And, so though my little app is working, I do not have comprehensive data to share as to what the best path to remedify is.
And, so you get to have Joe Nichols as my Listening song!
Listening
Listening to Joe Nichols – I wish that wasn’t all:-
- mp3lemon.org
- Joe Nichols – I Wish that wasn’t all
Demoted On:- 2020-December-10th
Link
- Joe Nichols – I Wish that wasn’t all
- YouTube
- I wish that wasn’t all
Link
- I wish that wasn’t all
References
References – JSTL – Blog
- Tutorial how to set up tomcat 6 to work with jst1.2
http://www.mularien.com/blog/2008/02/19/tutorial-how-to-set-up-tomcat-6-to-work-with-jstl-12/
- How to reference and use jstl in your web application
http://www.mularien.com/blog/2008/04/24/how-to-reference-and-use-jstl-in-your-web-application/
References – JSTL – Jar Files Repository
References – JSTL – QA
- jstl – info
http://stackoverflow.com/tags/jstl/info - Getting jstl to run window tomcat and eclipse
http://stackoverflow.com/questions/1521257/getting-jstl-to-run-within-tomcat-and-eclipse - jstl-1-2-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-resolved
http://stackoverflow.com/questions/4928271/jstl-1-2-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-resolved
References – Java Development – Jar
- Creating a Jar file
http://docs.oracle.com/javase/tutorial/deployment/jar/build.html - View Jar file
http://docs.oracle.com/javase/tutorial/deployment/jar/view.html
References – Java Development – War
- Java War Files
http://www.yolinux.com/TUTORIALS/Java-WAR-files.html
References – Java Development – Directory Structure
- Tomcat Directory Structure
http://www0.cs.ucl.ac.uk/staff/P.Rounce/myhtml/elecTran_technical_manual/c1452.html
References – Java Development – Naming Convention
- What is web-inf used in a java web application
http://stackoverflow.com/questions/19786142/what-is-web-inf-used-for-in-a-java-web-application - Why Is Meta-Inf called Meta-Inf
http://stackoverflow.com/questions/6075095/why-is-meta-inf-called-meta-inf
References – Apache Tomcat – Installation
References – Apache Tomcat Installation on RedHat, CentOS, and Clones
- Apache Tomcat Installation on Linux (RHEL and clones)
http://www.oracle-base.com/articles/linux/apache-tomcat-installation-on-linux.php
References – Apache Tomcat – Deploy
- Portofino / Portofino 3 (older versions) / 3.1.x / Installation guide / Deploying on tomcat
http://www.manydesigns.com/en/portofino/portofino3/3_1_x/installation-guide/deploying-on-tomcat - Apache Tomcat Deploy Procedures
http://www.mulesoft.com/tcat/tomcat-deploy-procedures
References – Apache Tomcat – Deployment on MS Windows 2008/IIS v7
References – JDBC
References – JDBC – Connection Pooling – Concurrency
- Configuring JDBC Pool High Concurrency
http://www.tomcatexpert.com/blog/2010/04/01/configuring-jdbc-pool-high-concurrency
References – JDBC – Connection Pooling –
- java.boot.by – Interact with connection pools to obtain and release connections
http://java.boot.by/ibm-287/ch04s02.html - Unshareable and shareable connections
http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fcdat_conshrnon.html
References – JDBC – Connection Pooling – Standalone
- Using tomcat jdbc connection pool as standalone instantiated bean
http://kahimyang.info/kauswagan/code-blogs/1017/using-tomcat-jdbc-connection-pool-as-standalone-instantiated-bean
References – SQL Jar File Location
- Installing > Alternative installation methods > Installing using your own components
Apache Tomcat installation and configuration
http://pic.dhe.ibm.com/infocenter/bldforge/v8r0/index.jsp?topic=%2Fcom.ibm.rational.buildforge.doc%2Ftopics%2Faltinst_byoc_tomcat_setup.html
References – Sample Code
- Tomcat – Oracle – JDBC
Demoted On:- 2020-December-10th
http://www.davidghedini.com/pg/entry/tomcat_oracle_jdbc - Demoted On:- 2020-December-10th
http://darughachi.blogspot.com/2012/06/jstldatasources-in-tomcat-60.html
References – Sample Code – JSTL
- metawerx – Accessing a JNDI DataSource with JSTL from JSP
http://wiki.metawerx.net/wiki/AccessingAJNDIDataSourceWithJSTLFromJSP - jsql SQL Demo
http://aptech-teacher.googlecode.com/svn/hai.nt/FullJSPServletDemo/web/jstlSqlDemo.jsp - JSTL to achieve paging
http://www.programering.com/a/MjN5ADMwATc.html - Database Skill – jsp SQL Tags
http://www.databaseskill.com/4536621/
References – QA – sql:setDataSource
- sql:setDataSource – “java.sql.SQLException: No suitable driver” Again 😦
https://community.oracle.com/thread/1397792?start=0&tstart=0
References – Tomcat – Data Sources
- Using DataSources
http://wiki.apache.org/tomcat/UsingDataSources - Configure Tomcat 6 Data Source Using SQL
http://denistek.blogspot.com/2008/07/configure-tomcat-6-datasource-using-sql.html
References – Tomcat – Data Sources – External Context file
- Management Console in Tomcat > Deploying into Tomcat
http://help.kapowsoftware.com/9.2/index.jsp?topic=/doc/instmc/InstallingOnTomcat.datasources.html - Cannot create jdbc driver for connect URL http://blogs.agilefaqs.com/2009/11/23/cannot-create-jdbc-driver-of-class-for-connect-url-null/
References – Tomcat – Data Sources – Q/A
- Cannot create jdbc driver of class for connect url null
http://stackoverflow.com/questions/7274722/cannot-create-jdbc-driver-of-class-for-connect-url-null - TOMCAT6.0 connection pool sqlserver (solve Cannot create JDBC driver of class for connect URL’null
http://www.javaproblemstips.com/22022/
References – Tomcat – JNDI Resources – Q/A
- http://stackoverflow.com/questions/6654132/how-to-set-up-a-resource-in-tomcat-7-so-that-i-dont-need-to-use-java-comp-e
- Resource Name
http://stackoverflow.com/questions/15498851/configure-sql-server-connection-pool-on-tomcat
References – Vendor – jasig.org – uPortal 4.0
- uPortal 4.0 – MS SQL Server and MS JDBC Driver (recommended)
https://wiki.jasig.org/pages/viewpage.action?pageId=57578731
References – Error – Error Message – “WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path”
- No sqljdbc auth in Java Library Path
http://stackoverflow.com/questions/11707056/no-sqljdbc-auth-in-java-library-path
References – Error – Error Message – “Programmer’s Town » Java » tomcat 6 and No suitable driver found”
- Tomcat 6 and no suitable driver found
http://www.progtown.com/topic131811-tomcat-6-and-no-suitable-driver-found-for.html
References – Error – “Ubuntu Tomcat7 java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory”
- Ubuntu Tomcat7 java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
http://stackoverflow.com/questions/14712308/ubuntu-tomcat7-java-lang-classnotfoundexception-org-apache-tomcat-dbcp-dbcp-bas- The critical element is the “factory” declaration, which overrides the built-in default.On our production machines, the resource is defined in the GlobalNamingResources element of the server.xml file. Specifying the factory is only needed on the Ubuntu systems.
- Sameeh Harfoush [ Link ]
- I had the same problem on CentOS. I got around this by downloading a fresh copy of tomcat from site and uploaded tomcat-dbcp.jar to my online server lib, restart server 🙂
References – Problems – JNDI Lookup problem
- JNDI problems with tomcat 5.5
http://isocra.com/2007/10/jndi-problems-with-tomcat-5515/
References – Linux – Command – File Management – Mkdir
- How to mkdir only if a dir does not already exist
http://stackoverflow.com/questions/793858/how-to-mkdir-only-if-a-dir-does-not-already-exist - How to check if a directory exists in Shell Script
http://stackoverflow.com/questions/59838/how-to-check-if-a-directory-exists-in-a-shell-script - Test Constructs
http://tldp.org/LDP/abs/html/testconstructs.html#DBLBRACKETS
References – Linux – Command – File Management – Folder Copy
- Folder Copy Command
http://www.cyberciti.biz/faq/copy-folder-linux-command-line/
I thoroughly enjoyed reading this … Thanks Dani.
How about another one for connecting to other datasources besides MS SQL?
Certainly will so. Is there a particular database (Oracle, DB/2, MySQL, PostgresSQL, MongoDB) that we should address initially.
Thanks for posting a comment!
[…] The URL for the MS SQL Server implementation is https://danieladeniji.wordpress.com/2014/04/24/technical-apache-tomcat-microsoft-sql-server-sample-da… . […]
[…] The URL for the MS SQL Server implementation is https://danieladeniji.wordpress.com/2014/04/24/technical-apache-tomcat-microsoft-sql-server-sample-da… . […]