RE: Working of Tomcat with MS Access

2011-04-19 Thread George Sexton

 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Friday, April 15, 2011 1:02 PM
 To: Tomcat Users List
 Subject: Re: Working of Tomcat with MS Access
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Jeff,
 
 On 4/15/2011 11:11 AM, Jeff Hubbs wrote:
  You do realize, I hope, that what you're proposing is akin to
 sourcing
  parts for your jet engine from Fisher-Price?
 
 :)
 
  MS Access is a desktop application that accesses files on disk.  Java
  apps running on Tomcat typically access an RDBMS over a network
  connection via SQL statements and their responses.  AFAIK there is
 not a
  server instantiation of MS Access;
 
 While you're right, I believe that MS has an Access JDBC (or ODBC)
 driver that allows you to specify the file to open as part of the JDBC
 URL. It's kind of like using a CSV file as a database, though...

More to the point, there's no such thing as a 64-bit ODBC driver for Access. In 
short, if you use Access for a data store, your app must run in 32 bit mode 
using a 32-bit JVM.


 
 Anyway, this is possible. He's just missing some configuration of some
 kind. I feel kind of fortunate that I have no past experience on which
 to draw to help the OP.
 
 Google for read access database in Java perhaps?
 
 - -chris


George Sexton
MH Software, Inc.
303 438-9585
www.mhsoftware.com


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-16 Thread Pid
On 4/15/11 6:58 PM, RAHUL RAJ wrote:
 This is like a small assignment that has to be submitted urgently

Is this student coursework?


p



signature.asc
Description: OpenPGP digital signature


Re: Working of Tomcat with MS Access

2011-04-16 Thread RAHUL RAJ
Yes

On Sat, Apr 16, 2011 at 8:44 PM, Pid p...@pidster.com wrote:

 On 4/15/11 6:58 PM, RAHUL RAJ wrote:
  This is like a small assignment that has to be submitted urgently

 Is this student coursework?


 p




Re: Working of Tomcat with MS Access

2011-04-15 Thread Mikolaj Rydzewski


On Fri, 15 Apr 2011 15:34:37 +0530, RAHUL RAJ omrahulraj...@gmail.com 
wrote:



 I am working on  building a jsp website with MS Access as
database.


I usually do not express my opinions about others code, but your is 
really the worst code sample I have ever seen...
I know that everyone has its time to begin. But please use some good 
book to start with.


1. use newer tomcat
2. do not mix code and html
3. instantiate jdbc driver once
4. close jdbc connections (within finally block) after use
5. use where sql clause
6. use better database
7. perform usernamepassword check only after form submission
8. use any framework/library to wrap jdbc calls
9. 

--
Mikolaj Rydzewski m...@ceti.pl

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
I know my code is not perfect.
But I just want to resolve this error now. Can u say how to solve
this? pls answer to the question.have u read my message
completely?

On 4/15/11, Mikolaj Rydzewski m...@ceti.pl wrote:

  On Fri, 15 Apr 2011 15:34:37 +0530, RAHUL RAJ omrahulraj...@gmail.com
  wrote:

  I am working on  building a jsp website with MS Access as
 database.

  I usually do not express my opinions about others code, but your is
  really the worst code sample I have ever seen...
  I know that everyone has its time to begin. But please use some good
  book to start with.

  1. use newer tomcat
  2. do not mix code and html
  3. instantiate jdbc driver once
  4. close jdbc connections (within finally block) after use
  5. use where sql clause
  6. use better database
  7. perform usernamepassword check only after form submission
  8. use any framework/library to wrap jdbc calls
  9. 

 --
  Mikolaj Rydzewski m...@ceti.pl

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
The code I gave is just a sample code, it might change afterwards..but
before that, I need to resolve this error, sorry for your
inconvenience...

On 4/15/11, RAHUL RAJ omrahulraj...@gmail.com wrote:
 I know my code is not perfect.
 But I just want to resolve this error now. Can u say how to solve
 this? pls answer to the question.have u read my message
 completely?

 On 4/15/11, Mikolaj Rydzewski m...@ceti.pl wrote:

  On Fri, 15 Apr 2011 15:34:37 +0530, RAHUL RAJ omrahulraj...@gmail.com
  wrote:

  I am working on  building a jsp website with MS Access as
 database.

  I usually do not express my opinions about others code, but your is
  really the worst code sample I have ever seen...
  I know that everyone has its time to begin. But please use some good
  book to start with.

  1. use newer tomcat
  2. do not mix code and html
  3. instantiate jdbc driver once
  4. close jdbc connections (within finally block) after use
  5. use where sql clause
  6. use better database
  7. perform usernamepassword check only after form submission
  8. use any framework/library to wrap jdbc calls
  9. 

 --
  Mikolaj Rydzewski m...@ceti.pl

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread Mikolaj Rydzewski


On Fri, 15 Apr 2011 17:01:05 +0530, RAHUL RAJ omrahulraj...@gmail.com 
wrote:

I know my code is not perfect.
But I just want to resolve this error now. Can u say how to solve
this? pls answer to the question.have u read my message
completely?


How do you run your tomcat - as a service?

--
Mikolaj Rydzewski m...@ceti.pl

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Working of Tomcat with MS Access

2011-04-15 Thread Propes, Barry L
I know from previous experience that driver you show is horribly outdated, and 
horrible in general.

I assume no credentials are needed to access the DB in the Connection  object, 
con?

Maybe I'm reading that incorrectly.

Does the JDBC program connect to MS Access at all?


-Original Message-
From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
Sent: Friday, April 15, 2011 5:05 AM
To: users@tomcat.apache.org
Subject: Working of Tomcat with MS Access

Hello,
 I am working on  building a jsp website with MS Access as database. When 
my login page is loaded on tomcat (localhost:8080/login.jsp), it shows the 
following error:

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not 
found and no default driver specified.

The jdbc program alone is working perfectly, So There might not be problems due 
to  Driver, Data source name, Database Tables or any other software version 
compatibilities.

OS: Windows Vista Home Basic
Tomcat Version: 5.5.x
jdk version: 1.6
MS Access 2010


code is given below:

%@ page language=java import=java.sql.* %  html  body  form 
method=post  p Enter your username :  input type=text name=username/ 
/p  p Enter your password :  input type=text name=password/ /p  
input type=submit value=Login/  %
String usn = request.getParameter(username);
String pass = request.getParameter(password);

try{
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
 String url = jdbc:odbc:rahul;
 Connection con = DriverManager.getConnection(url, , );
 Statement s = con.createStatement();

 ResultSet rs = s.executeQuery(select * from customers);
 while(rs.next())
 {
   String u = rs.getString(1);
   String p = rs.getString(2);
   if(usn.equals(u)  pass.equals(p))
   {
  out.println(login successfull);
  }
   else
   {
  out.println(login failed);
 }
   }
}

catch(Exception e)
{
   out.println(Error+e);
   }

 %
 /form
 /body
 /html

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread Jeff Hubbs
You do realize, I hope, that what you're proposing is akin to sourcing 
parts for your jet engine from Fisher-Price?


IMHO MS Access is not and never has been useful as a professional 
database product.  I'm not even sure if what you are proposing even 
holds up in the looking-through-binoculars-from-the-big-end sense.


MS Access is a desktop application that accesses files on disk.  Java 
apps running on Tomcat typically access an RDBMS over a network 
connection via SQL statements and their responses.  AFAIK there is not a 
server instantiation of MS Access; in fact, part of the whole point of 
MS Access as an ongoing product is that it acts as a gateway drug to 
MS' SQL Server product, the transition to which would be triggered by 
the inherent limitations (and, in my past experience, persistent 
unaddressed bugs) of Access.


I think you need to back up a bit and work toward getting your data 
liberated from MS Access and ported into a proper RDBMS like PostgreSQL 
or one of MS SQL Server, Oracle, IBM DB2, etc. if you feel that money 
must be continually spent on software licenses for such.  Then you will 
be facing Java apps and Tomcat in a far more conventional way.


So, to sum up this and earlier responses: 1) Learn to code Java 2) 
Understand real RDBMSses.


- Jeff

On 4/15/11 6:04 AM, RAHUL RAJ wrote:

Hello,
  I am working on  building a jsp website with MS Access as
database. When my login page is loaded on tomcat
(localhost:8080/login.jsp), it shows the following error:

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified.

The jdbc program alone is working perfectly, So There might not be
problems due to  Driver, Data source name, Database Tables or any
other software version compatibilities.

OS: Windows Vista Home Basic
Tomcat Version: 5.5.x
jdk version: 1.6
MS Access 2010


code is given below:

%@ page language=java import=java.sql.* %
  html
  body
  form method=post
  p  Enter your username :input type=text name=username/  /p
  p  Enter your password :input type=text name=password/  /p
  input type=submit value=Login/
  %
 String usn = request.getParameter(username);
String pass = request.getParameter(password);

try{
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
 String url = jdbc:odbc:rahul;
 Connection con = DriverManager.getConnection(url, , );
 Statement s = con.createStatement();

 ResultSet rs = s.executeQuery(select * from customers);
 while(rs.next())
 {
   String u = rs.getString(1);
   String p = rs.getString(2);
   if(usn.equals(u)  pass.equals(p))
   {
  out.println(login successfull);
  }
   else
{
   out.println(login failed);
  }
}
 }

