servlet/password/database

I

Ike

Im just trying to grasp the underlying architecture of a applet connection
to a servlet whihc accesses a database via jdbc.

Am I correct in my understanding that the username/password to access the
database is, say, hardcoded into the servlet, and never is communicated via
applet to servlet? Can someone pls advise here. Thanks, Ike
 
M

Michael Borgwardt

Ike said:
Im just trying to grasp the underlying architecture of a applet connection
to a servlet whihc accesses a database via jdbc.

Am I correct in my understanding that the username/password to access the
database is, say, hardcoded into the servlet, and never is communicated via
applet to servlet?

Not necessarily, but that's how it *should* be done, and the main reason
to use a servlet in between the applet and the DB. Though it's usually
done with a pure HTML interface and no applet these days.
 
W

Wendy S

Ike said:
Am I correct in my understanding that the username/password to access the
database is, say, hardcoded into the servlet, and never is communicated via
applet to servlet? Can someone pls advise here. Thanks, Ike

My connection parameters are in a .properties file under WEB-INF, and that
file is used by the connection factory. The Servlet code gets a DAO object
and tells it to read or write, it had no knowledge of the database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top