Subject | Re: [Firebird-Java] is there a test (Tomcat) |
---|---|
Author | Rick Fincher |
Post date | 2003-08-05T00:22:53Z |
Hi Herman,
I put together a very simple web app called "test" that prompts the user for
a last name to search for. It takes that name, creates a test database (if
one doesn't already exist) and searches for last names matching it in the
database. If no entries are found, it inserts 3 names with the last name
the user entered and searches again, so the user will have some output to
look at.
It consists of 3 files: index.html, search.jsp, and a bare bones
WEB-INF/web.xml file. They are short and simple so I put them in the FAQ in
the Tomcat section.
I put a second simple web app in the FAQ as well called dbTest that does the
same as test, except it uses a pooled DataSource with Tomcat and DBCP. In
addition to the files above (modified for a DataSource), I listed the
<context> entry that Tomcat needs in the conf/server.xml file for the
DataSource definition.
If JayBird is installed properly in Tomcat you should be able to drop the
files above into a folder under Tomcat called webapps/test or webapps/dbTest
respectively, start Tomcat and access the database.
It will be in the JayBird 1.0.1 download, or you can get it in the current
cvs.
The demo web apps assume that the username/password pair SYSDBA/masterkey is
valid. If not, you need to change them. You will also have to change the
URL in search.jsp, or in the <context> entry to put the database file in an
appropriate place on your hard drive.
Although these are very simple web apps they show how to SELECT, INSERT, and
create databases with JayBird in a webapp.
Hope this helps the Tomcat users out there get started.
Rick
I put together a very simple web app called "test" that prompts the user for
a last name to search for. It takes that name, creates a test database (if
one doesn't already exist) and searches for last names matching it in the
database. If no entries are found, it inserts 3 names with the last name
the user entered and searches again, so the user will have some output to
look at.
It consists of 3 files: index.html, search.jsp, and a bare bones
WEB-INF/web.xml file. They are short and simple so I put them in the FAQ in
the Tomcat section.
I put a second simple web app in the FAQ as well called dbTest that does the
same as test, except it uses a pooled DataSource with Tomcat and DBCP. In
addition to the files above (modified for a DataSource), I listed the
<context> entry that Tomcat needs in the conf/server.xml file for the
DataSource definition.
If JayBird is installed properly in Tomcat you should be able to drop the
files above into a folder under Tomcat called webapps/test or webapps/dbTest
respectively, start Tomcat and access the database.
It will be in the JayBird 1.0.1 download, or you can get it in the current
cvs.
The demo web apps assume that the username/password pair SYSDBA/masterkey is
valid. If not, you need to change them. You will also have to change the
URL in search.jsp, or in the <context> entry to put the database file in an
appropriate place on your hard drive.
Although these are very simple web apps they show how to SELECT, INSERT, and
create databases with JayBird in a webapp.
Hope this helps the Tomcat users out there get started.
Rick
----- Original Message -----
From: "Herman Timmermans" <timmermans.herman@...>
To: <Firebird-Java@yahoogroups.com>
Sent: Friday, July 18, 2003 1:21 AM
Subject: Re: [Firebird-Java] is there a test
> On Thursday 17 July 2003 20:20, Rick Fincher wrote:
> > Hi Daniel,
> >
> > OK, Tomcat I can help you with. It's a little off topic for here, since
it
> > is basically the same for most JDBC drivers, not JayBird specific.
> >
> > I'll e-mail you directly unless someone else want to see this.
> >
> > Rick
> >
> Why don't you add this section then to the FAQ so that it can be accessed
by
> everyone interested ?
> Keep up this good work,
> Herman