catch(Exception e)
{
   out.println(Error+e);
   }

  %
  /form
  /body
  /html

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread Angel Java Lopez
One question:

You should have an ODBC declaration named rahul. It is declared for your
user, or as a system odbc name? My guess, your Tomcat is running as a
service, or under other user (not your user), and ODBC rahul Data Source
name is only for your user.

Is it the case?

Did you solve the problem? How?

Angel Java Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

On Fri, Apr 15, 2011 at 7:04 AM, RAHUL RAJ omrahulraj...@gmail.com wrote:

 Hello,
 I am working on  building a jsp website with MS Access as
 database. When my login page is loaded on tomcat
 (localhost:8080/login.jsp), it shows the following error:

 java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
 name not found and no default driver specified.

 The jdbc program alone is working perfectly, So There might not be
 problems due to  Driver, Data source name, Database Tables or any
 other software version compatibilities.

 OS: Windows Vista Home Basic
 Tomcat Version: 5.5.x
 jdk version: 1.6
 MS Access 2010


 code is given below:

 %@ page language=java import=java.sql.* %
  html
  body
  form method=post
  p Enter your username :  input type=text name=username/ /p
  p Enter your password :  input type=text name=password/ /p
  input type=submit value=Login/
  %
String usn = request.getParameter(username);
String pass = request.getParameter(password);

try{
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
 String url = jdbc:odbc:rahul;
 Connection con = DriverManager.getConnection(url, , );
 Statement s = con.createStatement();

 ResultSet rs = s.executeQuery(select * from customers);
 while(rs.next())
 {
   String u = rs.getString(1);
   String p = rs.getString(2);
   if(usn.equals(u)  pass.equals(p))
   {
  out.println(login successfull);
  }
   else
   {
  out.println(login failed);
 }
   }
}

catch(Exception e)
{
   out.println(Error+e);
   }

  %
  /form
  /body
  /html

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Working of Tomcat with MS Access

2011-04-15 Thread Troy
Raj;

To all reading this response, this is my first response on this list so if I 
get it a little wrong have patience.

You may want to look at the light weight RDBMS mysql.  It is free, easily 
installed and can be utilized with the companion Workbench to make dealing with 
the db very easy, a lot like the access interface.  You will have good driver 
support from the java end as well and a lot of documentation and tutorials to 
get you connected in your web app to your persistence layer.

mysql.com

Just my two cents and an attempt to give back a little to the community.

Troy

 

 


 

 

-Original Message-
From: RAHUL RAJ omrahulraj...@gmail.com
To: users users@tomcat.apache.org
Sent: Fri, Apr 15, 2011 6:05 am
Subject: Working of Tomcat with MS Access


Hello,

 I am working on  building a jsp website with MS Access as

database. When my login page is loaded on tomcat

(localhost:8080/login.jsp), it shows the following error:



java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source

name not found and no default driver specified.



The jdbc program alone is working perfectly, So There might not be

problems due to  Driver, Data source name, Database Tables or any

other software version compatibilities.



OS: Windows Vista Home Basic

Tomcat Version: 5.5.x

jdk version: 1.6

MS Access 2010





code is given below:



%@ page language=java import=java.sql.* %

 html

 body

 form method=post

 p Enter your username :  input type=text name=username/ /p

 p Enter your password :  input type=text name=password/ /p

 input type=submit value=Login/

 %

String usn = request.getParameter(username);

String pass = request.getParameter(password);



try{

 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);

 String url = jdbc:odbc:rahul;

 Connection con = DriverManager.getConnection(url, , );

 Statement s = con.createStatement();



 ResultSet rs = s.executeQuery(select * from customers);

 while(rs.next())

 {

   String u = rs.getString(1);

   String p = rs.getString(2);

   if(usn.equals(u)  pass.equals(p))

   {

  out.println(login successfull);

  }

   else

   {

  out.println(login failed);

 }

   }

}



catch(Exception e)

{

   out.println(Error+e);

   }



 %

 /form

 /body

 /html



-

To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: users-h...@tomcat.apache.org




 


Re: Working of Tomcat with MS Access

2011-04-15 Thread Jeff Hubbs
MySQL is indeed another good Open Source RDBMS; I would not call it 
lightweight in that it is used to power some mighty big Web apps, but 
the implementation does seem a little quaint.


On 4/15/11 11:38 AM, Troy wrote:

Raj;

To all reading this response, this is my first response on this list so if I 
get it a little wrong have patience.

You may want to look at the light weight RDBMS mysql.  It is free, easily 
installed and can be utilized with the companion Workbench to make dealing with 
the db very easy, a lot like the access interface.  You will have good driver 
support from the java end as well and a lot of documentation and tutorials to 
get you connected in your web app to your persistence layer.

mysql.com

Just my two cents and an attempt to give back a little to the community.

Troy










-Original Message-
From: RAHUL RAJomrahulraj...@gmail.com
To: usersusers@tomcat.apache.org
Sent: Fri, Apr 15, 2011 6:05 am
Subject: Working of Tomcat with MS Access


Hello,

  I am working on  building a jsp website with MS Access as

database. When my login page is loaded on tomcat

(localhost:8080/login.jsp), it shows the following error:



java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source

name not found and no default driver specified.



The jdbc program alone is working perfectly, So There might not be

problems due to  Driver, Data source name, Database Tables or any

other software version compatibilities.



OS: Windows Vista Home Basic

Tomcat Version: 5.5.x

jdk version: 1.6

MS Access 2010





code is given below:



%@ page language=java import=java.sql.* %

  html

  body

  form method=post

  p  Enter your username :input type=text name=username/  /p

  p  Enter your password :input type=text name=password/  /p

  input type=submit value=Login/

  %

 String usn = request.getParameter(username);

String pass = request.getParameter(password);



try{

 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);

 String url = jdbc:odbc:rahul;

 Connection con = DriverManager.getConnection(url, , );

 Statement s = con.createStatement();



 ResultSet rs = s.executeQuery(select * from customers);

 while(rs.next())

 {

   String u = rs.getString(1);

   String p = rs.getString(2);

   if(usn.equals(u)  pass.equals(p))

   {

  out.println(login successfull);

  }

   else

{

   out.println(login failed);

  }

}

 }



catch(Exception e)

{

   out.println(Error+e);

   }



  %

  /form

  /body

  /html



-

To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

For additional commands, e-mail: users-h...@tomcat.apache.org









-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
I got communications exception when I did this with mysql...and no one knows
the reason perfectly...no response from mysql forum too...

On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote:

 Raj;

 To all reading this response, this is my first response on this list so if
 I get it a little wrong have patience.

 You may want to look at the light weight RDBMS mysql.  It is free, easily
 installed and can be utilized with the companion Workbench to make dealing
 with the db very easy, a lot like the access interface.  You will have good
 driver support from the java end as well and a lot of documentation and
 tutorials to get you connected in your web app to your persistence layer.

 mysql.com

 Just my two cents and an attempt to give back a little to the community.

 Troy










 -Original Message-
 From: RAHUL RAJ omrahulraj...@gmail.com
 To: users users@tomcat.apache.org
 Sent: Fri, Apr 15, 2011 6:05 am
 Subject: Working of Tomcat with MS Access


 Hello,

 I am working on  building a jsp website with MS Access as

 database. When my login page is loaded on tomcat

 (localhost:8080/login.jsp), it shows the following error:



 java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source

 name not found and no default driver specified.



 The jdbc program alone is working perfectly, So There might not be

 problems due to  Driver, Data source name, Database Tables or any

 other software version compatibilities.



 OS: Windows Vista Home Basic

 Tomcat Version: 5.5.x

 jdk version: 1.6

 MS Access 2010





 code is given below:



 %@ page language=java import=java.sql.* %

  html

  body

  form method=post

  p Enter your username :  input type=text name=username/ /p

  p Enter your password :  input type=text name=password/ /p

  input type=submit value=Login/

  %

String usn = request.getParameter(username);

String pass = request.getParameter(password);



try{

 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);

 String url = jdbc:odbc:rahul;

 Connection con = DriverManager.getConnection(url, , );

 Statement s = con.createStatement();



 ResultSet rs = s.executeQuery(select * from customers);

 while(rs.next())

 {

   String u = rs.getString(1);

   String p = rs.getString(2);

   if(usn.equals(u)  pass.equals(p))

   {

  out.println(login successfull);

  }

   else

   {

  out.println(login failed);

 }

   }

}



catch(Exception e)

{

   out.println(Error+e);

   }



  %

  /form

  /body

  /html



 -

 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

 For additional commands, e-mail: users-h...@tomcat.apache.org








Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
Yes I already did , that  you might think I should. Now I am trying with MS
ACCESS...and new error came : SQLException: general error
I didn't found any error in my  sql syntax or jdbc code. jdbc code alone is
working perfectly..

