This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Display data from oracle to tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Display data from oracle to tomcat" Watch "Display data from oracle to tomcat" New topic

Display data from oracle to tomcat

Emma Aziz

Joined: Apr 27, 2009
Posts: 23
I have jsp file parked under catalina_home\webapps\mydir\my.jsp:

<%@ page import="java.sql.*"%>
<h1>Welcome to Emma's page</h1>
Connection connection = DriverManager.getConnection("jdbcracle:thin:@database:1521:SID",
"user1", "password");
Statement statement = connection.createStatement();
ResultSet resultset = statement.executeQuery("SELECT * FROM tblCustomer");
catch(Exception e){
<h1>Welcome to Emma's page</h1>

Previously, it worked fine, displaying the text and result from database until I changed something in server.xml and web.xml (web.xml under WEB-INF, not in conf folder). I cannot see anything from the database anymore, just text.

How is the correct configuration of server.xml in order for me to display the results?

Thanks in advance.

I agree. Here's the link:
subject: Display data from oracle to tomcat
jQuery in Action, 3rd edition