Add ODBC User Data Source in Windows 7

Trying to add ODBC User Data Source in windows 7 ? This post of How to add ODBC User Data Sources will make it easy, just follow the below steps.

Click on window write “c:\windows\sysWOW64\odbcad32.exe” in search bar you will see ODBC Data Source Administrator
odbc data source


Now click “Add”, a new window will open to Create New Data Source.

create new data source


After clicking the “Finish” button you will see the ODBC Microsoft Access Setup. Here we will give the Data Source Name and will select the Database. 

In the following image we have abc.accdb file already created in c:\. Here we selected the abc.accdb

select database


Click ok then ok again.


New User DSN is created

added user dsn


Thats it!

Struts 2.x – Oracle Database Connection

In this example I have mentioned each and every point clearly that you need to implement in order to use database server such as Oracle or MySQL with your Struts 2.x web applications without the use of JPA. This is a simple and widely used techniques of database connection in case you are not aware of JPA for database connection or you don’t want to use JPA.

I am here describing each and every point:

1. Create a Struts 2.x project using the suitable IDE of your choice (Here I’m using Netbeans IDE 7.2). If you are not aware of how to create projects in Struts 2.x using Netbeans as IDE? click on the link.
2. Writer the following code in your index.jsp page(create it if not present):

<%@taglib uri="/struts-tags" prefix="s" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

        JSP Page

Hello World!


3. Now make its entry into struts.xml file which is present under configurations option.
“-//Apache Software Foundation//DTD Struts Configuration 2.0//EN”