Problem running in tomcat |
prasanna |
2006-09-22 00:06:44 |
Hello,
Im using hxtt access driver for connecting to ms access database which is password protected.It is working fine both as an application and applet(running under appletviewer), but not working in tomcat.I don't know why,im new to this development field i have 0 yrs experience.I don't know how to write an xml file for connecting to database in web-inf and meta-inf folder .The tomcat version im using is tomcat 5.5.17.Can we connect to database without using databaseconnection pool.I not able to understand database connection pooling.
|
Re:Problem running in tomcat |
HXTT Support |
2006-09-22 00:14:12 |
>Can we connect to database without using databaseconnection pool
Yeah. What's your jdbc url in tomcat?
|
Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 00:41:25 |
These are the url s which i have used for my project
jdbc:access://ip-address of the local machine which i have the database:80/databasename.mdb?password=password when i use this url and run in gui
which u have provided it is working fine but at the same time if i run tomcat using http://ip-address of the local machine i get HXTT Remote Connectionv1.2TeV instead of tomcat home page i don't why this happens.
jdbc:access:/c:/databasename.mdb?password=password when i click a html page im able to get the data but the same thing when im running in tomcat it is not so..
Please help me,
Thank u..
|
Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 00:46:18 |
|
Where is your tomcat server, and where is your mdb file?
|
Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 00:49:16 |
|
Both are running on the same machine
|
Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 00:59:25 |
Then you can use:
jdbc:access:////c:/mdbfiles/databasename.mdb?password=password
if that databasename.mdb is at c:/mdbfiles .
|
Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 02:07:27 |
I also tried that it was working fine when i run in appletviewer but not in tomcat,so please help me..when i run whith http://ipaddress-0f-localmachine/webpage.html when i use this url i get the web page and applet but not connecting to database..
|
Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 02:25:49 |
Sorry. It should be:
jdbc:access:///c:/mdbfiles/databasename.mdb?password=password
if that databasename.mdb is at c:/mdbfiles .
What's your code and error message?
|
Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 02:28:17 |
I also use
http://remote-machine-ip:8029/C:/Databasename.mdb?password=password in the gui and it is also working fine to connect to database which is present in the remote system.Then i use localhost/ip address of the local machine using tomcat the page is displayed but not connected to the database.I don't know where i made a mistake..I kept the folder which contains html file and class files in tomcat->webapps->root,then i kept that Access_JDBC30.jar in tomcat->common->lib
please help me,
thank u
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 02:36:19 |
> http://remote-machine-ip:8029/C:/Databasename.mdb?password=password in the
> gui and it is also working fine to connect to database which is present
> in the remote system.
>Then i use localhost/ip address of the local machine using tomcat the page is
>displayed but not connected to the database.
It seems that you're placing tomcat and mdb file on one host, then wish to visit those data though an application on another host?
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
p |
2006-09-22 02:40:37 |
No ,i tried with jdbc:access:///C:/databasename.mdb?password=password only but it is not working . I don know where to find error messages in tomcat.
First of all i want to know why i get HXTT Remote Connectionv1.2Te when i run http://local-machine-ip instead of tomcat home page..
I explain clearly im running access server,and in url info i specify
jdbc:access://local-machine-ip:80/C:/databasename.mdb?password=password
Its get connected and im able to retrieve the records but at the same time when i run tomcat using http://localmachine-ip/ im not able to get the homepage of tomcat.
I also tried http://localhost/webpage-which-contain-all-files/webpage.html i get the applet but not connected to database.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 02:40:48 |
No ,i tried with jdbc:access:///C:/databasename.mdb?password=password only but it is not working . I don know where to find error messages in tomcat.
First of all i want to know why i get HXTT Remote Connectionv1.2Te when i run http://local-machine-ip instead of tomcat home page..
I explain clearly im running access server,and in url info i specify
jdbc:access://local-machine-ip:80/C:/databasename.mdb?password=password
Its get connected and im able to retrieve the records but at the same time when i run tomcat using http://localmachine-ip/ im not able to get the homepage of tomcat.
I also tried http://localhost/webpage-which-contain-all-files/webpage.html i get the applet but not connected to database.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 02:48:25 |
>jdbc:access://local-machine-ip:80/C:/databasename.mdb?password=password
>Its get connected and im able to retrieve the records but at the same time
>when i run tomcat using http://localmachine-ip/ im not able to get the
> homepage of tomcat.
>I also tried http://localhost/webpage-which-contain-all-files/webpage.html i
> get the applet but not connected to database.
You can't run AccessServer at 80 port, because Tomcat need that port. You should stop AccessServer, and remove that service, and add a new service like jdbc:access://local-machine-ip:8029/C:/databasename.mdb?password=password, then you can access data through 8029, and can see html page at 80 port:)
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 02:48:40 |
No sir,
While connecting to the remote machine i have the database in the remote machine and tomcat in the local machine.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 02:51:19 |
>While connecting to the remote machine i have the database in the remote
> machine and tomcat in the local machine.
What's your JDBC url on JSP or servlet of Tomcat to visit remote AccessServer?
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 02:59:20 |
I think im very unfortunate i tried that also but it is working when i run with
appletviewer ,but not working with tomcat..Should i need to place any xml files in
tomcat ..
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 03:07:13 |
Im using applet to connect to the database.
The url which i have specified inside the init() method is
These are the url i have tried
jdbc:access://local-machine-ip:8029/C:/database-name.mdb?password=password
jdbc:access:///C:/database-name.mdb?password=password
jdbc:access://local-machine-ip:80/C:/database-name.mdb?password=password when im runnin access server in this url, i use the above url
I tried every url which i placed in url info of the access server gui
but nothing is working....Please give me a solution
Thank u
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 03:19:02 |
>Im using applet to connect to the database.
Applet has security limitation. Whether you are downloading that applet from your server, or used appletviewer to run your applet?
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 03:26:18 |
The client machines can access the applets from the server.I set a policy file.
The applets are downloaded from the server.
When i run appletviewer with
working directory:appletviewer -J-Djava.security.policy=policy webpage.hmtl
The applets are connected to the database and working fine.
I also tried jdbc:access:/D:/prasanna/project1/passwordverification/databasename.mdb this url
and when i click the html page im able to connect to the databse it is working
fine,but not in tomcat.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 03:40:02 |
|
Now you can use appletviewer to run that applet to visit remote data without error, but you can't download and run applet from tomcat web server to visit remote data at the same time? It seems to be a security issue.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 03:47:08 |
I also tried with tomcat to view the database which is present in the local
machine where the tomcat server is running (both database and tomcat are on the
same machine)it is also not working?Why?(But running in appletviewer)
Please suggest a solution?So it is definitely not possible in applets?
Thank u
Prasanna.B
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 04:16:45 |
OKay if we use servelts what type of url we have to specify both in Access
Server and in java program.
Please help me,thank u for your reply so far,
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 04:23:58 |
|
It should be a security limitation issue. Your applet failed to visit other port except that 80 of tomcat, and you can catch that exception of DriverManger.getConnection(...), and print that exception message in your applet to make sure it.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 04:26:52 |
If you wish to skip that security limitation, you can sign your applet.
>if we use servelts what type of url we have to specify both in Access
>Server and in java program.
Same url.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 04:34:37 |
Sir i get the applet downloaded in other client machine,the web page and applets
are visible but not connecting to the database.Thats what the problem.Anyway
applets are insecure we have to move to servlets.Let u please expalin how to
specify the url in case of servlets and what kind of xml files we have to place in
META-INF(Context.xml) for connecting to database using access server .Then if u
don't mind will u please explain what is database pooling and how can we connect
to the database without using pooling
Thank u
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
prasanna |
2006-09-22 05:16:55 |
Thanks for HXTTSUPPORT for your quick response and guidance
Thank u,
Prasanna.B
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 06:43:08 |
>what kind of xml files we have to place in META-INF(Context.xml) for
> connecting to database using access server.
>Then if u don't mind will u please explain what is database pooling and
> how can we connect to the database without using pooling
You can write similar JDBC url and code like your application:) You needn't to use context.xml or connection pool. You can find a simple testServlet.java sample in Excel demo package. In fact, you can seperate all JDBC code into other class.
|
Re:Re:Re:Re:Re:Re:Re:Re:Problem running in tomcat |
HXTT Support |
2006-09-22 06:44:14 |
|
If your application has many web pages, you can use jsp to replace servlet. All development is similar to Java application, except for html syntax.
|