On Fri, Apr 15, 2011 at 9:02 PM, Angel Java Lopez ajlopez2...@gmail.comwrote:

 One question:

 You should have an ODBC declaration named rahul. It is declared for your
 user, or as a system odbc name? My guess, your Tomcat is running as a
 service, or under other user (not your user), and ODBC rahul Data Source
 name is only for your user.

 Is it the case?

 Did you solve the problem? How?

 Angel Java Lopez
 http://www.ajlopez.com
 http://twitter.com/ajlopez

 On Fri, Apr 15, 2011 at 7:04 AM, RAHUL RAJ omrahulraj...@gmail.com
 wrote:

  Hello,
  I am working on  building a jsp website with MS Access as
  database. When my login page is loaded on tomcat
  (localhost:8080/login.jsp), it shows the following error:
 
  java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
  name not found and no default driver specified.
 
  The jdbc program alone is working perfectly, So There might not be
  problems due to  Driver, Data source name, Database Tables or any
  other software version compatibilities.
 
  OS: Windows Vista Home Basic
  Tomcat Version: 5.5.x
  jdk version: 1.6
  MS Access 2010
 
 
  code is given below:
 
  %@ page language=java import=java.sql.* %
   html
   body
   form method=post
   p Enter your username :  input type=text name=username/ /p
   p Enter your password :  input type=text name=password/ /p
   input type=submit value=Login/
   %
 String usn = request.getParameter(username);
 String pass = request.getParameter(password);
 
 try{
  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  String url = jdbc:odbc:rahul;
  Connection con = DriverManager.getConnection(url, ,
 );
  Statement s = con.createStatement();
 
  ResultSet rs = s.executeQuery(select * from customers);
  while(rs.next())
  {
String u = rs.getString(1);
String p = rs.getString(2);
if(usn.equals(u)  pass.equals(p))
{
   out.println(login successfull);
   }
else
{
   out.println(login failed);
  }
}
 }
 
 catch(Exception e)
 {
out.println(Error+e);
}
 
   %
   /form
   /body
   /html
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
Since I am a beginner, I have to start with some trial projects, right? I
know this is nothing! and help me...pls answer to the question..

On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbs jhubbsl...@att.net wrote:

 You do realize, I hope, that what you're proposing is akin to sourcing
 parts for your jet engine from Fisher-Price?

 IMHO MS Access is not and never has been useful as a professional database
 product.  I'm not even sure if what you are proposing even holds up in the
 looking-through-binoculars-from-the-big-end sense.

 MS Access is a desktop application that accesses files on disk.  Java apps
 running on Tomcat typically access an RDBMS over a network connection via
 SQL statements and their responses.  AFAIK there is not a server
 instantiation of MS Access; in fact, part of the whole point of MS Access
 as an ongoing product is that it acts as a gateway drug to MS' SQL Server
 product, the transition to which would be triggered by the inherent
 limitations (and, in my past experience, persistent unaddressed bugs) of
 Access.

 I think you need to back up a bit and work toward getting your data
 liberated from MS Access and ported into a proper RDBMS like PostgreSQL or
 one of MS SQL Server, Oracle, IBM DB2, etc. if you feel that money must be
 continually spent on software licenses for such.  Then you will be facing
 Java apps and Tomcat in a far more conventional way.

 So, to sum up this and earlier responses: 1) Learn to code Java 2)
 Understand real RDBMSses.

 - Jeff


 On 4/15/11 6:04 AM, RAHUL RAJ wrote:

 Hello,
  I am working on  building a jsp website with MS Access as
 database. When my login page is loaded on tomcat
 (localhost:8080/login.jsp), it shows the following error:

 java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
 name not found and no default driver specified.

 The jdbc program alone is working perfectly, So There might not be
 problems due to  Driver, Data source name, Database Tables or any
 other software version compatibilities.

 OS: Windows Vista Home Basic
 Tomcat Version: 5.5.x
 jdk version: 1.6
 MS Access 2010


 code is given below:

 %@ page language=java import=java.sql.* %
  html
  body
  form method=post
  p  Enter your username :input type=text name=username/  /p
  p  Enter your password :input type=text name=password/  /p
  input type=submit value=Login/
  %
 String usn = request.getParameter(username);
String pass = request.getParameter(password);

try{
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
 String url = jdbc:odbc:rahul;
 Connection con = DriverManager.getConnection(url, , );
 Statement s = con.createStatement();

 ResultSet rs = s.executeQuery(select * from customers);
 while(rs.next())
 {
   String u = rs.getString(1);
   String p = rs.getString(2);
   if(usn.equals(u)  pass.equals(p))
   {
  out.println(login successfull);
  }
   else
{
   out.println(login failed);
  }
}
 }

catch(Exception e)
{
   out.println(Error+e);
   }

  %
  /form
  /body
  /html

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




RE: Working of Tomcat with MS Access

2011-04-15 Thread Leo Donahue - PLANDEVX

-Original Message-
From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
Sent: Friday, April 15, 2011 10:35 AM
To: Tomcat Users List
Subject: Re: Working of Tomcat with MS Access

Since I am a beginner, I have to start with some trial projects, right?
I
know this is nothing! and help me...pls answer to the question..


Mikolaj gave you a hint already.

If your Tomcat runs as a service, under what account does that service run?  
Does that account have access to your mdb?

Did you create a user or system datasource on your computer with the name: 
rahul 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread Jeff Hubbs
A beginner needs to at least begin with workable platforms and 
software.  PostgreSQL on Linux has a total software license cost of 
$0.00; your barrier to entry with inappropriate software is considerably 
higher.


On 4/15/11 1:35 PM, RAHUL RAJ wrote:

Since I am a beginner, I have to start with some trial projects, right? I
know this is nothing! and help me...pls answer to the question..

On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbsjhubbsl...@att.net  wrote:


You do realize, I hope, that what you're proposing is akin to sourcing
parts for your jet engine from Fisher-Price?

IMHO MS Access is not and never has been useful as a professional database
product.  I'm not even sure if what you are proposing even holds up in the
looking-through-binoculars-from-the-big-end sense.

MS Access is a desktop application that accesses files on disk.  Java apps
running on Tomcat typically access an RDBMS over a network connection via
SQL statements and their responses.  AFAIK there is not a server
instantiation of MS Access; in fact, part of the whole point of MS Access
as an ongoing product is that it acts as a gateway drug to MS' SQL Server
product, the transition to which would be triggered by the inherent
limitations (and, in my past experience, persistent unaddressed bugs) of
Access.

I think you need to back up a bit and work toward getting your data
liberated from MS Access and ported into a proper RDBMS like PostgreSQL or
one of MS SQL Server, Oracle, IBM DB2, etc. if you feel that money must be
continually spent on software licenses for such.  Then you will be facing
Java apps and Tomcat in a far more conventional way.

So, to sum up this and earlier responses: 1) Learn to code Java 2)
Understand real RDBMSses.

- Jeff


On 4/15/11 6:04 AM, RAHUL RAJ wrote:


Hello,
  I am working on  building a jsp website with MS Access as
database. When my login page is loaded on tomcat
(localhost:8080/login.jsp), it shows the following error:

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified.

The jdbc program alone is working perfectly, So There might not be
problems due to  Driver, Data source name, Database Tables or any
other software version compatibilities.

OS: Windows Vista Home Basic
Tomcat Version: 5.5.x
jdk version: 1.6
MS Access 2010


code is given below:

%@ page language=java import=java.sql.* %
  html
  body
  form method=post
  p   Enter your username :input type=text name=username/   /p
  p   Enter your password :input type=text name=password/   /p
  input type=submit value=Login/
  %
 String usn = request.getParameter(username);
String pass = request.getParameter(password);

try{
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
 String url = jdbc:odbc:rahul;
 Connection con = DriverManager.getConnection(url, , );
 Statement s = con.createStatement();

 ResultSet rs = s.executeQuery(select * from customers);
 while(rs.next())
 {
   String u = rs.getString(1);
   String p = rs.getString(2);
   if(usn.equals(u)   pass.equals(p))
   {
  out.println(login successfull);
  }
   else
{
   out.println(login failed);
  }
}
 }

catch(Exception e)
{
   out.println(Error+e);
   }

  %
  /form
  /body
  /html

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
Yes, it runs as a service. But how to know under what account does that
service run? does it mean 'admin' or 'normal user' or 'system'?
I made a system DSN for this...not the user DSN(Data Source Name)
and I launched tomcat service by right click 'run as admin'

On Fri, Apr 15, 2011 at 11:09 PM, Leo Donahue - PLANDEVX 
leodona...@mail.maricopa.gov wrote:


 -Original Message-
 From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
 Sent: Friday, April 15, 2011 10:35 AM
 To: Tomcat Users List
 Subject: Re: Working of Tomcat with MS Access
 
 Since I am a beginner, I have to start with some trial projects, right?
 I
 know this is nothing! and help me...pls answer to the question..
 

 Mikolaj gave you a hint already.

 If your Tomcat runs as a service, under what account does that service run?
  Does that account have access to your mdb?

 Did you create a user or system datasource on your computer with the name:
 rahul

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Working of Tomcat with MS Access

2011-04-15 Thread Troy
Raj,

I think everyone is saying to take a look at this syntax:


String url = jdbc:odbc:rahul;
Connection con = DriverManager.getConnection(url, , );


I know that when I make this type of simple jdbc connection in mysql the syntax 
is:

String url = jdbc:mysql://localhost/dbName;
Connection conn = DriverManager.getConnection(url, , );

