To work your way through this sample
application, a basic understanding of the fundamental concepts of
servlets, JSP, JDBC and, Internationalization(I18N)
are required. For more information
please
refer Additional References.
Technical Overview
Internationalization
(I18N) is the process of designing a software or Web application to
handle different linguistic and cultural conventions without additional
engineering. Central to internationalization is the separation of
language and cultural data from the source code.
As companies integrate e-commerce on a global scale into their
fundamental business processes, their prospective customers,
established customers, and active partners can take advantage of
increased revenue and decreased expenses through software
internationalization. They can also improve customer communications and
increase savings. To know more about Internationalization refer the Additional References section at the end.
Application
Overview
The sample shows the welcome page to the
user according to his Locale and expect him/her to select a product
id. On submitting he will be shown the detailed product information.
All
the
information displayed to the user are internationalized.
Sample Application
Files
Readme file and Stylesheets
Directory
File
Description
I18NServlet/doc/
Readme.html
This file gives
introduction to the sample.
Install.html
This file has
instructions required to install the software and run this sample.
Java Server Page files for the Application
Directory
File
Description
I18NServlet/web/
display.jsp
This page displays
the product details to the end user.
welcome.jsp
This page will ask user
to select product id and submit the page to see the product details.
ANT build Script
Directory
File
Description
I18NServlet/
build.xml
This is
an ANT build script.
build.properties
Contains the parameters used by the ant to run
the build.xml. user need to modify this property file.
Configuration files for the Application
Directory
File
Description
I18NServlet/src/META-INF/
application.xml
Contains application information.
data-sources.xml
Contains the data source information.
data-sources._xml
Contains
the data source information. This file will be used while deploying the
sample by using ant.
orion-application.xml
Contains
the OC4J specific information.
Properties files
Directory
File
Description
I18NServlet/src/
MessagesBundle.properties
This is the base property file
property file.
MessagesBundle_en_US.properties
This is the property file, containing
English data.
MessagesBundle_fr_FR.properties
This is
the property file, containing French data.
Java Source files for the Application
Directory
File
Description
I18NServlet/src/oracle/otnsamples/servlet/i18n/
ConnectionDb.java
This class provides actual
implementation to create and close database connection.
ConnectionManager.java
This interface will be used to get
and close the database Connection and provides a layer of abstraction
to establish the database connection.
DbInteraction.java
This
class is responsible to interact with the database and to provide all
the necessary data to servlet from the database.
I18NServletFilter.java
This is
a Servlet Filter, will be used to modify request bases upon user locale.
KeyWrapper.java
This
interface is a wrapper on the keys defined in properties files.
I18NException.java
This is
the exception class.
Product.java
This class can hold the product
information.
JDeveloper project files.
Directory
File
Description
I18NServlet/
I18NServlet.jpr
JDeveloper Project File
I18NServlet.jws
JDeveloper WorkSpace File
I18NServlet.deploy
Deployment File
Setting up the Sample
Application
Please refer to the Installation document (Install.html)
for step-by-step instructions on copying files, installing packages,
and other configurations to successfully run the sample.