Quick Search for:  in language:    
J2EE,TEAM,WORK,DBA,always,been,most,Complicat
   Code/Articles  |  Newest/Best  |  Community  |  Jobs  |  Other  |  Goto  | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Java/ Javascript Stats

 Code: 220,465. lines
 Jobs: 90. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login





Latest Code Ticker for Java/ Javascript
Java, Calculator
By Rockwell on 1/4


Eatable Interface
By Rockwell on 1/4


Superclass Person
By Rockwell on 1/4


Draws Cube Function
By Rockwell on 1/4


Rectangle Class
By Rockwell on 1/4


Find Number of Upper and Lower Case Letters in a Command Line Argument String
By Rockwell on 1/4


anagrams
By Rockwell on 1/4


Text Reader with Tokenizer
By Rockwell on 1/4


Month Numbers
By Rockwell on 1/4


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

A (part11) Oracle with Java using J2EE Architecture

Print
Email
 
winzip icon
Submitted on: 12/5/2003 3:12:05 AM
By: James Smith K  
Level: Beginner
User Rating: Unrated
Compatibility:Java (JDK 1.1), Java (JDK 1.2)

Users have accessed this code 746 times.
 
(About the author)
 
     This had always been the most Complicated Subject to Handle Beacuse of Improper and Bad Documentations available over the net and Books u read , Thats one of the Reasons i delayed in writing in This Article and Most of the books never seem to answer your question. Oracle J2EE Setup is something which requires TEAM WORK and u should have very good relation with ur DBA , The man who setup your Oracle Server complete Article Available at my site http://www.geocities.com/james_smith73

 

HTML:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

//**************************************
//     
//HTML for :A (part11) Oracle with Java 
//     using J2EE Architecture
//**************************************
//     
Hi Friends 
this article is about Connecting Java in particular Java Server Pages with Oracle 9i Database using Java 2 Enterprise Edition J2EE Specifications, This is more of a practical approach from a programmers perspective than a completely theory driven article, We start of with the Assumption that oracle 9i Server is Installed and well configured and you are running Windows 2000 as a client to access this server and having 256MB RAM and Intel Pentium 4 Processor,
Initially we will setup Oracle Client using tnsnames.ora then Install J2SE ( Java 2 Platform Standard Edition) and J2EE ( Enterprise Java Software), then configure the Windows 2000 or XP System to understand J2EE and J2SE, 
Our Next step will be to write a JSP Code, which will 
1. import Necessary Java Classes
2. Get the Initial Parameters from web.xml file
3. Build a small Database Query or Select statement based on this
4. Connect to Oracle Database using Data Source lookup of JNDI *
5. Display records in the result set and close connection
* JNDI  Java Naming and Directory interface
	Once the coding is done it will be deployed on a J2EE Server using Deploy Tool from Sun Microsystems which comes with J2EE 1.3.1 Installation package
	Handle Possible Errors which might come in while Deploying or Calling the JSP Code to Connect to Database, Solve these errors and Display a final output where a JSP connects to a Oracle Database to show students records in a Database, 
	for Security Purpose the Server Name, DB Username, DB Password and other parameters, which are given in the article are Dummy and u must consult your Oracle Database Administrator to get real access to the server provided u have permission.
	However this article does not cover the work the DBA has to do like creating tables, performance tuning, Oracle Server Setup etc., This article can be viewed from a Java Programmers Perspective and the way a Programmer can Handle Mostly Misleading Oracle Errors like for Instance when u get an Error ORA-00600: internal error code, arguments: [ttcgcshnd-1] your DBA MIGHT look into Oracle Errors in oracle site and suggest this error is because This error occurs when both addresses, read and calculated, contain some large numbers. Possible reasons are an incorrect entry in the block header (pointing to non-existent block) due to faulty memory modules, or the block is part of a large database file (greater than 2GB) and the block is written in the wrong place  and suggest to apply patched u say Oh my God  with a sign on your face 
But the Simple solution to complicated problem can be using proper version of classes12.zip file in classpath, the complete article is available online at my site http://www.geocites.com/james_smith73 under Java Section Oracle Link
Due to heavy traffic and limited Bandwidth Allotted on this free site sometimes u may get a message from Geocities server saying site temporarily unavailable in that case u made access the same after sometime.
Best Regards
James Smith
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 10 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments

 There are no comments on this submission.
 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Java/ Javascript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.