Troy

 

 


 

 

-Original Message-
From: RAHUL RAJ omrahulraj...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, Apr 15, 2011 1:31 pm
Subject: Re: Working of Tomcat with MS Access


I got communications exception when I did this with mysql...and no one knows

the reason perfectly...no response from mysql forum too...



On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote:



 Raj;



 To all reading this response, this is my first response on this list so if

 I get it a little wrong have patience.



 You may want to look at the light weight RDBMS mysql.  It is free, easily

 installed and can be utilized with the companion Workbench to make dealing

 with the db very easy, a lot like the access interface.  You will have good

 driver support from the java end as well and a lot of documentation and

 tutorials to get you connected in your web app to your persistence layer.



 mysql.com



 Just my two cents and an attempt to give back a little to the community.



 Troy





















 -Original Message-

 From: RAHUL RAJ omrahulraj...@gmail.com

 To: users users@tomcat.apache.org

 Sent: Fri, Apr 15, 2011 6:05 am

 Subject: Working of Tomcat with MS Access





 Hello,



 I am working on  building a jsp website with MS Access as



 database. When my login page is loaded on tomcat



 (localhost:8080/login.jsp), it shows the following error:







 java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source



 name not found and no default driver specified.







 The jdbc program alone is working perfectly, So There might not be



 problems due to  Driver, Data source name, Database Tables or any



 other software version compatibilities.







 OS: Windows Vista Home Basic



 Tomcat Version: 5.5.x



 jdk version: 1.6



 MS Access 2010











 code is given below:







 %@ page language=java import=java.sql.* %



  html



  body



  form method=post



  p Enter your username :  input type=text name=username/ /p



  p Enter your password :  input type=text name=password/ /p



  input type=submit value=Login/



  %



String usn = request.getParameter(username);



String pass = request.getParameter(password);







try{



 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);



 String url = jdbc:odbc:rahul;



 Connection con = DriverManager.getConnection(url, , );



 Statement s = con.createStatement();







 ResultSet rs = s.executeQuery(select * from customers);



 while(rs.next())



 {



   String u = rs.getString(1);



   String p = rs.getString(2);



   if(usn.equals(u)  pass.equals(p))



   {



  out.println(login successfull);



  }



   else



   {



  out.println(login failed);



 }



   }



}







catch(Exception e)



{



   out.println(Error+e);



   }







  %



  /form



  /body



  /html







 -



 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org



 For additional commands, e-mail: users-h...@tomcat.apache.org














 


RE: Working of Tomcat with MS Access

2011-04-15 Thread Propes, Barry L
Jeff has some really good points here, Rahul.

I'm a guy who spent several years doing ASP development with both MS Access and 
SQL Server over the web before getting into Java.
Even still, I didn't fathom trying to mess with MS Access with Java when I was 
making that transition. I started with mySQL on my Windows desktop to get 
started, but when I got access to our Oracle servers, went that route.

Like Jeff says, you can do this basically for no cost using both Tomcat and 
mySQL.

Sure, it's command line, unlike MS Access, but you shouldn't have too much 
trouble with it. Jeff, if he's using MS Access, he's probably not on Linux, is 
he?


-Original Message-
From: Jeff Hubbs [mailto:jhubbsl...@att.net]
Sent: Friday, April 15, 2011 12:46 PM
To: Tomcat Users List
Subject: Re: Working of Tomcat with MS Access

A beginner needs to at least begin with workable platforms and software.  
PostgreSQL on Linux has a total software license cost of $0.00; your barrier to 
entry with inappropriate software is considerably higher.

On 4/15/11 1:35 PM, RAHUL RAJ wrote:
 Since I am a beginner, I have to start with some trial projects,
 right? I know this is nothing! and help me...pls answer to the question..

 On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbsjhubbsl...@att.net  wrote:

 You do realize, I hope, that what you're proposing is akin to
 sourcing parts for your jet engine from Fisher-Price?

 IMHO MS Access is not and never has been useful as a professional
 database product.  I'm not even sure if what you are proposing even
 holds up in the looking-through-binoculars-from-the-big-end sense.

 MS Access is a desktop application that accesses files on disk.  Java
 apps running on Tomcat typically access an RDBMS over a network
 connection via SQL statements and their responses.  AFAIK there is
 not a server instantiation of MS Access; in fact, part of the whole
 point of MS Access as an ongoing product is that it acts as a
 gateway drug to MS' SQL Server product, the transition to which
 would be triggered by the inherent limitations (and, in my past
 experience, persistent unaddressed bugs) of Access.

 I think you need to back up a bit and work toward getting your data
 liberated from MS Access and ported into a proper RDBMS like
 PostgreSQL or one of MS SQL Server, Oracle, IBM DB2, etc. if you feel
 that money must be continually spent on software licenses for such.
 Then you will be facing Java apps and Tomcat in a far more conventional way.

 So, to sum up this and earlier responses: 1) Learn to code Java 2)
 Understand real RDBMSses.

 - Jeff


 On 4/15/11 6:04 AM, RAHUL RAJ wrote:

 Hello,
   I am working on  building a jsp website with MS Access as
 database. When my login page is loaded on tomcat
 (localhost:8080/login.jsp), it shows the following error:

 java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
 name not found and no default driver specified.

 The jdbc program alone is working perfectly, So There might not be
 problems due to  Driver, Data source name, Database Tables or any
 other software version compatibilities.

 OS: Windows Vista Home Basic
 Tomcat Version: 5.5.x
 jdk version: 1.6
 MS Access 2010


 code is given below:

 %@ page language=java import=java.sql.* %
   html
   body
   form method=post
   p   Enter your username :input type=text name=username/   /p
   p   Enter your password :input type=text name=password/   /p
   input type=submit value=Login/
   %
  String usn = request.getParameter(username);
 String pass = request.getParameter(password);

 try{
  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
  String url = jdbc:odbc:rahul;
  Connection con = DriverManager.getConnection(url, , );
  Statement s = con.createStatement();

  ResultSet rs = s.executeQuery(select * from customers);
  while(rs.next())
  {
String u = rs.getString(1);
String p = rs.getString(2);
if(usn.equals(u)   pass.equals(p))
{
   out.println(login successfull);
   }
else
 {
out.println(login failed);
   }
 }
  }

 catch(Exception e)
 {
out.println(Error+e);
}

   %
   /form
   /body
   /html

 
 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users

Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
ya...I did the same thing  you told in mysql...but communications Exception
occured..
This is like a small assignment that has to be submitted urgently..so I have
to run away from the error! and tried with MS ACCESS.
The jdbc program for access works perfect alone..

On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote:

 Raj,

 I think everyone is saying to take a look at this syntax:


 String url = jdbc:odbc:rahul;
 Connection con = DriverManager.getConnection(url, , );


 I know that when I make this type of simple jdbc connection in mysql the
 syntax is:

 String url = jdbc:mysql://localhost/dbName;
 Connection conn = DriverManager.getConnection(url, , );

 Troy










 -Original Message-
 From: RAHUL RAJ omrahulraj...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Fri, Apr 15, 2011 1:31 pm
 Subject: Re: Working of Tomcat with MS Access


 I got communications exception when I did this with mysql...and no one
 knows

 the reason perfectly...no response from mysql forum too...



 On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote:



  Raj;

 

  To all reading this response, this is my first response on this list so
 if

  I get it a little wrong have patience.

 

  You may want to look at the light weight RDBMS mysql.  It is free, easily

  installed and can be utilized with the companion Workbench to make
 dealing

  with the db very easy, a lot like the access interface.  You will have
 good

  driver support from the java end as well and a lot of documentation and

  tutorials to get you connected in your web app to your persistence layer.

 

  mysql.com

 

  Just my two cents and an attempt to give back a little to the community.

 

  Troy

 

 

 

 

 

 

 

 

 

 

  -Original Message-

  From: RAHUL RAJ omrahulraj...@gmail.com

  To: users users@tomcat.apache.org

  Sent: Fri, Apr 15, 2011 6:05 am

  Subject: Working of Tomcat with MS Access

 

 

  Hello,

 

  I am working on  building a jsp website with MS Access as

 

  database. When my login page is loaded on tomcat

 

  (localhost:8080/login.jsp), it shows the following error:

 

 

 

  java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source

 

  name not found and no default driver specified.

 

 

 

  The jdbc program alone is working perfectly, So There might not be

 

  problems due to  Driver, Data source name, Database Tables or any

 

  other software version compatibilities.

 

 

 

  OS: Windows Vista Home Basic

 

  Tomcat Version: 5.5.x

 

  jdk version: 1.6

 

  MS Access 2010

 

 

 

 

 

  code is given below:

 

 

 

  %@ page language=java import=java.sql.* %

 

   html

 

   body

 

   form method=post

 

   p Enter your username :  input type=text name=username/ /p

 

   p Enter your password :  input type=text name=password/ /p

 

   input type=submit value=Login/

 

   %

 

 String usn = request.getParameter(username);

 

 String pass = request.getParameter(password);

 

 

 

 try{

 

  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);

 

  String url = jdbc:odbc:rahul;

 

  Connection con = DriverManager.getConnection(url, ,
 );

 

  Statement s = con.createStatement();

 

 

 

  ResultSet rs = s.executeQuery(select * from customers);

 

  while(rs.next())

 

  {

 

String u = rs.getString(1);

 

String p = rs.getString(2);

 

if(usn.equals(u)  pass.equals(p))

 

{

 

   out.println(login successfull);

 

   }

 

else

 

{

 

   out.println(login failed);

 

  }

 

}

 

 }

 

 

 

 catch(Exception e)

 

 {

 

out.println(Error+e);

 

}

 

 

 

   %

 

   /form

 

   /body

 

   /html

 

 

 

  -

 

  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

 

  For additional commands, e-mail: users-h...@tomcat.apache.org

 

 

 

 

 

 






Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
No I am in Windows mode.

