| Author |
Jdbc j2ee MySQL
|
Kushal Das
Greenhorn
Joined: Aug 27, 2004
Posts: 4
|
|
Hi, I created a jdbc resource in Sun java system applicatin server 8; I want to use it from an applet in a jsp page running from that server.. But i got the error for initial context. It gives the error Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial I need some immidate help. kD
|
 |
Julian Kennedy
Ranch Hand
Joined: Aug 02, 2004
Posts: 823
|
|
Since your applet runs on the client machine it doesn't have access to the JNDI config info (e.g. java.naming.factory.initial) unless you supply it as an applet parameter. I'm not sure it will work even then, but you can try it. If you need immediate help, I suggest you read the manual - immediately. Jules
|
 |
Kushal Das
Greenhorn
Joined: Aug 27, 2004
Posts: 4
|
|
There what parameter should i pass? There is nothing in the manual for this case. It is written that the value can be passed as parameter or it will be taken from a jndi.properties file.
|
 |
Peter den Haan
author
Ranch Hand
Joined: Apr 20, 2000
Posts: 3252
|
|
An applet is running on the client's browser, not in the server's managed environment, and can access none of the J2EE facilities you've come to know and love. If your setup is anywhere near sane, it won't be able to directly access the database anyway. Make the applet use HTTP requests back to the server. There's a whole raft of technologies you could use: plain old HTTP requests, RMI over HTTP, Hessian/Burlap, and so on. You might enjoy using CachedRowSet as well, depending on what you want to achieve. - Peter
|
 |
Kushal Das
Greenhorn
Joined: Aug 27, 2004
Posts: 4
|
|
Hi, Then there should be any option by which my applet can use the database. How can i use the jdbc resource. Can my applet can talk to an EJB there...??? I am new to the j2ee environment. In the program, i need to show some data from the MySQL server in an applet. It will also contain picture (BLOB) data. Please visit my projects site:- Career Sangi
|
 |
 |
|
|
subject: Jdbc j2ee MySQL
|
|
|