On Fri, Apr 15, 2011 at 11:26 PM, Propes, Barry L
barry.l.pro...@citi.comwrote:

 Jeff has some really good points here, Rahul.

 I'm a guy who spent several years doing ASP development with both MS Access
 and SQL Server over the web before getting into Java.
 Even still, I didn't fathom trying to mess with MS Access with Java when I
 was making that transition. I started with mySQL on my Windows desktop to
 get started, but when I got access to our Oracle servers, went that route.

 Like Jeff says, you can do this basically for no cost using both Tomcat and
 mySQL.

 Sure, it's command line, unlike MS Access, but you shouldn't have too much
 trouble with it. Jeff, if he's using MS Access, he's probably not on Linux,
 is he?


 -Original Message-
 From: Jeff Hubbs [mailto:jhubbsl...@att.net]
 Sent: Friday, April 15, 2011 12:46 PM
 To: Tomcat Users List
 Subject: Re: Working of Tomcat with MS Access

 A beginner needs to at least begin with workable platforms and software.
  PostgreSQL on Linux has a total software license cost of $0.00; your
 barrier to entry with inappropriate software is considerably higher.

 On 4/15/11 1:35 PM, RAHUL RAJ wrote:
  Since I am a beginner, I have to start with some trial projects,
  right? I know this is nothing! and help me...pls answer to the
 question..
 
  On Fri, Apr 15, 2011 at 8:41 PM, Jeff Hubbsjhubbsl...@att.net  wrote:
 
  You do realize, I hope, that what you're proposing is akin to
  sourcing parts for your jet engine from Fisher-Price?
 
  IMHO MS Access is not and never has been useful as a professional
  database product.  I'm not even sure if what you are proposing even
  holds up in the looking-through-binoculars-from-the-big-end sense.
 
  MS Access is a desktop application that accesses files on disk.  Java
  apps running on Tomcat typically access an RDBMS over a network
  connection via SQL statements and their responses.  AFAIK there is
  not a server instantiation of MS Access; in fact, part of the whole
  point of MS Access as an ongoing product is that it acts as a
  gateway drug to MS' SQL Server product, the transition to which
  would be triggered by the inherent limitations (and, in my past
  experience, persistent unaddressed bugs) of Access.
 
  I think you need to back up a bit and work toward getting your data
  liberated from MS Access and ported into a proper RDBMS like
  PostgreSQL or one of MS SQL Server, Oracle, IBM DB2, etc. if you feel
  that money must be continually spent on software licenses for such.
  Then you will be facing Java apps and Tomcat in a far more conventional
 way.
 
  So, to sum up this and earlier responses: 1) Learn to code Java 2)
  Understand real RDBMSses.
 
  - Jeff
 
 
  On 4/15/11 6:04 AM, RAHUL RAJ wrote:
 
  Hello,
I am working on  building a jsp website with MS Access as
  database. When my login page is loaded on tomcat
  (localhost:8080/login.jsp), it shows the following error:
 
  java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source
  name not found and no default driver specified.
 
  The jdbc program alone is working perfectly, So There might not be
  problems due to  Driver, Data source name, Database Tables or any
  other software version compatibilities.
 
  OS: Windows Vista Home Basic
  Tomcat Version: 5.5.x
  jdk version: 1.6
  MS Access 2010
 
 
  code is given below:
 
  %@ page language=java import=java.sql.* %
html
body
form method=post
p   Enter your username :input type=text name=username/
 /p
p   Enter your password :input type=text name=password/
 /p
input type=submit value=Login/
%
   String usn = request.getParameter(username);
  String pass = request.getParameter(password);
 
  try{
   Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
   String url = jdbc:odbc:rahul;
   Connection con = DriverManager.getConnection(url, ,
 );
   Statement s = con.createStatement();
 
   ResultSet rs = s.executeQuery(select * from
 customers);
   while(rs.next())
   {
 String u = rs.getString(1);
 String p = rs.getString(2);
 if(usn.equals(u)   pass.equals(p))
 {
out.println(login successfull);
}
 else
  {
 out.println(login failed);
}
  }
   }
 
  catch(Exception e)
  {
 out.println(Error+e);
 }
 
%
/form
/body
/html
 
  
  - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org

Re: Working of Tomcat with MS Access

2011-04-15 Thread Mikolaj Rydzewski

RAHUL RAJ wrote:

This is like a small assignment that has to be submitted urgently..so I have
to run away from the error! and tried with MS ACCESS.
The jdbc program for access works perfect alone..
  

So run tomcat as a 'standalone' java program - that means not as a service.

--
Mikolaj Rydzewski m...@ceti.pl


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
running 'tomcat as standalone java program'? can u explain for me sir?

2011/4/15 Mikolaj Rydzewski m...@ceti.pl

 RAHUL RAJ wrote:

 This is like a small assignment that has to be submitted urgently..so I
 have
 to run away from the error! and tried with MS ACCESS.
 The jdbc program for access works perfect alone..


 So run tomcat as a 'standalone' java program - that means not as a service.


 --
 Mikolaj Rydzewski m...@ceti.pl


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Working of Tomcat with MS Access

2011-04-15 Thread Troy
I wrote a quick little jsp to access one of my db (a mysql)


%@page contentType=text/html pageEncoding=UTF-8%
%@page import=java.sql.* %
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   http://www.w3.org/TR/html4/loose.dtd;

html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleTest Connection/title
/head
body

%
String name = ;
Class.forName(com.mysql.jdbc.Driver);
Connection conn = 
DriverManager.getConnection(jdbc:mysql://localhost/dbName, , XX);
Statement stmt = conn.createStatement();
String query = select * from friends where id='1';
ResultSet rs = stmt.executeQuery(query);
while(rs.next()){
 name = rs.getString(3);
}

%

%= name %

/body
/html

Worked like expected.  I know this is not a java thread . . . but still trying 
to help since it is a time sensitive matter.
Silly question, but are your jdbc drivers added to your library for the web 
app?  I make this mistake ALL the time.

Troy

 

 


 

 

-Original Message-
From: RAHUL RAJ omrahulraj...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, Apr 15, 2011 1:59 pm
Subject: Re: Working of Tomcat with MS Access


ya...I did the same thing  you told in mysql...but communications Exception

occured..

This is like a small assignment that has to be submitted urgently..so I have

to run away from the error! and tried with MS ACCESS.

The jdbc program for access works perfect alone..



On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote:



 Raj,



 I think everyone is saying to take a look at this syntax:





 String url = jdbc:odbc:rahul;

 Connection con = DriverManager.getConnection(url, , );





 I know that when I make this type of simple jdbc connection in mysql the

 syntax is:



 String url = jdbc:mysql://localhost/dbName;

 Connection conn = DriverManager.getConnection(url, , );



 Troy





















 -Original Message-

 From: RAHUL RAJ omrahulraj...@gmail.com

 To: Tomcat Users List users@tomcat.apache.org

 Sent: Fri, Apr 15, 2011 1:31 pm

 Subject: Re: Working of Tomcat with MS Access





 I got communications exception when I did this with mysql...and no one

 knows



 the reason perfectly...no response from mysql forum too...







 On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote:







  Raj;



 



  To all reading this response, this is my first response on this list so

 if



  I get it a little wrong have patience.



 



  You may want to look at the light weight RDBMS mysql.  It is free, easily



  installed and can be utilized with the companion Workbench to make

 dealing



  with the db very easy, a lot like the access interface.  You will have

 good



  driver support from the java end as well and a lot of documentation and



  tutorials to get you connected in your web app to your persistence layer.



 



  mysql.com



 



  Just my two cents and an attempt to give back a little to the community.



 



  Troy



 



 



 



 



 



 



 



 



 



 



  -Original Message-



  From: RAHUL RAJ omrahulraj...@gmail.com



  To: users users@tomcat.apache.org



  Sent: Fri, Apr 15, 2011 6:05 am



  Subject: Working of Tomcat with MS Access



 



 



  Hello,



 



  I am working on  building a jsp website with MS Access as



 



  database. When my login page is loaded on tomcat



 



  (localhost:8080/login.jsp), it shows the following error:



 



 



 



  java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source



 



  name not found and no default driver specified.



 



 



 



  The jdbc program alone is working perfectly, So There might not be



 



  problems due to  Driver, Data source name, Database Tables or any



 



  other software version compatibilities.



 



 



 



  OS: Windows Vista Home Basic



 



  Tomcat Version: 5.5.x



 



  jdk version: 1.6



 



  MS Access 2010



 



 



 



 



 



  code is given below:



 



 



 



  %@ page language=java import=java.sql.* %



 



   html



 



   body



 



   form method=post



 



   p Enter your username :  input type=text name=username/ /p



 



   p Enter your password :  input type=text name=password/ /p



 



   input type=submit value=Login/



 



   %



 



 String usn = request.getParameter(username);



 



 String pass = request.getParameter(password);



 



 



 



 try{



 



  Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);



 



  String url = jdbc:odbc:rahul;



 



  Connection con = DriverManager.getConnection(url, ,

 );



 



  Statement s = con.createStatement();



 



 



 



  ResultSet rs = s.executeQuery(select * from customers

Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
Thank you very much for your help! When I did with mysql, the corresponding
jdbc driver is stored in /webapps/ROOT/lib directory in tomcat.

On Fri, Apr 15, 2011 at 11:56 PM, Troy troylparr...@aol.com wrote:

 I wrote a quick little jsp to access one of my db (a mysql)


 %@page contentType=text/html pageEncoding=UTF-8%
 %@page import=java.sql.* %
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   http://www.w3.org/TR/html4/loose.dtd;

 html
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8
titleTest Connection/title
/head
body

%
String name = ;
Class.forName(com.mysql.jdbc.Driver);
Connection conn =
 DriverManager.getConnection(jdbc:mysql://localhost/dbName, ,
 XX);
Statement stmt = conn.createStatement();
String query = select * from friends where id='1';
ResultSet rs = stmt.executeQuery(query);
while(rs.next()){
 name = rs.getString(3);
}

 %

 %= name %

/body
 /html

 Worked like expected.  I know this is not a java thread . . . but still
 trying to help since it is a time sensitive matter.
 Silly question, but are your jdbc drivers added to your library for the web
 app?  I make this mistake ALL the time.

 Troy










 -Original Message-
 From: RAHUL RAJ omrahulraj...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Fri, Apr 15, 2011 1:59 pm
 Subject: Re: Working of Tomcat with MS Access


 ya...I did the same thing  you told in mysql...but communications Exception

 occured..

 This is like a small assignment that has to be submitted urgently..so I
 have

 to run away from the error! and tried with MS ACCESS.

 The jdbc program for access works perfect alone..



 On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote:



  Raj,

 

  I think everyone is saying to take a look at this syntax:

 

 

  String url = jdbc:odbc:rahul;

  Connection con = DriverManager.getConnection(url, ,
 );

 

 

  I know that when I make this type of simple jdbc connection in mysql the

  syntax is:

 

  String url = jdbc:mysql://localhost/dbName;

  Connection conn = DriverManager.getConnection(url, , );

 

  Troy

 

 

 

 

 

 

 

 

 

 

  -Original Message-

  From: RAHUL RAJ omrahulraj...@gmail.com

  To: Tomcat Users List users@tomcat.apache.org

  Sent: Fri, Apr 15, 2011 1:31 pm

  Subject: Re: Working of Tomcat with MS Access

 

 

  I got communications exception when I did this with mysql...and no one

  knows

 

  the reason perfectly...no response from mysql forum too...

 

 

 

  On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote:

 

 

 

   Raj;

 

  

 

   To all reading this response, this is my first response on this list so

  if

 

   I get it a little wrong have patience.

 

  

 

   You may want to look at the light weight RDBMS mysql.  It is free,
 easily

 

   installed and can be utilized with the companion Workbench to make

  dealing

 

   with the db very easy, a lot like the access interface.  You will have

  good

 

   driver support from the java end as well and a lot of documentation and

 

   tutorials to get you connected in your web app to your persistence
 layer.

 

  

 

   mysql.com

 

  

 

   Just my two cents and an attempt to give back a little to the
 community.

 

  

 

   Troy

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

   -Original Message-

 

   From: RAHUL RAJ omrahulraj...@gmail.com

 

   To: users users@tomcat.apache.org

 

   Sent: Fri, Apr 15, 2011 6:05 am

 

   Subject: Working of Tomcat with MS Access

 

  

 

  

 

   Hello,

 

  

 

   I am working on  building a jsp website with MS Access as

 

  

 

   database. When my login page is loaded on tomcat

 

  

 

   (localhost:8080/login.jsp), it shows the following error:

 

  

 

  

 

  

 

   java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source

 

  

 

   name not found and no default driver specified.

 

  

 

  

 

  

 

   The jdbc program alone is working perfectly, So There might not be

 

  

 

   problems due to  Driver, Data source name, Database Tables or any

 

  

 

   other software version compatibilities.

 

  

 

  

 

  

 

   OS: Windows Vista Home Basic

 

  

 

   Tomcat Version: 5.5.x

 

  

 

   jdk version: 1.6

 

  

 

   MS Access 2010

 

  

 

  

 

  

 

  

 

  

 

   code is given below:

 

  

 

  

 

  

 

   %@ page language=java import=java.sql.* %

 

  

 

html

 

  

 

body

 

  

 

form method=post

 

  

 

p Enter your username :  input type=text name=username/ /p

 

  

 

p Enter your password :  input type=text name=password/ /p

 

  

 

input type=submit value=Login/

 

  

 

%

 

  

 

  String usn = request.getParameter(username);

 

  

 

  String pass

Re: Working of Tomcat with MS Access

2011-04-15 Thread Troy
I believe the drivers should be located in: YourApp/WEB-INF/lib/
 

Troy

 


 

 

-Original Message-
From: RAHUL RAJ omrahulraj...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Fri, Apr 15, 2011 2:35 pm
Subject: Re: Working of Tomcat with MS Access


Thank you very much for your help! When I did with mysql, the corresponding

jdbc driver is stored in /webapps/ROOT/lib directory in tomcat.



On Fri, Apr 15, 2011 at 11:56 PM, Troy troylparr...@aol.com wrote:



 I wrote a quick little jsp to access one of my db (a mysql)





 %@page contentType=text/html pageEncoding=UTF-8%

 %@page import=java.sql.* %

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

   http://www.w3.org/TR/html4/loose.dtd;



 html

head

meta http-equiv=Content-Type content=text/html; charset=UTF-8

titleTest Connection/title

/head

body



%

String name = ;

Class.forName(com.mysql.jdbc.Driver);

Connection conn =

 DriverManager.getConnection(jdbc:mysql://localhost/dbName, ,

 XX);

Statement stmt = conn.createStatement();

String query = select * from friends where id='1';

ResultSet rs = stmt.executeQuery(query);

while(rs.next()){

 name = rs.getString(3);

}



 %



 %= name %



/body

 /html



 Worked like expected.  I know this is not a java thread . . . but still

 trying to help since it is a time sensitive matter.

 Silly question, but are your jdbc drivers added to your library for the web

 app?  I make this mistake ALL the time.



 Troy





















 -Original Message-

 From: RAHUL RAJ omrahulraj...@gmail.com

 To: Tomcat Users List users@tomcat.apache.org

 Sent: Fri, Apr 15, 2011 1:59 pm

 Subject: Re: Working of Tomcat with MS Access





 ya...I did the same thing  you told in mysql...but communications Exception



 occured..



 This is like a small assignment that has to be submitted urgently..so I

 have



 to run away from the error! and tried with MS ACCESS.



 The jdbc program for access works perfect alone..







 On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote:







  Raj,



 



  I think everyone is saying to take a look at this syntax:



 



 



  String url = jdbc:odbc:rahul;



  Connection con = DriverManager.getConnection(url, ,

 );



 



 



  I know that when I make this type of simple jdbc connection in mysql the



  syntax is:



 



  String url = jdbc:mysql://localhost/dbName;



  Connection conn = DriverManager.getConnection(url, , );



 



  Troy



 



 



 



 



 



 



 



 



 



 



  -Original Message-



  From: RAHUL RAJ omrahulraj...@gmail.com



  To: Tomcat Users List users@tomcat.apache.org



  Sent: Fri, Apr 15, 2011 1:31 pm



  Subject: Re: Working of Tomcat with MS Access



 



 



  I got communications exception when I did this with mysql...and no one



  knows



 



  the reason perfectly...no response from mysql forum too...



 



 



 



  On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote:



 



 



 



   Raj;



 



  



 



   To all reading this response, this is my first response on this list so



  if



 



   I get it a little wrong have patience.



 



  



 



   You may want to look at the light weight RDBMS mysql.  It is free,

 easily



 



   installed and can be utilized with the companion Workbench to make



  dealing



 



   with the db very easy, a lot like the access interface.  You will have



  good



 



   driver support from the java end as well and a lot of documentation and



 



   tutorials to get you connected in your web app to your persistence

 layer.



 



  



 



   mysql.com



 



  



 



   Just my two cents and an attempt to give back a little to the

 community.



 



  



 



   Troy



 



  



 



  



 



  



 



  



 



  



 



  



 



  



 



  



 



  



 



  



 



   -Original Message-



 



   From: RAHUL RAJ omrahulraj...@gmail.com



 



   To: users users@tomcat.apache.org



 



   Sent: Fri, Apr 15, 2011 6:05 am



 



   Subject: Working of Tomcat with MS Access



 



  



 



  



 



   Hello,



 



  



 



   I am working on  building a jsp website with MS Access as



 



  



 



   database. When my login page is loaded on tomcat



 



  



 



   (localhost:8080/login.jsp), it shows the following error:



 



  



 



  



 



  



 



   java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source



 



  



 



   name not found and no default driver specified.



 



  



 



  



 



  



 



   The jdbc program alone is working perfectly, So There might not be



 



  



 



   problems due to  Driver, Data source name, Database Tables or any



 



  



 



   other software version compatibilities

Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
Yes of course...I did the same...then what to do with this error? Remember
that Now I am working in ACCESS. code is not much different...

On Sat, Apr 16, 2011 at 12:10 AM, Troy troylparr...@aol.com wrote:

 I believe the drivers should be located in: YourApp/WEB-INF/lib/


 Troy








 -Original Message-
 From: RAHUL RAJ omrahulraj...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Fri, Apr 15, 2011 2:35 pm
 Subject: Re: Working of Tomcat with MS Access


 Thank you very much for your help! When I did with mysql, the corresponding

 jdbc driver is stored in /webapps/ROOT/lib directory in tomcat.



 On Fri, Apr 15, 2011 at 11:56 PM, Troy troylparr...@aol.com wrote:



  I wrote a quick little jsp to access one of my db (a mysql)

 

 

  %@page contentType=text/html pageEncoding=UTF-8%

  %@page import=java.sql.* %

  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

http://www.w3.org/TR/html4/loose.dtd;

 

  html

 head

 meta http-equiv=Content-Type content=text/html;
 charset=UTF-8

 titleTest Connection/title

 /head

 body

 

 %

 String name = ;

 Class.forName(com.mysql.jdbc.Driver);

 Connection conn =

  DriverManager.getConnection(jdbc:mysql://localhost/dbName, ,

  XX);

 Statement stmt = conn.createStatement();

 String query = select * from friends where id='1';

 ResultSet rs = stmt.executeQuery(query);

 while(rs.next()){

  name = rs.getString(3);

 }

 

  %

 

  %= name %

 

 /body

  /html

 

  Worked like expected.  I know this is not a java thread . . . but still

  trying to help since it is a time sensitive matter.

  Silly question, but are your jdbc drivers added to your library for the
 web

  app?  I make this mistake ALL the time.

 

  Troy

 

 

 

 

 

 

 

 

 

 

  -Original Message-

  From: RAHUL RAJ omrahulraj...@gmail.com

  To: Tomcat Users List users@tomcat.apache.org

  Sent: Fri, Apr 15, 2011 1:59 pm

  Subject: Re: Working of Tomcat with MS Access

 

 

  ya...I did the same thing  you told in mysql...but communications
 Exception

 

  occured..

 

  This is like a small assignment that has to be submitted urgently..so I

  have

 

  to run away from the error! and tried with MS ACCESS.

 

  The jdbc program for access works perfect alone..

 

 

 

  On Fri, Apr 15, 2011 at 11:19 PM, Troy troylparr...@aol.com wrote:

 

 

 

   Raj,

 

  

 

   I think everyone is saying to take a look at this syntax:

 

  

 

  

 

   String url = jdbc:odbc:rahul;

 

   Connection con = DriverManager.getConnection(url, ,

  );

 

  

 

  

 

   I know that when I make this type of simple jdbc connection in mysql
 the

 

   syntax is:

 

  

 

   String url = jdbc:mysql://localhost/dbName;

 

   Connection conn = DriverManager.getConnection(url, , );

 

  

 

   Troy

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

  

 

   -Original Message-

 

   From: RAHUL RAJ omrahulraj...@gmail.com

 

   To: Tomcat Users List users@tomcat.apache.org

 

   Sent: Fri, Apr 15, 2011 1:31 pm

 

   Subject: Re: Working of Tomcat with MS Access

 

  

 

  

 

   I got communications exception when I did this with mysql...and no one

 

   knows

 

  

 

   the reason perfectly...no response from mysql forum too...

 

  

 

  

 

  

 

   On Fri, Apr 15, 2011 at 9:08 PM, Troy troylparr...@aol.com wrote:

 

  

 

  

 

  

 

Raj;

 

  

 

   

 

  

 

To all reading this response, this is my first response on this list
 so

 

   if

 

  

 

I get it a little wrong have patience.

 

  

 

   

 

  

 

You may want to look at the light weight RDBMS mysql.  It is free,

  easily

 

  

 

installed and can be utilized with the companion Workbench to make

 

   dealing

 

  

 

with the db very easy, a lot like the access interface.  You will
 have

 

   good

 

  

 

driver support from the java end as well and a lot of documentation
 and

 

  

 

tutorials to get you connected in your web app to your persistence

  layer.

 

  

 

   

 

  

 

mysql.com

 

  

 

   

 

  

 

Just my two cents and an attempt to give back a little to the

  community.

 

  

 

   

 

  

 

Troy

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

   

 

  

 

-Original Message-

 

  

 

From: RAHUL RAJ omrahulraj...@gmail.com

 

  

 

To: users users@tomcat.apache.org

 

  

 

Sent: Fri, Apr 15, 2011 6:05 am

 

  

 

Subject: Working of Tomcat with MS Access

 

  

 

   

 

  

 

   

 

  

 

Hello,

 

  

 

   

 

  

 

I am working on  building a jsp website with MS Access as

 

  

 

   

 

  

 

database. When my login page

Re: Working of Tomcat with MS Access

2011-04-15 Thread Angel Java Lopez
Rahul:

Stop tomcat as a service.
Go to /tomcatdir/bin
Run startup.bat
Try your app again.

Only to discard user account/access problems.

On Fri, Apr 15, 2011 at 3:13 PM, RAHUL RAJ omrahulraj...@gmail.com wrote:

 running 'tomcat as standalone java program'? can u explain for me sir?

 2011/4/15 Mikolaj Rydzewski m...@ceti.pl

  RAHUL RAJ wrote:
 
  This is like a small assignment that has to be submitted urgently..so I
  have
  to run away from the error! and tried with MS ACCESS.
  The jdbc program for access works perfect alone..
 
 
  So run tomcat as a 'standalone' java program - that means not as a
 service.
 
 
  --
  Mikolaj Rydzewski m...@ceti.pl
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
There is no startup.bat file in the directory u specified.

In my system the directory path is
C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin


On Sat, Apr 16, 2011 at 12:14 AM, Angel Java Lopez ajlopez2...@gmail.comwrote:

 Rahul:

 Stop tomcat as a service.
 Go to /tomcatdir/bin
 Run startup.bat
 Try your app again.

 Only to discard user account/access problems.

 On Fri, Apr 15, 2011 at 3:13 PM, RAHUL RAJ omrahulraj...@gmail.com
 wrote:

  running 'tomcat as standalone java program'? can u explain for me sir?
 
  2011/4/15 Mikolaj Rydzewski m...@ceti.pl
 
   RAHUL RAJ wrote:
  
   This is like a small assignment that has to be submitted urgently..so
 I
   have
   to run away from the error! and tried with MS ACCESS.
   The jdbc program for access works perfect alone..
  
  
   So run tomcat as a 'standalone' java program - that means not as a
  service.
  
  
   --
   Mikolaj Rydzewski m...@ceti.pl
  
  
   -
   To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
   For additional commands, e-mail: users-h...@tomcat.apache.org
  
  
 



Re: Working of Tomcat with MS Access

2011-04-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff,

On 4/15/2011 11:11 AM, Jeff Hubbs wrote:
 You do realize, I hope, that what you're proposing is akin to sourcing
 parts for your jet engine from Fisher-Price?

:)

 MS Access is a desktop application that accesses files on disk.  Java
 apps running on Tomcat typically access an RDBMS over a network
 connection via SQL statements and their responses.  AFAIK there is not a
 server instantiation of MS Access;

While you're right, I believe that MS has an Access JDBC (or ODBC)
driver that allows you to specify the file to open as part of the JDBC
URL. It's kind of like using a CSV file as a database, though...

Anyway, this is possible. He's just missing some configuration of some
kind. I feel kind of fortunate that I have no past experience on which
to draw to help the OP.

Google for read access database in Java perhaps?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2olikACgkQ9CaO5/Lv0PB7IACglUXVRbvRHHNlcj6G98Ad2rjh
kRgAn1s7RvlCRbcQiugCigDG9KqXGJF+
=lSz2
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 4/15/2011 1:56 PM, Propes, Barry L wrote:
 Like Jeff says, you can do this basically for no cost using both
 Tomcat and mySQL.

Even better, use JavaDB: it comes with Java and is pretty much
guaranteed to work.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2olmwACgkQ9CaO5/Lv0PAFOwCgigjZqt/9QyFXXCg68L1A2cHk
PpYAoKK3VzrDZhRZiKlbFiqsmurJHd2l
=4sLQ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Working of Tomcat with MS Access

2011-04-15 Thread Propes, Barry L
Oh, ok - that's good. Although I'm not familiar with it, but will take it under 
advisement.

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Friday, April 15, 2011 2:03 PM
To: Tomcat Users List
Subject: Re: Working of Tomcat with MS Access

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Barry,

On 4/15/2011 1:56 PM, Propes, Barry L wrote:
 Like Jeff says, you can do this basically for no cost using both
 Tomcat and mySQL.

Even better, use JavaDB: it comes with Java and is pretty much guaranteed to 
work.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2olmwACgkQ9CaO5/Lv0PAFOwCgigjZqt/9QyFXXCg68L1A2cHk
PpYAoKK3VzrDZhRZiKlbFiqsmurJHd2l
=4sLQ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Working of Tomcat with MS Access

2011-04-15 Thread Leo Donahue - PLANDEVX
-Original Message-
From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
Subject: Re: Working of Tomcat with MS Access

Yes, it runs as a service. But how to know under what account does that
service run? does it mean 'admin' or 'normal user' or 'system'?
I made a system DSN for this...not the user DSN(Data Source Name)
and I launched tomcat service by right click 'run as admin'

I'm really surprised you have had as many responses to this thread as you've 
had.

Assuming you have Tomcat installed as a Windows service, usually the default 
account that runs Tomcat as a Windows service is Local System Account.  You 
need to change that account to one that has access to your mdb.  You can do 
that through the Services console.  Or try starting Tomcat via the startup.bat 
file, that should launch Tomcat with the same account you've logged into your 
system with, which hopefully is the same account you need to for Access.

The code you posted should work, although I can't understand what the purpose 
of your assignment is.  Don't get in the habit of using this code for anything 
related to logging in, or anything else.

If you must stay in the MS world, use SQL Express.

try {
Class.forName( sun.jdbc.odbc.JdbcOdbcDriver);
Connection con = DriverManager.getConnection(jdbc:odbc:rahul,,);

  Statement stmt = 
con.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);
  String query = Select whatever;

  ResultSet rs = stmt.executeQuery(query);

  while(rs.next()){
  // do stuff
}
rs.close();
  stmt.close();
  con.close();
} catch(SQLException ex) {

} catch(java.lang.ClassNotFoundException jdbce) {

}



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
you said:

You need to change that account to one that has access to your mdb.  You
can do that through the Services console.  Or try starting Tomcat via the
startup.bat file, that should launch Tomcat with the same account you've
logged into your system with, which hopefully is the same account you need
to for Access.


I don't know how to do these...Can you explain for me? Also startup.bat is
not there in the specified directory.

On Sat, Apr 16, 2011 at 1:48 AM, Leo Donahue - PLANDEVX 
leodona...@mail.maricopa.gov wrote:

 -Original Message-
 From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
 Subject: Re: Working of Tomcat with MS Access
 
 Yes, it runs as a service. But how to know under what account does that
 service run? does it mean 'admin' or 'normal user' or 'system'?
 I made a system DSN for this...not the user DSN(Data Source Name)
 and I launched tomcat service by right click 'run as admin'

 I'm really surprised you have had as many responses to this thread as
 you've had.

 Assuming you have Tomcat installed as a Windows service, usually the
 default account that runs Tomcat as a Windows service is Local System
 Account.  You need to change that account to one that has access to your
 mdb.  You can do that through the Services console.  Or try starting Tomcat
 via the startup.bat file, that should launch Tomcat with the same account
 you've logged into your system with, which hopefully is the same account you
 need to for Access.

 The code you posted should work, although I can't understand what the
 purpose of your assignment is.  Don't get in the habit of using this code
 for anything related to logging in, or anything else.

 If you must stay in the MS world, use SQL Express.

 try {
Class.forName( sun.jdbc.odbc.JdbcOdbcDriver);
 Connection con =
 DriverManager.getConnection(jdbc:odbc:rahul,,);

  Statement stmt =
 con.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);
  String query = Select whatever;

  ResultSet rs = stmt.executeQuery(query);

  while(rs.next()){
   // do stuff
}
rs.close();
  stmt.close();
  con.close();
} catch(SQLException ex) {

} catch(java.lang.ClassNotFoundException jdbce) {

}




RE: Working of Tomcat with MS Access

2011-04-15 Thread Leo Donahue - PLANDEVX
-Original Message-
From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
Subject: Re: Working of Tomcat with MS Access

you said:

You need to change that account to one that has access to your mdb.
You
can do that through the Services console.  Or try starting Tomcat via
the
startup.bat file, that should launch Tomcat with the same account you've
logged into your system with, which hopefully is the same account you
need
to for Access.


I don't know how to do these...Can you explain for me? 

On Vista Home Basic... ?  Uh...

Start/Control Panel
Switch to Classic View
Find Administrative Tools/Services

You're on your own after this, but in a nutshell.. you need to check the 
properties of the Tomcat Service and see if you can change the way the 
service Logs On

What happens when you reboot your computer? Do you have to restart Tomcat each 
time or is it still running after you reboot?


Also startup.bat is not there in the specified directory.
Fine.  By the way, I never specified a directory because no one here knows how 
you've installed Tomcat 5.5.x
I'm very fond of version x myself.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread André Warnier



Also startup.bat is not there in the specified directory.


It is not there because you have downloaded and installed the Tomcat installer version, 
and that one does not have a startup.bat file.



Stop your existing Tomcat service.

Go back to the Tomcat website, and download the appropriate zip version (32-bit or 
64-bit, depending on what your Java version is.

(you can see that by typing java -version in a command window)

Create a new directory on your PC (maybe call it tomcat-zip) and unzip the 
zip-file there.

Then go to the /bin sub-directory, and type startup.bat.
This will run this new Tomcat in the command window, under your own login 
user-id.
Verify that it runs, with a browser, by accessing http://localhost:8080;.

Type CTRL-C in the tomcat command window to stop it.

Then start modifying the configuration of this new Tomcat, to add what is necessary to run 
you application.  Do it one little bit at a time, and try restarting Tomcat each time you 
modify something, so that if there is a problem you know what you did wrong.


When that all runs, then we'll tell you how to setup this new Tomcat as a 
Windows Service.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
I am working on windows platform.  I downloaded tomcat setup,  md5(.exe) and
installed it.

On Sat, Apr 16, 2011 at 3:18 AM, André Warnier a...@ice-sa.com wrote:


  Also startup.bat is not there in the specified directory.


 It is not there because you have downloaded and installed the Tomcat
 installer version, and that one does not have a startup.bat file.


 Stop your existing Tomcat service.

 Go back to the Tomcat website, and download the appropriate zip version
 (32-bit or 64-bit, depending on what your Java version is.
 (you can see that by typing java -version in a command window)

 Create a new directory on your PC (maybe call it tomcat-zip) and unzip
 the zip-file there.

 Then go to the /bin sub-directory, and type startup.bat.
 This will run this new Tomcat in the command window, under your own login
 user-id.
 Verify that it runs, with a browser, by accessing http://localhost:8080;.

 Type CTRL-C in the tomcat command window to stop it.

 Then start modifying the configuration of this new Tomcat, to add what is
 necessary to run you application.  Do it one little bit at a time, and try
 restarting Tomcat each time you modify something, so that if there is a
 problem you know what you did wrong.

 When that all runs, then we'll tell you how to setup this new Tomcat as a
 Windows Service.




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
vista home basic.
No, I can restart tomcat each time, by clicking the start/stop button.

On Sat, Apr 16, 2011 at 2:49 AM, Leo Donahue - PLANDEVX 
leodona...@mail.maricopa.gov wrote:

 -Original Message-
 From: RAHUL RAJ [mailto:omrahulraj...@gmail.com]
 Subject: Re: Working of Tomcat with MS Access
 
 you said:
 
 You need to change that account to one that has access to your mdb.
 You
 can do that through the Services console.  Or try starting Tomcat via
 the
 startup.bat file, that should launch Tomcat with the same account you've
 logged into your system with, which hopefully is the same account you
 need
 to for Access.
 
 
 I don't know how to do these...Can you explain for me?

 On Vista Home Basic... ?  Uh...

 Start/Control Panel
 Switch to Classic View
 Find Administrative Tools/Services

 You're on your own after this, but in a nutshell.. you need to check the
 properties of the Tomcat Service and see if you can change the way the
 service Logs On

 What happens when you reboot your computer? Do you have to restart Tomcat
 each time or is it still running after you reboot?


 Also startup.bat is not there in the specified directory.
 Fine.  By the way, I never specified a directory because no one here knows
 how you've installed Tomcat 5.5.x
 I'm very fond of version x myself.



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




RE: Working of Tomcat with MS Access

2011-04-15 Thread Leo Donahue - PLANDEVX


From: RAHUL RAJ [omrahulraj...@gmail.com]
Subject: Re: Working of Tomcat with MS Access

vista home basic.
No, I can restart tomcat each time, by clicking the start/stop button.

Did you try any of the suggestions André or I offered?
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Working of Tomcat with MS Access

2011-04-15 Thread RAHUL RAJ
I think I have to have tomcat (.zip) rather than md5 package..just a
moment...i will get back to you...

On Sat, Apr 16, 2011 at 8:50 AM, Leo Donahue - PLANDEVX 
leodona...@mail.maricopa.gov wrote:


 
 From: RAHUL RAJ [omrahulraj...@gmail.com]
 Subject: Re: Working of Tomcat with MS Access

 vista home basic.
 No, I can restart tomcat each time, by clicking the start/stop button.

 Did you try any of the suggestions André or I offered?
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org